|
|
|
|
@ -319,6 +319,7 @@ static char * mysql_thread_variables_names[]= {
|
|
|
|
|
(char *)"connpoll_reset_queue_length",
|
|
|
|
|
(char *)"stats_time_backend_query",
|
|
|
|
|
(char *)"stats_time_query_processor",
|
|
|
|
|
(char *)"query_cache_stores_empty_result",
|
|
|
|
|
NULL
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
@ -432,6 +433,7 @@ MySQL_Threads_Handler::MySQL_Threads_Handler() {
|
|
|
|
|
variables.connpoll_reset_queue_length = 50;
|
|
|
|
|
variables.stats_time_backend_query=false;
|
|
|
|
|
variables.stats_time_query_processor=false;
|
|
|
|
|
variables.query_cache_stores_empty_result=true;
|
|
|
|
|
variables.kill_backend_connection_when_disconnect=true;
|
|
|
|
|
variables.sessions_sort=true;
|
|
|
|
|
#ifdef IDLE_THREADS
|
|
|
|
|
@ -731,6 +733,7 @@ int MySQL_Threads_Handler::get_variable_int(char *name) {
|
|
|
|
|
if (!strcasecmp(name,"connpoll_reset_queue_length")) return (int)variables.connpoll_reset_queue_length;
|
|
|
|
|
if (!strcasecmp(name,"stats_time_backend_query")) return (int)variables.stats_time_backend_query;
|
|
|
|
|
if (!strcasecmp(name,"stats_time_query_processor")) return (int)variables.stats_time_query_processor;
|
|
|
|
|
if (!strcasecmp(name,"query_cache_stores_empty_result")) return (int)variables.query_cache_stores_empty_result;
|
|
|
|
|
if (!strcasecmp(name,"kill_backend_connection_when_disconnect")) return (int)variables.kill_backend_connection_when_disconnect;
|
|
|
|
|
if (!strcasecmp(name,"sessions_sort")) return (int)variables.sessions_sort;
|
|
|
|
|
#ifdef IDLE_THREADS
|
|
|
|
|
@ -1143,6 +1146,9 @@ char * MySQL_Threads_Handler::get_variable(char *name) { // this is the public f
|
|
|
|
|
if (!strcasecmp(name,"stats_time_query_processor")) {
|
|
|
|
|
return strdup((variables.stats_time_query_processor ? "true" : "false"));
|
|
|
|
|
}
|
|
|
|
|
if (!strcasecmp(name,"query_cache_stores_empty_result")) {
|
|
|
|
|
return strdup((variables.query_cache_stores_empty_result ? "true" : "false"));
|
|
|
|
|
}
|
|
|
|
|
if (!strcasecmp(name,"kill_backend_connection_when_disconnect")) {
|
|
|
|
|
return strdup((variables.kill_backend_connection_when_disconnect ? "true" : "false"));
|
|
|
|
|
}
|
|
|
|
|
@ -2182,6 +2188,17 @@ bool MySQL_Threads_Handler::set_variable(char *name, char *value) { // this is t
|
|
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
if (!strcasecmp(name,"query_cache_stores_empty_result")) {
|
|
|
|
|
if (strcasecmp(value,"true")==0 || strcasecmp(value,"1")==0) {
|
|
|
|
|
variables.query_cache_stores_empty_result=true;
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
if (strcasecmp(value,"false")==0 || strcasecmp(value,"0")==0) {
|
|
|
|
|
variables.query_cache_stores_empty_result=false;
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
#ifdef IDLE_THREADS
|
|
|
|
|
if (!strcasecmp(name,"session_idle_show_processlist")) {
|
|
|
|
|
if (strcasecmp(value,"true")==0 || strcasecmp(value,"1")==0) {
|
|
|
|
|
@ -3584,6 +3601,7 @@ void MySQL_Thread::refresh_variables() {
|
|
|
|
|
mysql_thread___query_digests_lowercase=(bool)GloMTH->get_variable_int((char *)"query_digests_lowercase");
|
|
|
|
|
variables.stats_time_backend_query=(bool)GloMTH->get_variable_int((char *)"stats_time_backend_query");
|
|
|
|
|
variables.stats_time_query_processor=(bool)GloMTH->get_variable_int((char *)"stats_time_query_processor");
|
|
|
|
|
variables.query_cache_stores_empty_result=(bool)GloMTH->get_variable_int((char *)"query_cache_stores_empty_result");
|
|
|
|
|
mysql_thread___hostgroup_manager_verbose = GloMTH->get_variable_int((char *)"hostgroup_manager_verbose");
|
|
|
|
|
mysql_thread___kill_backend_connection_when_disconnect=(bool)GloMTH->get_variable_int((char *)"kill_backend_connection_when_disconnect");
|
|
|
|
|
mysql_thread___sessions_sort=(bool)GloMTH->get_variable_int((char *)"sessions_sort");
|
|
|
|
|
@ -3662,6 +3680,7 @@ MySQL_Thread::MySQL_Thread() {
|
|
|
|
|
|
|
|
|
|
variables.stats_time_backend_query=false;
|
|
|
|
|
variables.stats_time_query_processor=false;
|
|
|
|
|
variables.query_cache_stores_empty_result=true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void MySQL_Thread::register_session_connection_handler(MySQL_Session *_sess, bool _new) {
|
|
|
|
|
|