5.2.x: Add support for MySQL 8 provider
When trying to use MySQL 8, its provider fails to compile:
$ rpm -q community-mysql-devel community-mysql-devel-8.0.17-2.fc32.x86_64
make[2]: Entering directory '/home/tkloczko/rpmbuild/BUILD/libgda-5.2.9/providers/mysql' /bin/sh ../../libtool --tag=CC --mode=compile gcc -DPACKAGE_NAME=\"GNU\ Data\ Access\" -DPACKAGE_TARNAME=\"libgda\" -DPACKAGE_VERSION=\"5.2.9\" -DPACKAGE_STRING=\"GNU\ Data\ Access\ 5.2.9\" -DPACKAGE_BUGREPORT=\"https://bugzilla.gnome.org/enter_bug.cgi\?product=libgda\" -DPACKAGE_URL=\"http://www.gnome-db.org\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DSIZEOF_UNSIGNED_INT=4 -DSIZEOF_UNSIGNED_LONG_INT=8 -DSIZEOF_INT_P=8 -DHAVE_LOCALTIME_R=1 -DUSE_MLOCK=1 -DSTDC_HEADERS=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_GDU=1 -DGETTEXT_PACKAGE=\"libgda-5.0\" -DHAVE_LOCALE_H=1 -DHAVE_LC_MESSAGES=1 -DHAVE_BIND_TEXTDOMAIN_CODESET=1 -DHAVE_GETTEXT=1 -DHAVE_DCGETTEXT=1 -DENABLE_NLS=1 -DHAVE_UI=1 -DHAVE_GDKPIXBUF=1 -DHAVE_GTKSOURCEVIEW=1 -DHAVE_GRAPHVIZ=1 -DGRAPHVIZ_NEW_API=1 -DISO_CODES_PREFIX=\"/usr\" -DHAVE_LIBCRYPTO=/\*\*/ -DHAVE_ICONV=1 -DICONV_CONST= -DHAVE_LIBSOUP=1 -DHAVE_LIBSECRET=1 -DHAVE_READLINE=1 -DHAVE_HISTORY=1 -DHAVE_TERMIOS_H=1 -I. -I../.. -I../../libgda -I../.. -I../../providers/reuseable/mysql -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -pthread -I/usr/include/libxml2 -DLIBGDA_ABI_NAME=\"libgda-5.0\" -Wall -I/usr/include/mysql -m64 -DCLASS_PREFIX=\""GdaMySQL"\" -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -flto -I/usr/include/graphviz -c -o gda-mysql-provider.lo gda-mysql-provider.c libtool: compile: gcc "-DPACKAGE_NAME=\"GNU Data Access\"" -DPACKAGE_TARNAME=\"libgda\" -DPACKAGE_VERSION=\"5.2.9\" "-DPACKAGE_STRING=\"GNU Data Access 5.2.9\"" "-DPACKAGE_BUGREPORT=\"https://bugzilla.gnome.org/enter_bug.cgi?product=libgda\"" -DPACKAGE_URL=\"http://www.gnome-db.org\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DSIZEOF_UNSIGNED_INT=4 -DSIZEOF_UNSIGNED_LONG_INT=8 -DSIZEOF_INT_P=8 -DHAVE_LOCALTIME_R=1 -DUSE_MLOCK=1 -DSTDC_HEADERS=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_GDU=1 -DGETTEXT_PACKAGE=\"libgda-5.0\" -DHAVE_LOCALE_H=1 -DHAVE_LC_MESSAGES=1 -DHAVE_BIND_TEXTDOMAIN_CODESET=1 -DHAVE_GETTEXT=1 -DHAVE_DCGETTEXT=1 -DENABLE_NLS=1 -DHAVE_UI=1 -DHAVE_GDKPIXBUF=1 -DHAVE_GTKSOURCEVIEW=1 -DHAVE_GRAPHVIZ=1 -DGRAPHVIZ_NEW_API=1 -DISO_CODES_PREFIX=\"/usr\" "-DHAVE_LIBCRYPTO=/**/" -DHAVE_ICONV=1 -DICONV_CONST= -DHAVE_LIBSOUP=1 -DHAVE_LIBSECRET=1 -DHAVE_READLINE=1 -DHAVE_HISTORY=1 -DHAVE_TERMIOS_H=1 -I. -I../.. -I../../libgda -I../.. -I../../providers/reuseable/mysql -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -pthread -I/usr/include/libxml2 -DLIBGDA_ABI_NAME=\"libgda-5.0\" -Wall -I/usr/include/mysql -m64 -DCLASS_PREFIX=\"GdaMySQL\" -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -flto -I/usr/include/graphviz -c gda-mysql-provider.c -fPIC -DPIC -o .libs/gda-mysql-provider.o gda-mysql-provider.c: In function ‘real_prepare’: gda-mysql-provider.c:1838:2: error: unknown type name ‘my_bool’; did you mean ‘bool’? 1838 | my_bool update_max_length = 1; | ^~~~~~~ | bool gda-mysql-provider.c: In function ‘prepare_stmt_simple’: gda-mysql-provider.c:1944:2: error: unknown type name ‘my_bool’; did you mean ‘bool’? 1944 | my_bool update_max_length = 1; | ^~~~~~~ | bool gda-mysql-provider.c: In function ‘gda_mysql_provider_statement_execute’: gda-mysql-provider.c:2330:36: error: ‘my_bool’ undeclared (first use in this function); did you mean ‘bool’? 2330 | mysql_bind_param[i].is_null = (my_bool*)1; | ^~~~~~~ | bool gda-mysql-provider.c:2330:36: note: each undeclared identifier is reported only once for each function it appears in gda-mysql-provider.c:2330:44: error: expected expression before ‘)’ token 2330 | mysql_bind_param[i].is_null = (my_bool*)1; | ^ gda-mysql-provider.c:2350:44: error: expected expression before ‘)’ token 2350 | mysql_bind_param[i].is_null = (my_bool*)1; | ^ gda-mysql-provider.c:2402:44: error: expected expression before ‘)’ token 2402 | mysql_bind_param[i].is_null = (my_bool*)1; | ^ gda-mysql-provider.c:2462:44: error: expected expression before ‘)’ token 2462 | mysql_bind_param[i].is_null = (my_bool*)1; | ^ gda-mysql-provider.c:2498:44: error: expected expression before ‘)’ token 2498 | mysql_bind_param[i].is_null = (my_bool*)1; | ^ gda-mysql-provider.c:2531:44: error: expected expression before ‘)’ token 2531 | mysql_bind_param[i].is_null = (my_bool*)1; | ^ gda-mysql-provider.c:2551:44: error: expected expression before ‘)’ token 2551 | mysql_bind_param[i].is_null = (my_bool*)1; | ^ gda-mysql-provider.c:2627:44: error: expected expression before ‘)’ token 2627 | mysql_bind_param[i].is_null = (my_bool*)1; | ^ gda-mysql-provider.c:2668:44: error: expected expression before ‘)’ token 2668 | mysql_bind_param[i].is_null = (my_bool*)1; | ^ make[2]: *** [Makefile:688: gda-mysql-provider.lo] Error 1
Edited by Daniel Espinosa Ortiz