Skip to content

Conversation

vtermanis
Copy link

I noticed that it would appear arguments for some mysql_options calls are not being passed as documented in that they are absolute values rather than references! I noticed this from gcc warnings, e.g.:

src/mysql_capi.c: In function ‘MySQL_connect’:
src/mysql_capi.c:1118:63: warning: passing argument 3 of ‘mysql_options’ makes pointer from integer without a cast [-Wint-conversion]
             mysql_options(&self->session, MYSQL_OPT_SSL_MODE, SSL_MODE_REQUIRED);

Additionally, SSL_MODE_DISABLED is being used as an argument for MYSQL_OPT_SSL_ENFORCE, where it appears it should actually be MYSQL_OPT_SSL_MODE.

@mysql-oca-bot
Copy link

Hi, thank you for your contribution. Please confirm this code is submitted under the terms of the OCA (Oracle's Contribution Agreement) you have previously signed by cutting and pasting the following text as a comment:
"I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it."
Thanks

- MYSQL_OPT_SSL_MODE should receive argument as reference
- SSL_MODE_DISABLED must be used with MYSQL_OPT_SSL_MODE, not MYSQL_OPT_SSL_ENFORCE
- Removed debug printf statement
@vtermanis vtermanis force-pushed the mysql_op_ssl_mode_ref branch from f52febc to d6fffbf Compare October 10, 2016 14:26
@vtermanis
Copy link
Author

I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.

@mysql-oca-bot
Copy link

Hi, thank you for your contribution. Your code has been assigned to an internal queue. Please follow
bug http://bugs.mysql.com/bug.php?id=83338 for updates.
Thanks

@vtermanis vtermanis deleted the mysql_op_ssl_mode_ref branch October 16, 2016 08:39
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