Commit 0f7bdb31 authored by unknown's avatar unknown

Bug #29307: status.test fails with different Table_locks_immediate

Finish premature patch which was accidentally pushed; remove debugging
info and correct the test.


mysql-test/r/status.result:
  Correct test results
mysql-test/t/status.test:
  Disable query log for one statement, and correct some comments
parent f7e693df
...@@ -16,14 +16,11 @@ unlock tables; ...@@ -16,14 +16,11 @@ unlock tables;
lock tables t1 read; lock tables t1 read;
update t1 set n = 3; update t1 set n = 3;
unlock tables; unlock tables;
show status like 'Table_lock%'; show status like 'Table_locks_waited';
Variable_name Value Variable_name Value
Table_locks_immediate 17
Table_locks_waited 1 Table_locks_waited 1
select * from information_schema.session_status where variable_name like 'Table_lock%'; Immediate
VARIABLE_NAME VARIABLE_VALUE 17
TABLE_LOCKS_IMMEDIATE 18
TABLE_LOCKS_WAITED 1
drop table t1; drop table t1;
select 1; select 1;
1 1
......
...@@ -49,18 +49,20 @@ update t1 set n = 3; ...@@ -49,18 +49,20 @@ update t1 set n = 3;
connection con2; connection con2;
# wait for the other query to start executing # wait for the other query to start executing
let $wait_condition= select 1 from INFORMATION_SCHEMA.PROCESSLIST where ID = $ID and STATE = "Locked"; let $wait_condition= select 1 from INFORMATION_SCHEMA.PROCESSLIST where ID = $ID and STATE = "Locked";
# ++Immediate = 15 + $wait_condition_reps (wait_condition.inc does one select # Immediate = 14 + $wait_condition_reps ($wait_timeout is 0, so no extra select
# in addition to the wait condition) # is done inside wait_condition.inc)
--source include/wait_condition.inc --source include/wait_condition.inc
# ++Immediate = 16 + $wait_condition_reps # ++Immediate = 15 + $wait_condition_reps
unlock tables; unlock tables;
connection con1; connection con1;
reap; reap;
# ++Immediate = 17 + $wait_condition_reps # ++Immediate = 16 + $wait_condition_reps
show status like 'Table_locks_waited'; show status like 'Table_locks_waited';
# ++Immediate = 18 + $wait_condition_reps # ++Immediate = 17 + $wait_condition_reps
--disable_query_log
eval select variable_value - $wait_condition_reps as Immediate from information_schema.session_status where variable_name like 'Table_locks_immediate'; eval select variable_value - $wait_condition_reps as Immediate from information_schema.session_status where variable_name like 'Table_locks_immediate';
--enable_query_log
drop table t1; drop table t1;
disconnect con2; disconnect con2;
......
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