Skip to content

Commit

Permalink
Merge pull request #4429 from sysown/v2.x-4335
Browse files Browse the repository at this point in the history
Deprecate mysql-default_tx_isolation #4335
  • Loading branch information
renecannao authored Jan 23, 2024
2 parents 3c36711 + 33a5df2 commit 06844ed
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 37 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 @@ -509,7 +508,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 @@ -778,7 +778,6 @@ __thread char *mysql_thread___server_version;
__thread char *mysql_thread___keep_multiplexing_variables;
__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___max_allowed_packet;
Expand Down Expand Up @@ -947,7 +946,6 @@ extern __thread char *mysql_thread___server_version;
extern __thread char *mysql_thread___keep_multiplexing_variables;
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___max_allowed_packet;
Expand Down
31 changes: 0 additions & 31 deletions lib/MySQL_Thread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,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 @@ -986,7 +985,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 @@ -1248,12 +1246,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 @@ -1369,12 +1361,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 @@ -1704,19 +1690,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 @@ -2533,7 +2506,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 @@ -2664,7 +2636,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 @@ -3959,8 +3930,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
1 change: 0 additions & 1 deletion test/tap/tests/proxysql_reference_select_config_file.cnf
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ mysql_variables =
default_sql_select_limit="mysql"
default_time_zone="mysql"
default_transaction_read="mysql"
default_tx_isolation="mysql"
default_wsrep_sync_wait="mysql"
enforce_autocommit_on_reads="mysql"
eventslog_default_log="mysql"
Expand Down
1 change: 0 additions & 1 deletion test/tap/tests/test_cluster_sync-t.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2323,7 +2323,6 @@ int main(int, char**) {
std::make_tuple("mysql-init_connect" , "" ),
std::make_tuple("mysql-ldap_user_variable" , "" ),
std::make_tuple("mysql-add_ldap_user_comment" , "" ),
std::make_tuple("mysql-default_tx_isolation" , "READ-COMMITTED" ),
std::make_tuple("mysql-default_session_track_gtids" , "OFF" ),
std::make_tuple("mysql-connpoll_reset_queue_length" , "50" ),
std::make_tuple("mysql-min_num_servers_lantency_awareness" , "1000" ),
Expand Down

0 comments on commit 06844ed

Please sign in to comment.