Description
At the moment mysql-client have following defined:
#if ((MYSQL_VERSION_ID >= 50555 && MYSQL_VERSION_ID <= 50599) || \
(MYSQL_VERSION_ID >= 50636 && MYSQL_VERSION_ID <= 50699) || \
(MYSQL_VERSION_ID >= 50711 && MYSQL_VERSION_ID <= 50799) || \
(MYSQL_VERSION_ID >= 80000)) && \
!defined(MARIADB_BASE_VERSION) && !defined(MARIADB_VERSION_ID)
#define HAVE_ENUM_MYSQL_OPT_SSL_MODE
#endif
meaning, that it will accept ssl_mode
argument only in the case of MySQL, but not in the case of MariaDB. This is pretty odd, because even though MariaDB does not support the sophisticated ssl_mode
argument as MySQL does, it still allows some SSL tweaking:
-
MYSQL_OPT_SSL_VERIFY_SERVER_CERT: Enables (or disables) server certificate verification
-
MYSQL_OPT_SSL_ENFORCE: Whether to force TLS. This enables TLS with the default system settings. It does not prevent the connection from being created if the server does not support TLS.
See more: https://mariadb.com/kb/en/mysql_optionsv/
So, seems logical for me to do is to allow the same ssl_mode option for MariaDB, but inside of mysqlclient handle it accordingly. So for the lib user, the interface would remain the same.