summaryrefslogtreecommitdiff
path: root/mysql-test/t/log_state.test
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2014-08-03 15:26:47 +0300
committerMonty <monty@mariadb.org>2014-08-09 13:22:01 +0300
commite2b2bde358f434d945e9730acfbc6eedeb9ab8a2 (patch)
treef7309ce86e95b4f4bd20e84065fe892e83a0f625 /mysql-test/t/log_state.test
parent7375f025ee9cd39909c1ec5529ca8c4007b92368 (diff)
downloadmariadb-git-e2b2bde358f434d945e9730acfbc6eedeb9ab8a2.tar.gz
Made sql_log_slow a session variable
mysqldump: - Added --log-queries to allow one to disable logging for the dump sql/log_event.cc: - Removed setting of enable_slow_log as it's not required anymore. sql/sql_parse.cc: - Set enable_slow_log to value of thd->variables.sql_log_slow as this will speed up tests if slow log is disabled. - opt_log_slow_admin_statements can now only disable slow log, not enable it. sql/sql_explain.cc: - Minor cleanup Other things: - Added sql_log_slow to system variables. - Changed opt_slow_log to global_system_variables.sql_log_slow in all files - Updated tests to reflect changes
Diffstat (limited to 'mysql-test/t/log_state.test')
-rw-r--r--mysql-test/t/log_state.test8
1 files changed, 8 insertions, 0 deletions
diff --git a/mysql-test/t/log_state.test b/mysql-test/t/log_state.test
index 3231769a4bf..12c7a7fd92b 100644
--- a/mysql-test/t/log_state.test
+++ b/mysql-test/t/log_state.test
@@ -52,12 +52,18 @@ select * from mysql.slow_log where sql_text NOT LIKE '%slow_log%';
connection default;
set global slow_query_log= ON;
+set local slow_query_log= ON;
--echo # Switch to connection con1
connection con1;
set session long_query_time = @long_query_time;
select sleep(@long_query_time + 1);
--replace_column 1 TIMESTAMP 2 USER_HOST 3 QUERY_TIME 12 THREAD_ID
select * from mysql.slow_log where sql_text NOT LIKE '%slow_log%';
+set local slow_query_log= ON;
+select sleep(@long_query_time + 2);
+--replace_column 1 TIMESTAMP 2 USER_HOST 3 QUERY_TIME 12 THREAD_ID
+select * from mysql.slow_log where sql_text NOT LIKE '%slow_log%';
+
--echo # Switch to connection default
connection default;
show global variables
@@ -69,6 +75,7 @@ set global general_log= OFF;
set global slow_query_log= ON;
set global slow_query_log= OFF;
set global slow_query_log= OFF;
+set local slow_query_log= ON;
set global general_log= ON;
truncate table mysql.general_log;
@@ -127,6 +134,7 @@ set global general_log_file= default;
set global slow_query_log_file= default;
show variables like 'general_log';
show variables like 'slow_query_log';
+show global variables like 'slow_query_log';
set global general_log=ON;
set global log_output=default;
show variables like 'log_output';