-
Notifications
You must be signed in to change notification settings - Fork 17
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 support for MySQL 8.0 #192
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Member
pali
commented
Aug 21, 2023
- Add new versions for testing on Github Actions CI
- Do not use MYSQL_OPT_RECONNECT for MySQL 8.0.34+ clients
- MySQL 8.0.20 client library has fixed reinitialization bug
- Fix MariaDB server version check in t/40server_prepare.t test
- Skip t/rt122541-decimals.t test for MySQL 8.0.22+ server versions
- Add new DECIMAL testcase into t/rt122541-decimals.t
- accept 4031 as a valid return code when connection closed
Beginning with MySQL 8.0.34, the automatic reconnection feature is deprecated and disabled by default. When MYSQL_OPT_RECONNECT is used then client prints to stderr message: WARNING: MYSQL_OPT_RECONNECT is deprecated and will be removed in a future version. Fixes: perl5-dbi#191
Adjust workaround for affected MySQL client versions which prevents cleaning up of MySQL client resources. See: https://bugs.mysql.com/bug.php?id=93276
Distinguish between MariaDB and MySQL servers by DBI's get_info(SQL_DBMS_NAME) call.
Unfortunately it looks like that MySQL 8.0.22+ server versions have broken SQL ROUND() function, it returns incorrect number of rounded decimals in column metadata information, which DBD::MariaDB uses internally for converting returned value via MySQL network protocol to Perl scalar. Skip this tests for affected MySQL server versions until we figure out what to do with this test case. This at least allows to install DBD::MariaDB with enabled tests during install phase. See: perl5-dbi#160
Add a new test case with CAST AS DECIMAL which verifies that support for trailing zeros in decimal numbers is working in Perl. This test case works also with new MySQL server versions 8.0.22+ but on the other hand it does not work with older MySQL client or server versions.
As of 8.0.24 MySQL writes the reason the connection was closed before closing it, so 4031 (ER_CLIENT_INTERACTION_TIMEOUT) is now an valid return code. See https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-24.html#mysqld-8-0-24-connection-management for more information. This addresses the issue reported in perl5-dbi/DBD-mysql#329
@choroba could you look at this PR? |
choroba
approved these changes
Sep 6, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.