Skip to content

Commit

Permalink
Bug fix #1007
Browse files Browse the repository at this point in the history
Suppressing annoying errors about debug version
  • Loading branch information
renecannao committed Jun 6, 2017
1 parent 11528e3 commit d052e8b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
2 changes: 2 additions & 0 deletions lib/MySQL_Thread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,9 @@ static char * mysql_thread_variables_names[]= {
(char *)"query_digests_lowercase",
(char *)"servers_stats",
(char *)"default_reconnect",
#ifdef DEBUG
(char *)"session_debug",
#endif /* DEBUG */
(char *)"ssl_p2s_ca",
(char *)"ssl_p2s_cert",
(char *)"ssl_p2s_key",
Expand Down
14 changes: 12 additions & 2 deletions lib/ProxySQL_Admin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2865,7 +2865,12 @@ void ProxySQL_Admin::flush_admin_variables___database_to_runtime(SQLite3DB *db,
db->execute(q);
free(val);
} else {
proxy_warning("Impossible to set not existing variable %s with value \"%s\". Deleting. If the variable name is correct, this version doesn't support it\n", r->fields[0],r->fields[1]);
if (strcmp(r->fields[0],(char *)"debug")==0) {
sprintf(q,"DELETE FROM disk.global_variables WHERE variable_name=\"admin-%s\"",r->fields[0]);
db->execute(q);
} else {
proxy_warning("Impossible to set not existing variable %s with value \"%s\". Deleting. If the variable name is correct, this version doesn't support it\n", r->fields[0],r->fields[1]);
}
sprintf(q,"DELETE FROM global_variables WHERE variable_name=\"admin-%s\"",r->fields[0]);
db->execute(q);
}
Expand Down Expand Up @@ -2909,7 +2914,12 @@ void ProxySQL_Admin::flush_mysql_variables___database_to_runtime(SQLite3DB *db,
}
free(val);
} else {
proxy_warning("Impossible to set not existing variable %s with value \"%s\". Deleting. If the variable name is correct, this version doesn't support it\n", r->fields[0],r->fields[1]);
if (strcmp(r->fields[0],(char *)"session_debug")==0) {
sprintf(q,"DELETE FROM disk.global_variables WHERE variable_name=\"mysql-%s\"",r->fields[0]);
db->execute(q);
} else {
proxy_warning("Impossible to set not existing variable %s with value \"%s\". Deleting. If the variable name is correct, this version doesn't support it\n", r->fields[0],r->fields[1]);
}
sprintf(q,"DELETE FROM global_variables WHERE variable_name=\"mysql-%s\"",r->fields[0]);
db->execute(q);
}
Expand Down

0 comments on commit d052e8b

Please sign in to comment.