1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

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.
This commit is contained in:
ramil/ram@mysql.com/ramil.myoffice.izhnet.ru
2007-10-16 13:43:16 +05:00
parent 3286de1d91
commit 0dfe3a8dfb
2 changed files with 6 additions and 0 deletions

View File

@@ -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

View File

@@ -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;