From 84fd2f57b51cace8e21792e72bcf9c8e065183de Mon Sep 17 00:00:00 2001 From: Peter van Dijk Date: Tue, 12 Sep 2023 17:09:57 +0200 Subject: [PATCH] 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 (cherry picked from commit f1cbc20b72ab95531f0a84bab40ac6ea1610241f) --- modules/gmysqlbackend/smysql.cc | 5 ----- 1 file changed, 5 deletions(-) diff --git a/modules/gmysqlbackend/smysql.cc b/modules/gmysqlbackend/smysql.cc index 8b3c80bbc5562..678f855b4b655 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);