Fix for bug #1160 : reset time_zone

pull/1169/head
René Cannaò 9 years ago
parent 1bb87b584d
commit 0598c0d0af

@ -961,7 +961,7 @@ bool MySQL_Session::handler_again___verify_backend_sql_mode() {
bool MySQL_Session::handler_again___verify_backend_time_zone() {
if (mybe->server_myds->myconn->options.time_zone_int==0) {
// it is the first time we use this backend. Set time_zone to default
if (mybe->server_myds->myconn->options.time_zone==NULL) {
if (mybe->server_myds->myconn->options.time_zone) {
free(mybe->server_myds->myconn->options.time_zone);
mybe->server_myds->myconn->options.time_zone=NULL;
}

@ -1665,6 +1665,11 @@ void MySQL_Connection::reset() {
free(options.sql_mode);
options.sql_mode = NULL;
}
options.time_zone_int = 0;
if (options.time_zone) {
free(options.time_zone);
options.time_zone = NULL;
}
}
delete local_stmts;
#ifndef PROXYSQL_STMT_V14

Loading…
Cancel
Save