From d2c8d655a887ed191b4a381ac86f1379692d9616 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Canna=C3=B2?= Date: Thu, 18 Jan 2024 04:44:11 +0000 Subject: [PATCH 1/2] Deprecate mysql-default_tx_isolation #4335 Variable mysql-default_tx_isolation is unused. --- include/MySQL_Thread.h | 2 -- include/proxysql_structs.h | 2 -- lib/MySQL_Thread.cpp | 31 ------------------------------- 3 files changed, 35 deletions(-) diff --git a/include/MySQL_Thread.h b/include/MySQL_Thread.h index e1915a549a..721926ee0d 100644 --- a/include/MySQL_Thread.h +++ b/include/MySQL_Thread.h @@ -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" @@ -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; diff --git a/include/proxysql_structs.h b/include/proxysql_structs.h index 67205cbb09..97080cad67 100644 --- a/include/proxysql_structs.h +++ b/include/proxysql_structs.h @@ -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; @@ -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; diff --git a/lib/MySQL_Thread.cpp b/lib/MySQL_Thread.cpp index 945ebe332f..c3d4345d0e 100644 --- a/lib/MySQL_Thread.cpp +++ b/lib/MySQL_Thread.cpp @@ -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", @@ -986,7 +985,6 @@ MySQL_Threads_Handler::MySQL_Threads_Handler() { for (int i=0; iget_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"); From 33a5df27ddafd632abdec1227c197abd568f882d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Canna=C3=B2?= Date: Fri, 19 Jan 2024 01:20:39 +0000 Subject: [PATCH 2/2] Fixing tap test after deprecating mysql-default_tx_isolation --- test/tap/tests/proxysql_reference_select_config_file.cnf | 1 - test/tap/tests/test_cluster_sync-t.cpp | 1 - 2 files changed, 2 deletions(-) diff --git a/test/tap/tests/proxysql_reference_select_config_file.cnf b/test/tap/tests/proxysql_reference_select_config_file.cnf index b65de997b9..811fe356aa 100644 --- a/test/tap/tests/proxysql_reference_select_config_file.cnf +++ b/test/tap/tests/proxysql_reference_select_config_file.cnf @@ -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" diff --git a/test/tap/tests/test_cluster_sync-t.cpp b/test/tap/tests/test_cluster_sync-t.cpp index 6b79383cb4..253247b43d 100644 --- a/test/tap/tests/test_cluster_sync-t.cpp +++ b/test/tap/tests/test_cluster_sync-t.cpp @@ -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" ),