Commit 620269fe authored by unknown's avatar unknown

Fix for bug #31285: main.status test fails with different Table_locks_waited

Problem: Table_locks_waited value may depend on general logging.

Fix: switch general logging off.


mysql-test/r/status.result:
  Fix for bug #31285: main.status test fails with different Table_locks_waited
    - switch general logging off.
mysql-test/t/status.test:
  Fix for bug #31285: main.status test fails with different Table_locks_waited
    - switch general logging off.
parent 8b7ee0d6
......@@ -8,6 +8,8 @@ VARIABLE_NAME VARIABLE_VALUE
TABLE_LOCKS_IMMEDIATE 2
TABLE_LOCKS_WAITED 0
SET SQL_LOG_BIN=0;
set @old_general_log = @@global.general_log;
set global general_log = 'OFF';
drop table if exists t1;
create table t1(n int) engine=myisam;
insert into t1 values(1);
......@@ -20,6 +22,7 @@ show status like 'Table_locks_waited';
Variable_name Value
Table_locks_waited 1
drop table t1;
set global general_log = @old_general_log;
select 1;
1
1
......
......@@ -21,6 +21,8 @@ select * from information_schema.session_status where variable_name like 'Table_
connection con1;
# ++Immediate = 3
SET SQL_LOG_BIN=0;
set @old_general_log = @@global.general_log;
set global general_log = 'OFF';
--disable_warnings
# ++Immediate = 4
drop table if exists t1;
......@@ -60,6 +62,7 @@ reap;
# ++Immediate = 16 + $wait_condition_reps
show status like 'Table_locks_waited';
drop table t1;
set global general_log = @old_general_log;
disconnect con2;
disconnect con1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment