Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MySQL 8.0.1 removes support for the my_bool datatype #571

Closed
junkerjoe opened this issue Sep 8, 2020 · 2 comments
Closed

MySQL 8.0.1 removes support for the my_bool datatype #571

junkerjoe opened this issue Sep 8, 2020 · 2 comments

Comments

@junkerjoe
Copy link
Contributor

junkerjoe commented Sep 8, 2020

MYSQL release notes regarding my_bool changes: https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-1.html#mysqld-8-0-1-compiling

I have installed libmysqlclient-dev , mysql-client, and mysql-server from the default repos of Ubuntu 20.04, resulting in having MySQL 8.0.21 running.

The following build error occurs when attempting to compile gerbil with the --enable-mysql parameter:

... compile foreign db/_mysql
../../../src/std/db/_mysql.c:1642:65: error: unknown type name ‘my_bool’; did you mean ‘bool’?
 1642 | static void ffi_mysql_bind_set_null (MYSQL_BIND* mybind, int k, my_bool* is_null);
      |                                                                 ^~~~~~~
      |                                                                 bool
../../../src/std/db/_mysql.c:2033:58: error: unknown type name ‘my_bool’; did you mean ‘bool’?
 2033 | void ffi_mysql_bind_set_null (MYSQL_BIND* mybind, int k, my_bool* is_null)
      |                                                          ^~~~~~~
      |                                                          bool
../../../src/std/db/_mysql.c:2167:1: error: unknown type name ‘my_bool’; did you mean ‘bool’?
 2167 | my_bool* ffi_mysql_make_my_bool_ptr ()
      | ^~~~~~~
      | bool
../../../src/std/db/_mysql.c: In function ‘ffi_mysql_make_my_bool_ptr’:
../../../src/std/db/_mysql.c:2169:2: error: unknown type name ‘my_bool’; did you mean ‘bool’?
 2169 |  my_bool* res = malloc (sizeof (my_bool));
      |  ^~~~~~~
      |  bool
../../../src/std/db/_mysql.c:2169:33: error: ‘my_bool’ undeclared (first use in this function); did you mean ‘bool’?
 2169 |  my_bool* res = malloc (sizeof (my_bool));
      |                                 ^~~~~~~
      |                                 bool
../../../src/std/db/_mysql.c:2169:33: note: each undeclared identifier is reported only once for each function it appears in
../../../src/std/db/_mysql.c: In function ‘___H___mysql’:
../../../src/std/db/_mysql.c:5646:1: warning: implicit declaration of function ‘ffi_mysql_bind_set_null’; did you mean ‘ffi_mysql_bind_get_null’? [-Wimplicit-function-declaration]
 5646 | ffi_mysql_bind_set_null(___arg1,___arg2,___arg3);
      | ^~~~~~~~~~~~~~~~~~~~~~~
      | ffi_mysql_bind_get_null
In file included from ../../../src/std/db/_mysql.c:353:
../../../src/std/db/_mysql.c:5642:30: error: ‘my_bool’ undeclared (first use in this function); did you mean ‘bool’?
 5642 | #define ___arg3 ___CFUN_CAST(my_bool*,___arg3_voidstar)
      |                              ^~~~~~~
/usr/local/Gambit/include/gambit.h:1834:28: note: in definition of macro ‘___CAST’
 1834 | #define ___CAST(type,val)((type)(val))
      |                            ^~~~
../../../src/std/db/_mysql.c:5642:17: note: in expansion of macro ‘___CFUN_CAST’
 5642 | #define ___arg3 ___CFUN_CAST(my_bool*,___arg3_voidstar)
      |                 ^~~~~~~~~~~~
../../../src/std/db/_mysql.c:5646:41: note: in expansion of macro ‘___arg3’
 5646 | ffi_mysql_bind_set_null(___arg1,___arg2,___arg3);
      |                                         ^~~~~~~
/usr/local/Gambit/include/gambit.h:1834:32: error: expected expression before ‘)’ token
 1834 | #define ___CAST(type,val)((type)(val))
      |                                ^
/usr/local/Gambit/include/gambit.h:7918:31: note: in expansion of macro ‘___CAST’
 7918 | #define ___CFUN_CAST(type,arg)___CAST(type,arg)
      |                               ^~~~~~~
../../../src/std/db/_mysql.c:5642:17: note: in expansion of macro ‘___CFUN_CAST’
 5642 | #define ___arg3 ___CFUN_CAST(my_bool*,___arg3_voidstar)
      |                 ^~~~~~~~~~~~
../../../src/std/db/_mysql.c:5646:41: note: in expansion of macro ‘___arg3’
 5646 | ffi_mysql_bind_set_null(___arg1,___arg2,___arg3);
      |                                         ^~~~~~~
*** ERROR IN ##main -- target compilation or link failed while compiling "/home/vagrant/langs/gerbil/src/std/db/_mysql.scm"
*** ERROR IN #:loop37266, "misc/concurrent-plan.ss"@93.7 -- Failure to build (ssi: "db/_mysql" (gsc: "db/_mysql" "-cc-options" "" "-ld-options" "-lpthread -lmysqlclient")) "Compilation error; gsc exited with nonzero status 17920\n"
*** ERROR; build failed
@junkerjoe
Copy link
Contributor Author

MYSQL_BIND struct reference for 8.0.21: https://dev.mysql.com/doc/dev/mysql-server/8.0.21/structMYSQL__BIND.html

@junkerjoe
Copy link
Contributor Author

Closing this issue now that it has been resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant