Commit 618e300b authored by Sergey Vojtovich's avatar Sergey Vojtovich

MDEV-9970 - main.sp-threads fails sporadically

Added proper waiting for thread to enter required state. Also reduced amount of
information dumped from processlist.
parent bd75ee74
......@@ -32,12 +32,9 @@ update t1, t2 set val= 1 where id1=id2;
call bug9486();
lock tables t2 write;
call bug9486();
show processlist;
Id User Host db Command Time State Info Progress
# root localhost test Sleep # NULL 0.000
# root localhost test Query # Waiting for table metadata lock update t1, t2 set val= 1 where id1=id2 0.000
# root localhost test Query # NULL show processlist 0.000
# root localhost test Sleep # NULL 0.000
SELECT state,info FROM information_schema.processlist WHERE id=con1root_id;
state info
Waiting for table metadata lock update t1, t2 set val= 1 where id1=id2
unlock tables;
drop procedure bug9486;
drop table t1, t2;
......
......@@ -77,12 +77,15 @@ call bug9486();
connection con2root;
lock tables t2 write;
connection con1root;
let $con1root_id=`SELECT CONNECTION_ID()`;
send call bug9486();
connection con2root;
--sleep 2
# There should be call statement in locked state.
--replace_column 1 # 3 localhost 6 #
show processlist;
let $wait_condition=SELECT COUNT(*)=1 FROM information_schema.processlist WHERE
id=$con1root_id AND state='Waiting for table metadata lock';
--source include/wait_condition.inc
--replace_result $con1root_id con1root_id
eval SELECT state,info FROM information_schema.processlist WHERE id=$con1root_id;
unlock tables;
connection con1root;
reap;
......
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