MXS-3324 Enable autocommit when using Connector-C

May solve some monitor issues on servers with default autocommit
set to off.
This commit is contained in:
Esa Korhonen 2020-12-10 14:36:28 +02:00
parent 7771f67a5f
commit 7e6eb55618

View File

@ -70,6 +70,7 @@ MYSQL* mxs_mysql_real_connect(MYSQL* con, SERVER* server, const char* user, cons
char yes = 1;
mysql_optionsv(con, MYSQL_OPT_RECONNECT, &yes);
mysql_optionsv(con, MYSQL_INIT_COMMAND, "SET SQL_MODE=''");
mysql_optionsv(con, MYSQL_INIT_COMMAND, "SET @@session.autocommit=1;");
MXS_CONFIG* config = config_get_global_options();