Modify

Opened 7 weeks ago

Last modified 6 weeks ago

#13093 new Bug Report - General

'MYSQL {aka struct st_mysql}' has no member named 'reconnect'

Reported by: Richard Shaw <hobbes1069@…> Owned by:
Priority: minor Milestone: needs_triage
Component: Plugin - MythZoneminder Version: 0.28.1
Severity: medium Keywords:
Cc: Ticket locked: no

Description

I am currently unable to build MythTV on Fedora Rawhide (future F27 release). Apparently there was an API regression with mariadb 10.2.X...

g++ -c -pipe -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mcpu=power8 -mtune=power8 -fomit-frame-pointer -fno-devirtualize -fomit-frame-pointer -fPIC -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -maltivec -mabi=altivec -pthread -g -Wall -Wpointer-arith -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -fvisibility-inlines-hidden -Wmissing-declarations -Wno-switch -Woverloaded-virtual -funit-at-a-time -fomit-frame-pointer -std=gnu++11 -Wall -W -fPIC -D_GNU_SOURCE -DPREFIX="/usr" -Dusing_libcec -D_FILE_OFFSET_BITS=64 -Dlinux -I. -isystem /usr/include/libxml2 -isystem /usr/include/X11 -I/builddir/build/BUILD/mythtv-0.28.1/fakeroot/usr/include -I/usr/lib64/qt5/mkspecs/linux-g++ -o zmserver.o zmserver.cpp
zmserver.cpp: In function 'void connectToDatabase()':
zmserver.cpp:186:14: error: 'MYSQL {aka struct st_mysql}' has no member named 'reconnect'
     g_dbConn.reconnect = 1;
              ^~~~~~~~~
make[2]: *** [Makefile:380: zmserver.o] Error 1

See the following for more details: https://jira.mariadb.org/browse/MDEV-12950

Attachments (0)

Change History (6)

comment:1 Changed 7 weeks ago by Gary Buhrmaster <gary.buhrmaster@…>

If it helps the mythzoneminder wrangler, here is a completely untested prototype patch (neither compile tested, nor functionally tested):

--- a/mythplugins/mythzoneminder/mythzmserver/zmserver.cpp
+++ b/mythplugins/mythzoneminder/mythzmserver/zmserver.cpp
@@ -183,7 +183,8 @@ void connectToDatabase(void)
         exit(mysql_errno(&g_dbConn));
     }
 
-    g_dbConn.reconnect = 1;
+    my_bool reconnect = 1;
+    mysql_options(&g_dbConn, MYSQL_OPT_RECONNECT, &reconnect);
 
     if (!mysql_real_connect(&g_dbConn, g_server.c_str(), g_user.c_str(),
          g_password.c_str(), 0, 0, 0, 0))

comment:2 follow-up: Changed 7 weeks ago by Richard Shaw <hobbes1069@…>

Compilation succeeded but no good way to test functionality on a development branch... I guess we'll worry about it when it becomes a real release.

comment:3 in reply to: ↑ 2 Changed 7 weeks ago by Gary Buhrmaster <gary.buhrmaster@…>

Replying to Richard Shaw <hobbes1069@…>:

Compilation succeeded but no good way to test functionality on a development branch... I guess we'll worry about it when it becomes a real release.

Thanks for the feedback.

I am sort of hoping that the usual suspects for mythzoneminder (Paul H?) can test in his environment when sufficient free time heads his way. The patch *should* be backwards compatible for any reasonably current version of mysql and/or mariadb, but I do not have anywhere near a sufficiently robust builder environment to even test builds on all the platforms the project supports (and I really do not want to create builders for all of them).

comment:4 Changed 7 weeks ago by Richard Shaw <hobbes1069@…>

I currently have the spec file set to only apply the patch on Fedora 27/Rawhide but I could perform a local build with it applied, however, I don't use the zoneminder functionality so I'm not sure it would tell me anything.

comment:5 Changed 6 weeks ago by Richard Shaw <hobbes1069@…>

The problem is with the current version of python-mysql...

https://bugzilla.redhat.com/show_bug.cgi?id=1472985

comment:6 Changed 6 weeks ago by Gary Buhrmaster <gary.buhrmaster@…>

I believe that BZ is a completely different issue. But I'll let the experts make that determination.

(the use of an internal structure member reconnect may have been required at some point in the past, but is not a good idea after the ability to set options was made available; mythtv should be fixed to use the mysql_options api.)

Add Comment

Modify Ticket

Action
as new The ticket will remain with no owner.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.