If the MySQL driver is available and --db-driver option was explicitly
specified, assume MySQL and don't compain about multiple DB drivers
being available.
That was a popular request and is likely what most sysbench users want.
The problem with MySQL 5.7+ client libraries was that there was no way
to disable SSL usage from the sysbench command line, because the client
library defaults to MYSQL_OPT_SSL_MODE = SSL_MODE_REQUIRED, even if
--mysql-ssl is not used. So the only way to disable it was disabling SSL
on the server.
Now --mysql-ssl behaves like the --ssl-mode option in MySQL client
utilities. It accepts the following values (with "disabled" being the
default):
disabled, preferred, required, verify_ca, verify_identity.
When sysbench is built With pre-5.6 MySQL client libraries or MariaDB
client libraries, where support for SSL modes is not available,
--mysql-ssl behavior is not affected by this change, i.e. it remains a
boolean variable accepting the on/off values, with "off" being the
default.
Replace hard-coded values for client SSL path names with driver options,
at the same time making it possible to skip those options even when
--mysql-ssl is used.
Fix oltp_common.lua to re-prepare prepared statements after
reconnecting, i.e. if a connection to the server has been lost and one
of the following MySQL errors is in the --mysql-ignore-errors list:
- 2013 (CR_SERVER_LOST)
- 2055 (CR_SERVER_LOST_EXTENDED)
- 2006 (CR_SERVER_GONE_ERROR)
- 2011 (CR_TCP_CONNECTION)