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
MySQL reconnect option is depreciated #317
Comments
Of course please verify how reconnections are handled and/or if handling is needed as this patch would effectively disable the automatic reconnection mechanism. |
Is that built from MySQL or MoriaDB. I'm suspecting MySQL. |
The change came from MySQL (they are no longer offering detailed/split up patches AFAIK). But the problem is that this deprecation sends messages to stderr and this was marked as a MINOR package update in Ubuntu. |
WARNING: MYSQL_OPT_RECONNECT is deprecated and will be removed in a future version.
Resolved this one. |
There is lot's of discussion about 'why' this was done in a minor release with little or no explanation of what customers 'should' do to accommodate for the change. Not a good look for Oracle. |
WARNING: MYSQL_OPT_RECONNECT is deprecated and will be removed in a future version.
Describe the bug
Recent libmysqlclient-packages output an stderr warning when MYSQL_OPT_RECONNECT is used (even if set to false!) that fills up logs and maybe even e-mail messages.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
No STDERR output should be shown.
Possible patch/fix
--- sql.orig.c 2023-09-05 01:57:16.000000000 +0200
+++ sql.c 2023-09-20 23:15:37.933557926 +0200
@@ -277,7 +277,9 @@
MYSQL_SET_OPTION(MYSQL_OPT_READ_TIMEOUT, (int *)&rtimeout, "read timeout");
MYSQL_SET_OPTION(MYSQL_OPT_WRITE_TIMEOUT, (int *)&wtimeout, "write timeout");
MYSQL_SET_OPTION(MYSQL_OPT_CONNECT_TIMEOUT, (int *)&timeout, "general timeout");
#if MYSQL_VERSION_ID >= 50013 && MYSQL_VERSION_ID < 80034
MYSQL_SET_OPTION(MYSQL_OPT_RECONNECT, &reconnect, "reconnect");
#endif
#ifdef HAS_MYSQL_OPT_RETRY_COUNT
MYSQL_SET_OPTION(MYSQL_OPT_RETRY_COUNT, &tries, "retry count");
The text was updated successfully, but these errors were encountered: