[Commits] 7dd3acb9ae5: MDEV-10674: main.show_explain failed in buildbot
revision-id: 7dd3acb9ae56eeedf82b1de75505d65f594f2e25 (mariadb-10.2.31-925-g7dd3acb9ae5) parent(s): abe6eb10a65d5c28c221d756357b4e7f392ad13d author: Sergei Petrunia committer: Sergei Petrunia timestamp: 2021-05-02 12:45:26 +0300 message: MDEV-10674: main.show_explain failed in buildbot Fix a race condition in the testcase. The testcase assumed that State='Sending data' means that the thread is already in an InnoDB lock wait. This is not case, there is a gap between the state changing to Sending data and execution reaching the point where it is waiting for a lock. Use a more precise check instead, through I_S.INNODB_TRX. --- mysql-test/t/show_explain.test | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/mysql-test/t/show_explain.test b/mysql-test/t/show_explain.test index 2a87d24cf6d..542701bc42b 100644 --- a/mysql-test/t/show_explain.test +++ b/mysql-test/t/show_explain.test @@ -861,7 +861,14 @@ select * from t1 where pk between 10 and 20 for update; # run SHOW EXPLAIN on a frozen thread connection default; let $save_wait_condition= $wait_condition; -let $wait_condition= select State='Sending data' from information_schema.processlist where id=$thr2; +let $wait_condition= +select 1 +from information_schema.INNODB_LOCK_WAITS +where + requesting_trx_id=(select trx_id + from information_schema.INNODB_TRX + where trx_mysql_thread_id=$thr2); + let $thr_default=`select connection_id()`; --source include/wait_condition.inc --echo # do: send_eval show explain for thr2;
participants (1)
-
psergey