mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 03:52:35 +01:00
MDEV-9970 - main.sp-threads fails sporadically
Added proper waiting for thread to enter required state. Also reduced amount of information dumped from processlist.
This commit is contained in:
parent
bd75ee748b
commit
618e300bce
2 changed files with 9 additions and 9 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue