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

issue-571: attemped to replace my_bool with c99 bool for mysql bindings #572

Merged

Conversation

junkerjoe
Copy link
Contributor

This fix is in reference to #571

I'm not well versed in C, but decided to take a try at resolving this.

@fare
Copy link
Collaborator

fare commented Sep 9, 2020

LGTM. Did you test running it?

Copy link
Collaborator

@vyzo vyzo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM overall. My only concern is what happens with old mysqlclient versions who still use my_bool, will it still work?
If not we might have to add some conditional expansion trickery.

@junkerjoe
Copy link
Contributor Author

junkerjoe commented Sep 10, 2020

At this point I've tried compiling Gerbil and making a few basic queries through Gerbil's MySQL driver with the following environments:

  • Ubuntu 20.04.1 with MySQL 8.0.21
  • Ubuntu 16.04.7 with MySQL 5.7.31 (pre-my_bool patch)

Both seem to work, however I didn't make a lot of queries to test with. When compiling under MySQL 5.7.31, I get the following compiler warning that is relevant to the changes made:

[*] Building gerbil stdlib
... compile foreign db/_mysql
../../../src/std/db/_mysql.c: In function ‘ffi_mysql_bind_set_null’:
../../../src/std/db/_mysql.c:2036:20: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types]
  mybind[k].is_null = is_null;
                    ^

Other than that, things seem to work with a very basic level of testing done.

@fare fare merged commit da387c9 into mighty-gerbils:master Sep 10, 2020
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.

3 participants