MXS-3158 Preserve character set and collation when altering events
During switchover/failover, server events are altered. The ALTER EVENT command automatically modifies the event charset and collation to the values of the connetion running the query. This may cause the event to become invalid. Fixed this by changing connection charset and collation to the ones in the event description just before altering it.
This commit is contained in:
@ -1162,6 +1162,7 @@ Monitor::ping_or_connect_to_db(const MonitorServer::ConnectionSettings& sett, SE
|
||||
mysql_optionsv(pConn, MYSQL_OPT_READ_TIMEOUT, &sett.read_timeout);
|
||||
mysql_optionsv(pConn, MYSQL_OPT_WRITE_TIMEOUT, &sett.write_timeout);
|
||||
mysql_optionsv(pConn, MYSQL_PLUGIN_DIR, get_connector_plugindir());
|
||||
mysql_optionsv(pConn, MARIADB_OPT_MULTI_STATEMENTS, nullptr);
|
||||
time_t start = time(NULL);
|
||||
|
||||
if (mxs_mysql_real_connect(pConn, &server, uname.c_str(), dpwd))
|
||||
|
||||
Reference in New Issue
Block a user