Skip to content

Commit

Permalink
Merge branch 'v2.x-4335' into v2.x-240118
Browse files Browse the repository at this point in the history
  • Loading branch information
renecannao committed Jan 18, 2024
2 parents e31a571 + d2c8d65 commit 1bc58a0
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 35 deletions.
2 changes: 0 additions & 2 deletions include/MySQL_Thread.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#define SQLITE_HOSTGROUP -4


#define MYSQL_DEFAULT_TX_ISOLATION "READ-COMMITTED"
#define MYSQL_DEFAULT_SESSION_TRACK_GTIDS "OFF"
#define MYSQL_DEFAULT_COLLATION_CONNECTION ""
#define MYSQL_DEFAULT_NET_WRITE_TIMEOUT "60"
Expand Down Expand Up @@ -511,7 +510,6 @@ class MySQL_Threads_Handler
char *init_connect;
char *ldap_user_variable;
char *add_ldap_user_comment;
char *default_tx_isolation;
char *default_session_track_gtids;
char *default_variables[SQL_NAME_LAST_LOW_WM];
char *firewall_whitelist_errormsg;
Expand Down
2 changes: 0 additions & 2 deletions include/proxysql_structs.h
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,6 @@ __thread char *mysql_thread___keep_multiplexing_variables;
__thread char *mysql_thread___default_authentication_plugin;
__thread char *mysql_thread___init_connect;
__thread char *mysql_thread___ldap_user_variable;
__thread char *mysql_thread___default_tx_isolation;
__thread char *mysql_thread___default_session_track_gtids;
__thread char *mysql_thread___firewall_whitelist_errormsg;
__thread int mysql_thread___default_authentication_plugin_int;
Expand Down Expand Up @@ -950,7 +949,6 @@ extern __thread char *mysql_thread___keep_multiplexing_variables;
extern __thread char *mysql_thread___default_authentication_plugin;
extern __thread char *mysql_thread___init_connect;
extern __thread char *mysql_thread___ldap_user_variable;
extern __thread char *mysql_thread___default_tx_isolation;
extern __thread char *mysql_thread___default_session_track_gtids;
extern __thread char *mysql_thread___firewall_whitelist_errormsg;
extern __thread int mysql_thread___default_authentication_plugin_int;
Expand Down
31 changes: 0 additions & 31 deletions lib/MySQL_Thread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,6 @@ static char * mysql_thread_variables_names[]= {
(char *)"init_connect",
(char *)"ldap_user_variable",
(char *)"add_ldap_user_comment",
(char *)"default_tx_isolation",
(char *)"default_session_track_gtids",
(char *)"connpoll_reset_queue_length",
(char *)"min_num_servers_lantency_awareness",
Expand Down Expand Up @@ -987,7 +986,6 @@ MySQL_Threads_Handler::MySQL_Threads_Handler() {
for (int i=0; i<SQL_NAME_LAST_LOW_WM; i++) {
variables.default_variables[i]=strdup(mysql_tracked_variables[i].default_value);
}
variables.default_tx_isolation=strdup((char *)MYSQL_DEFAULT_TX_ISOLATION);
variables.default_session_track_gtids=strdup((char *)MYSQL_DEFAULT_SESSION_TRACK_GTIDS);
variables.ping_interval_server_msec=10000;
variables.ping_timeout_server=200;
Expand Down Expand Up @@ -1251,12 +1249,6 @@ char * MySQL_Threads_Handler::get_variable_string(char *name) {
return strdup(variables.default_variables[i]);
}
}
if (!strcmp(name,"default_tx_isolation")) {
if (variables.default_tx_isolation==NULL) {
variables.default_tx_isolation=strdup((char *)MYSQL_DEFAULT_TX_ISOLATION);
}
return strdup(variables.default_tx_isolation);
}
if (!strcmp(name,"default_session_track_gtids")) {
if (variables.default_session_track_gtids==NULL) {
variables.default_session_track_gtids=strdup((char *)MYSQL_DEFAULT_SESSION_TRACK_GTIDS);
Expand Down Expand Up @@ -1373,12 +1365,6 @@ char * MySQL_Threads_Handler::get_variable(char *name) { // this is the public f
return strdup(variables.add_ldap_user_comment);
}
}
if (!strcasecmp(name,"default_tx_isolation")) {
if (variables.default_tx_isolation==NULL) {
variables.default_tx_isolation=strdup((char *)MYSQL_DEFAULT_TX_ISOLATION);
}
return strdup(variables.default_tx_isolation);
}
if (!strcasecmp(name,"default_session_track_gtids")) {
if (variables.default_session_track_gtids==NULL) {
variables.default_session_track_gtids=strdup((char *)MYSQL_DEFAULT_SESSION_TRACK_GTIDS);
Expand Down Expand Up @@ -1709,19 +1695,6 @@ bool MySQL_Threads_Handler::set_variable(char *name, const char *value) { // thi
return true;
}

if (!strcasecmp(name,"default_tx_isolation")) {
if (variables.default_tx_isolation) free(variables.default_tx_isolation);
variables.default_tx_isolation=NULL;
if (vallen) {
if (strcmp(value,"(null)"))
variables.default_tx_isolation=strdup(value);
}
if (variables.default_tx_isolation==NULL) {
variables.default_tx_isolation=strdup((char *)MYSQL_DEFAULT_TX_ISOLATION); // default
}
return true;
}

if (!strcasecmp(name,"default_session_track_gtids")) {
if (variables.default_session_track_gtids) free(variables.default_session_track_gtids);
variables.default_session_track_gtids=NULL;
Expand Down Expand Up @@ -2558,7 +2531,6 @@ MySQL_Threads_Handler::~MySQL_Threads_Handler() {
if (variables.init_connect) free(variables.init_connect);
if (variables.ldap_user_variable) free(variables.ldap_user_variable);
if (variables.add_ldap_user_comment) free(variables.add_ldap_user_comment);
if (variables.default_tx_isolation) free(variables.default_tx_isolation);
if (variables.default_session_track_gtids) free(variables.default_session_track_gtids);
if (variables.eventslog_filename) free(variables.eventslog_filename);
if (variables.auditlog_filename) free(variables.auditlog_filename);
Expand Down Expand Up @@ -2690,7 +2662,6 @@ MySQL_Thread::~MySQL_Thread() {
if (mysql_thread___init_connect) { free(mysql_thread___init_connect); mysql_thread___init_connect=NULL; }
if (mysql_thread___ldap_user_variable) { free(mysql_thread___ldap_user_variable); mysql_thread___ldap_user_variable=NULL; }
if (mysql_thread___add_ldap_user_comment) { free(mysql_thread___add_ldap_user_comment); mysql_thread___add_ldap_user_comment=NULL; }
if (mysql_thread___default_tx_isolation) { free(mysql_thread___default_tx_isolation); mysql_thread___default_tx_isolation=NULL; }
if (mysql_thread___default_session_track_gtids) { free(mysql_thread___default_session_track_gtids); mysql_thread___default_session_track_gtids=NULL; }

for (int i=0; i<SQL_NAME_LAST_LOW_WM; i++) {
Expand Down Expand Up @@ -3985,8 +3956,6 @@ void MySQL_Thread::refresh_variables() {
mysql_thread___ldap_user_variable=GloMTH->get_variable_string((char *)"ldap_user_variable");
if (mysql_thread___add_ldap_user_comment) free(mysql_thread___add_ldap_user_comment);
mysql_thread___add_ldap_user_comment=GloMTH->get_variable_string((char *)"add_ldap_user_comment");
if (mysql_thread___default_tx_isolation) free(mysql_thread___default_tx_isolation);
mysql_thread___default_tx_isolation=GloMTH->get_variable_string((char *)"default_tx_isolation");
if (mysql_thread___default_session_track_gtids) free(mysql_thread___default_session_track_gtids);
mysql_thread___default_session_track_gtids=GloMTH->get_variable_string((char *)"default_session_track_gtids");

Expand Down

0 comments on commit 1bc58a0

Please sign in to comment.