|
|
|
|
@ -237,6 +237,7 @@ static char * mysql_thread_variables_names[]= {
|
|
|
|
|
(char *)"max_transaction_time",
|
|
|
|
|
(char *)"multiplexing",
|
|
|
|
|
// (char *)"stmt_multiplexing",
|
|
|
|
|
(char *)"forward_autocommit",
|
|
|
|
|
(char *)"enforce_autocommit_on_reads",
|
|
|
|
|
(char *)"threshold_query_length",
|
|
|
|
|
(char *)"threshold_resultset_size",
|
|
|
|
|
@ -358,6 +359,7 @@ MySQL_Threads_Handler::MySQL_Threads_Handler() {
|
|
|
|
|
variables.commands_stats=true;
|
|
|
|
|
variables.multiplexing=true;
|
|
|
|
|
// variables.stmt_multiplexing=false;
|
|
|
|
|
variables.forward_autocommit=false;
|
|
|
|
|
variables.enforce_autocommit_on_reads=false;
|
|
|
|
|
variables.query_digests=true;
|
|
|
|
|
variables.query_digests_lowercase=false;
|
|
|
|
|
@ -580,6 +582,7 @@ int MySQL_Threads_Handler::get_variable_int(char *name) {
|
|
|
|
|
if (!strcasecmp(name,"client_found_rows")) return (int)variables.client_found_rows;
|
|
|
|
|
if (!strcasecmp(name,"multiplexing")) return (int)variables.multiplexing;
|
|
|
|
|
// if (!strcasecmp(name,"stmt_multiplexing")) return (int)variables.stmt_multiplexing;
|
|
|
|
|
if (!strcasecmp(name,"forward_autocommit")) return (int)variables.forward_autocommit;
|
|
|
|
|
if (!strcasecmp(name,"enforce_autocommit_on_reads")) return (int)variables.enforce_autocommit_on_reads;
|
|
|
|
|
if (!strcasecmp(name,"commands_stats")) return (int)variables.commands_stats;
|
|
|
|
|
if (!strcasecmp(name,"query_digests")) return (int)variables.query_digests;
|
|
|
|
|
@ -861,6 +864,9 @@ char * MySQL_Threads_Handler::get_variable(char *name) { // this is the public f
|
|
|
|
|
// if (!strcasecmp(name,"stmt_multiplexing")) {
|
|
|
|
|
// return strdup((variables.stmt_multiplexing ? "true" : "false"));
|
|
|
|
|
// }
|
|
|
|
|
if (!strcasecmp(name,"forward_autocommit")) {
|
|
|
|
|
return strdup((variables.forward_autocommit ? "true" : "false"));
|
|
|
|
|
}
|
|
|
|
|
if (!strcasecmp(name,"enforce_autocommit_on_reads")) {
|
|
|
|
|
return strdup((variables.enforce_autocommit_on_reads ? "true" : "false"));
|
|
|
|
|
}
|
|
|
|
|
@ -1526,6 +1532,17 @@ bool MySQL_Threads_Handler::set_variable(char *name, char *value) { // this is t
|
|
|
|
|
// }
|
|
|
|
|
// return false;
|
|
|
|
|
// }
|
|
|
|
|
if (!strcasecmp(name,"forward_autocommit")) {
|
|
|
|
|
if (strcasecmp(value,"true")==0 || strcasecmp(value,"1")==0) {
|
|
|
|
|
variables.forward_autocommit=true;
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
if (strcasecmp(value,"false")==0 || strcasecmp(value,"0")==0) {
|
|
|
|
|
variables.forward_autocommit=false;
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
if (!strcasecmp(name,"enforce_autocommit_on_reads")) {
|
|
|
|
|
if (strcasecmp(value,"true")==0 || strcasecmp(value,"1")==0) {
|
|
|
|
|
variables.enforce_autocommit_on_reads=true;
|
|
|
|
|
@ -2810,6 +2827,7 @@ void MySQL_Thread::refresh_variables() {
|
|
|
|
|
mysql_thread___client_found_rows=(bool)GloMTH->get_variable_int((char *)"client_found_rows");
|
|
|
|
|
mysql_thread___multiplexing=(bool)GloMTH->get_variable_int((char *)"multiplexing");
|
|
|
|
|
// mysql_thread___stmt_multiplexing=(bool)GloMTH->get_variable_int((char *)"stmt_multiplexing");
|
|
|
|
|
mysql_thread___forward_autocommit=(bool)GloMTH->get_variable_int((char *)"forward_autocommit");
|
|
|
|
|
mysql_thread___enforce_autocommit_on_reads=(bool)GloMTH->get_variable_int((char *)"enforce_autocommit_on_reads");
|
|
|
|
|
mysql_thread___commands_stats=(bool)GloMTH->get_variable_int((char *)"commands_stats");
|
|
|
|
|
mysql_thread___query_digests=(bool)GloMTH->get_variable_int((char *)"query_digests");
|
|
|
|
|
|