Skip to content

Conversation

grooverdan
Copy link
Contributor

my_global.h wasn't intended as a client library consumable header. MySQL-8.0 removes it.

MY_CHARSET_INFO was a usable alternate over using the server side definition of CHARSET_INFO

With a few minor changes, MySQL-5.6 -> MySQL-8.0 all compile with these changes.

Combined with the extended test suite of #6126, results in https://travis-ci.org/github/grooverdan/php-src/jobs/726727625

Tested with:
* mysql-5.6.49-linux-glibc2.12-x86_64
* mysql-5.7.31-linux-glibc2.12-x86_64
* mysql-8.0.21-linux-glibc2.17-x86_64
* mariadb-10.5.6

configure --with-mysqli=/usr/local/$version/bin/mysql_config   --with-pdo-mysql=/usr/local/$version

MySQL-8.0 removed my_bool
Some options where deprecated in mysql-8.0

MY_CHARSET_INFO used with exposed api mysql_get_character_set_info
rather than internal structures.
MySQL-8.0 removes option MYSQLI_OPT_SSL_VERIFY_SERVER_CERT
The mysqlclient_r library exists in mysql-5.6 for compatibility only.

Later versions have it removed.
Copy link
Member

@nikic nikic left a comment

Choose a reason for hiding this comment

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

This looks good to me. The >= 80000 < 100000 checks are not great and might be better replaced by some configure detection, but let's go with it for now.

@nikic
Copy link
Member

nikic commented Sep 17, 2020

I've merged these changes into PHP-7.3 and up. I've also applied an additional fix (e7f98f8) to get things to build on master as well.

@nikic nikic closed this Sep 17, 2020
@grooverdan
Copy link
Contributor Author

Thanks @nikic .

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