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

Fix build with mysql-connector-c v8.0.18 #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

devurandom
Copy link

This fixes following compilation failure with version 8.0.18 of
mysql-connector-c:

rdf_storage_mysql.c: In function 'librdf_storage_mysql_get_handle':
rdf_storage_mysql.c:450:5: error: unknown type name 'my_bool'; did you mean 'bool'?
  450 |     my_bool value=(context->reconnect) ? 1 : 0;
      |     ^~~~~~~
      |     bool
make[3]: *** [Makefile:886: librdf_storage_mysql_la-rdf_storage_mysql.lo] Error 1

The correct type for calling mysql_options with MYSQL_OPT_RECONNECT
in version 8.0 of the library is bool*:
https://dev.mysql.com/doc/refman/8.0/en/mysql-options.html

See-Also: https://bugs.gentoo.org/692462

This fixes following compilation failure with version 8.0.18 of
mysql-connector-c:
```
rdf_storage_mysql.c: In function 'librdf_storage_mysql_get_handle':
rdf_storage_mysql.c:450:5: error: unknown type name 'my_bool'; did you mean 'bool'?
  450 |     my_bool value=(context->reconnect) ? 1 : 0;
      |     ^~~~~~~
      |     bool
make[3]: *** [Makefile:886: librdf_storage_mysql_la-rdf_storage_mysql.lo] Error 1
```

The correct type for calling `mysql_options` with `MYSQL_OPT_RECONNECT`
in version 8.0 of the library is `bool*`:
https://dev.mysql.com/doc/refman/8.0/en/mysql-options.html

See-Also: https://bugs.gentoo.org/692462
devurandom added a commit to devurandom/gentoo-patches that referenced this pull request Oct 19, 2019
@bodograumann
Copy link

bodograumann commented Feb 17, 2020

I don’t think you can simply replace it like that, because the code must work with mysql-connector-c version 6 and version 8.

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

Successfully merging this pull request may close these issues.

2 participants