From: Peter van Dijk Date: Tue, 12 Sep 2023 15:09:57 +0000 (+0200) Subject: smysql: stop explicity setting MYSQL_OPT_RECONNECT to 0 X-Git-Tag: rec-5.0.0-alpha2~62^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F13245%2Fhead;p=thirdparty%2Fpdns.git smysql: stop explicity setting MYSQL_OPT_RECONNECT to 0 Setting this option, even to 0, causes spurious warnings to the console with recent libmysqlclient versions. The upstream bug ( https://bugs.mysql.com/bug.php?id=112089 ) has now been open for a month, so we're implementing a workaround. 0 was the default since at least MySQL 5.7, perhaps longer. closes #13242 --- diff --git a/modules/gmysqlbackend/smysql.cc b/modules/gmysqlbackend/smysql.cc index 04518bb5ce..c8a3d880b5 100644 --- a/modules/gmysqlbackend/smysql.cc +++ b/modules/gmysqlbackend/smysql.cc @@ -489,11 +489,6 @@ void SMySQL::connect() do { -#if MYSQL_VERSION_ID >= 50013 - my_bool set_reconnect = 0; - mysql_options(&d_db, MYSQL_OPT_RECONNECT, &set_reconnect); -#endif - #if MYSQL_VERSION_ID >= 50100 if (d_timeout) { mysql_options(&d_db, MYSQL_OPT_READ_TIMEOUT, &d_timeout);