Skip to content

Commit

Permalink
Merge pull request #13060 from Habbie/mariadb-ssl
Browse files Browse the repository at this point in the history
auth gmysql: modernise implementation of gmysql-ssl flag
  • Loading branch information
Habbie committed Mar 19, 2024
2 parents e38d6ec + 5584d3b commit f21dbba
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion docs/backends/generic-mysql.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
3 changes: 2 additions & 1 deletion modules/gmysqlbackend/smysql.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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");
Expand Down

0 comments on commit f21dbba

Please sign in to comment.