summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2014-09-03 20:16:13 +0200
committerSergei Golubchik <serg@mariadb.org>2014-10-10 22:27:42 +0200
commitbeb2422ad8084839294e4c79c227cf0f1eec8244 (patch)
treebeedae1320b88f9b00e037da8fbde138fe06a053
parent15623fd7bb309cf472fddc806793f88df2caa1cc (diff)
downloadmariadb-git-beb2422ad8084839294e4c79c227cf0f1eec8244.tar.gz
cleanup: @@mutex_deadlock_detector -> @@debug_mutex_deadlock_detector
-rw-r--r--mysql-test/include/have_mutex_deadlock_detector.inc7
-rw-r--r--mysql-test/r/have_mutex_deadlock_detector.require2
-rw-r--r--mysql-test/suite/sys_vars/r/debug_mutex_deadlock_detector_basic.result21
-rw-r--r--mysql-test/suite/sys_vars/r/mutex_deadlock_detector_basic.result21
-rw-r--r--mysql-test/suite/sys_vars/t/debug_mutex_deadlock_detector_basic.test (renamed from mysql-test/suite/sys_vars/t/mutex_deadlock_detector_basic.test)16
-rw-r--r--sql/sys_vars.cc2
6 files changed, 33 insertions, 36 deletions
diff --git a/mysql-test/include/have_mutex_deadlock_detector.inc b/mysql-test/include/have_mutex_deadlock_detector.inc
index 3672f3eccef..88a7484a3e8 100644
--- a/mysql-test/include/have_mutex_deadlock_detector.inc
+++ b/mysql-test/include/have_mutex_deadlock_detector.inc
@@ -1,4 +1,3 @@
---require r/have_mutex_deadlock_detector.require
-disable_query_log;
-select 1 from information_schema.global_variables where variable_name = "mutex_deadlock_detector";
-enable_query_log;
+if (`select count(*)=0 from information_schema.global_variables where variable_name = "debug_mutex_deadlock_detector"`) {
+ skip needs safemutex deadlock detector;
+}
diff --git a/mysql-test/r/have_mutex_deadlock_detector.require b/mysql-test/r/have_mutex_deadlock_detector.require
deleted file mode 100644
index 6ed281c757a..00000000000
--- a/mysql-test/r/have_mutex_deadlock_detector.require
+++ /dev/null
@@ -1,2 +0,0 @@
-1
-1
diff --git a/mysql-test/suite/sys_vars/r/debug_mutex_deadlock_detector_basic.result b/mysql-test/suite/sys_vars/r/debug_mutex_deadlock_detector_basic.result
new file mode 100644
index 00000000000..b438df8e6e2
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/debug_mutex_deadlock_detector_basic.result
@@ -0,0 +1,21 @@
+select @@global.debug_mutex_deadlock_detector;
+@@global.debug_mutex_deadlock_detector
+1
+select @@session.debug_mutex_deadlock_detector;
+ERROR HY000: Variable 'debug_mutex_deadlock_detector' is a GLOBAL variable
+show global variables like 'debug_mutex_deadlock_detector';
+Variable_name Value
+debug_mutex_deadlock_detector ON
+show session variables like 'debug_mutex_deadlock_detector';
+Variable_name Value
+debug_mutex_deadlock_detector ON
+select * from information_schema.global_variables where variable_name='debug_mutex_deadlock_detector';
+VARIABLE_NAME VARIABLE_VALUE
+DEBUG_MUTEX_DEADLOCK_DETECTOR ON
+select * from information_schema.session_variables where variable_name='debug_mutex_deadlock_detector';
+VARIABLE_NAME VARIABLE_VALUE
+DEBUG_MUTEX_DEADLOCK_DETECTOR ON
+set global debug_mutex_deadlock_detector=1;
+ERROR HY000: Variable 'debug_mutex_deadlock_detector' is a read only variable
+set session debug_mutex_deadlock_detector=1;
+ERROR HY000: Variable 'debug_mutex_deadlock_detector' is a read only variable
diff --git a/mysql-test/suite/sys_vars/r/mutex_deadlock_detector_basic.result b/mysql-test/suite/sys_vars/r/mutex_deadlock_detector_basic.result
deleted file mode 100644
index a43c194e3f9..00000000000
--- a/mysql-test/suite/sys_vars/r/mutex_deadlock_detector_basic.result
+++ /dev/null
@@ -1,21 +0,0 @@
-select @@global.mutex_deadlock_detector;
-@@global.mutex_deadlock_detector
-1
-select @@session.mutex_deadlock_detector;
-ERROR HY000: Variable 'mutex_deadlock_detector' is a GLOBAL variable
-show global variables like 'mutex_deadlock_detector';
-Variable_name Value
-mutex_deadlock_detector ON
-show session variables like 'mutex_deadlock_detector';
-Variable_name Value
-mutex_deadlock_detector ON
-select * from information_schema.global_variables where variable_name='mutex_deadlock_detector';
-VARIABLE_NAME VARIABLE_VALUE
-MUTEX_DEADLOCK_DETECTOR ON
-select * from information_schema.session_variables where variable_name='mutex_deadlock_detector';
-VARIABLE_NAME VARIABLE_VALUE
-MUTEX_DEADLOCK_DETECTOR ON
-set global mutex_deadlock_detector=1;
-ERROR HY000: Variable 'mutex_deadlock_detector' is a read only variable
-set session mutex_deadlock_detector=1;
-ERROR HY000: Variable 'mutex_deadlock_detector' is a read only variable
diff --git a/mysql-test/suite/sys_vars/t/mutex_deadlock_detector_basic.test b/mysql-test/suite/sys_vars/t/debug_mutex_deadlock_detector_basic.test
index 398636fcb13..12b29a309bb 100644
--- a/mysql-test/suite/sys_vars/t/mutex_deadlock_detector_basic.test
+++ b/mysql-test/suite/sys_vars/t/debug_mutex_deadlock_detector_basic.test
@@ -5,19 +5,19 @@
#
# show the global and session values;
#
-select @@global.mutex_deadlock_detector;
+select @@global.debug_mutex_deadlock_detector;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
-select @@session.mutex_deadlock_detector;
-show global variables like 'mutex_deadlock_detector';
-show session variables like 'mutex_deadlock_detector';
-select * from information_schema.global_variables where variable_name='mutex_deadlock_detector';
-select * from information_schema.session_variables where variable_name='mutex_deadlock_detector';
+select @@session.debug_mutex_deadlock_detector;
+show global variables like 'debug_mutex_deadlock_detector';
+show session variables like 'debug_mutex_deadlock_detector';
+select * from information_schema.global_variables where variable_name='debug_mutex_deadlock_detector';
+select * from information_schema.session_variables where variable_name='debug_mutex_deadlock_detector';
#
# show that it's read-only
#
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
-set global mutex_deadlock_detector=1;
+set global debug_mutex_deadlock_detector=1;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
-set session mutex_deadlock_detector=1;
+set session debug_mutex_deadlock_detector=1;
diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc
index 208010289c6..7fa0f4cb29a 100644
--- a/sql/sys_vars.cc
+++ b/sql/sys_vars.cc
@@ -4810,7 +4810,7 @@ static Sys_var_ulong Sys_extra_max_connections(
#ifdef SAFE_MUTEX
static Sys_var_mybool Sys_mutex_deadlock_detector(
- "mutex_deadlock_detector", "Enable checking of wrong mutex usage",
+ "debug_mutex_deadlock_detector", "Enable checking of wrong mutex usage",
READ_ONLY GLOBAL_VAR(safe_mutex_deadlock_detector),
CMD_LINE(OPT_ARG), DEFAULT(TRUE));
#endif