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

As of MySQL 8.0.34 and 8.1.0 's libmysqlclients deprecates MYSQL_OPT_RECONNECT #191

Closed
mroemer opened this issue Aug 16, 2023 · 2 comments
Closed

Comments

@mroemer
Copy link

mroemer commented Aug 16, 2023

Since Ubuntu rolled out libmysqlclient21 8.0.34-0ubuntu0.22.04.1, a warning is thown everytime DBD::MariaDB connects: WARNING: MYSQL_OPT_RECONNECT is deprecated and will be removed in a future version.

This is due to the deprecation of MYSQL_OPT_RECONNECT, which is only used at:

DBD-MariaDB/dbdimp.c

Lines 2364 to 2371 in e81937d

#if MYSQL_VERSION_ID >= 50013
{
my_bool reconnect = FALSE;
mysql_options(sock, MYSQL_OPT_RECONNECT, &reconnect);
}
#else
sock->reconnect = FALSE;
#endif

See perl5-dbi/DBD-mysql#354

Copied from there:

The MySQL client library currently supports performing an automatic reconnection to the server if it finds that the connection is down and an application attempts to send a statement to the server to be executed. Now, this feature is deprecated and subject to removal in a future release of MySQL.

The related MYSQL_OPT_RECONNECT option is still available but it is also deprecated. C API functions mysql_get_option() and mysql_options() now write a deprecation warning to the standard error output when an application specifies MYSQL_OPT_RECONNECT. (WL #15766)

https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-34.html#mysqld-8-0-34-deprecation-removal
https://dev.mysql.com/doc/relnotes/mysql/8.1/en/news-8-1-0.html#mysqld-8-1-0-deprecation-removal

@pali
Copy link
Member

pali commented Aug 16, 2023

I'm already watching the linked DBD-mysql issue. I'm planning to prepare DBD-MariaDB patches for fixing MySQL 8.x compatibility. This one is issue to fix/workaround. But the issue #160 is harder and I do not know what to do with it...

@pali
Copy link
Member

pali commented Aug 21, 2023

Fix for this issue is ready in pull request: #192

@pali pali closed this as completed in c3da544 Sep 6, 2023
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this issue Apr 2, 2024
Upstream changes:
1.23 2023-09-10
 - Add a missing break
   (perl5-dbi/DBD-MariaDB#163)
 - Signal error if mariadb_db_async_result() fails
   (perl5-dbi/DBD-MariaDB#162)
 - Update links to project website, issues and years
 - Fix compilation with some MariaDB client library 10.2 and 10.3 versions
 - Fix mariadb_use_result attribute
   (perl5-dbi/DBD-MariaDB#173)
 - Fix statements with multiple result sets in asynchronous mode
 - Fix mariadb_sockfd attribute for Windows
 - Croaks when changing AutoCommit attribute fails
   (perl5-dbi/dbi#104)
 - Various documentation and tests fixes
 - Fix support for MariaDB Connector/C prior to 3.1.3 version
 - Fix usage of Win32::GetShortPathName() in Makefile.PL
 - Build release tarball in TAR format (instead of PAX)
 - Allow to query and change mariadb_multi_statements attribute
 - Add connect option mariadb_auth_plugin for specifying auth plugin
 - Fix support for MySQL 8.0+ client library
   (perl5-dbi/DBD-MariaDB#191)
   (perl5-dbi/DBD-mysql#329)
 - Add Github Actions CI and Cirrus CI (FreeBSD) for automated testing

1.22 2022-04-22
 - Disable usage of libmysqld.a from MySQL 8.x series
 - Install README.pod into DBD/MariaDB/ subdirectory
   (perl5-dbi/DBD-MariaDB#146)
 - Do not export driver private C functions
 - Fix typo in error message
 - Fix compatibility with new MariaDB client and server versions
   (perl5-dbi/DBD-MariaDB#164)
   (perl5-dbi/DBD-MariaDB#167)
   (perl5-dbi/DBD-mysql#333)
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

No branches or pull requests

2 participants