]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
auth gmysql: deprecate gmysql-ssl flag, enable connection timeout 13060/head
authorPeter van Dijk <peter.van.dijk@powerdns.com>
Thu, 20 Jul 2023 12:23:02 +0000 (14:23 +0200)
committerPeter van Dijk <peter.van.dijk@powerdns.com>
Tue, 19 Mar 2024 12:11:39 +0000 (13:11 +0100)
closes #12528
closes #12978

docs/backends/generic-mysql.rst
modules/gmysqlbackend/smysql.cc

index 3c86bc9dc067babdaf0db820c8134786da5801b5..5695e9b618e663aa29cfbdc4cdf606dff9887632 100644 (file)
@@ -136,7 +136,11 @@ Use the InnoDB READ-COMMITTED transaction isolation level. Default: yes.
 ``gmysql-ssl``
 ^^^^^^^^^^^^^^^^^^
 
-Send the CLIENT_SSL capability flag to the server. SSL support is announced by the server via CLIENT_SSL and is enabled if the client returns the same capability. Default: no.
+.. deprecated:: 5.0.0
+
+Before 5.0.0: Send the CLIENT_SSL capability flag to the server. SSL support is announced by the server via CLIENT_SSL and is enabled if the client returns the same capability. Default: no.
+
+5.0.0 and up: this option does nothing. Use ``gmysql-group`` and put your TLS settings in ``my.cnf``.
 
 .. _setting-gmysql-timeout:
 
index efcbffd18e451a34fa035be683f1c5c0d38cd110..9a3452eca94eaa000eb159eb6373b46305a3547d 100644 (file)
@@ -493,6 +493,7 @@ void SMySQL::connect()
     if (d_timeout) {
       mysql_options(&d_db, MYSQL_OPT_READ_TIMEOUT, &d_timeout);
       mysql_options(&d_db, MYSQL_OPT_WRITE_TIMEOUT, &d_timeout);
+      mysql_options(&d_db, MYSQL_OPT_CONNECT_TIMEOUT, &d_timeout);
     }
 #endif
 
@@ -507,7 +508,7 @@ void SMySQL::connect()
                             d_database.empty() ? nullptr : d_database.c_str(),
                             d_port,
                             d_msocket.empty() ? nullptr : d_msocket.c_str(),
-                            (d_clientSSL ? CLIENT_SSL : 0) | CLIENT_MULTI_RESULTS)) {
+                            CLIENT_MULTI_RESULTS)) {
 
       if (retry == 0)
         throw sPerrorException("Unable to connect to database");