Hi Sergey, What do you think of this patch to fix a random failure in buildbot of main.show_explain? I'm confident that the patch fixes the problem. The question is why the two KILL QUERY were put there originally? They were added in this 10 year old commit: 105e3ae6c93f57498fa6c504dfbb92203b0d1056, so you may not remember anymore. My guess is that they were needed earlier because the two queries would not complete by themselves. And now something changed so the queries complete, introducing the race in the test if the kill comes after query completion. Then just removing the KILL QUERY's should be the correct fix. But I wanted to ask first if you know of a reason that the KILL QUERY is needed for the test to do what it is supposed to do, and another fix would be needed? - Kristian. commit a98b18470895be2a3a0642a2a73a41e5c09dd09e (HEAD -> 10.11, origin/bb-10.11-knielsen) Author: Kristian Nielsen <knielsen@knielsen-hq.org> Date: Thu Nov 16 12:46:30 2023 +0100 MDEV-32819: main.show_explain failed in buildbot The testcase had a race in two places where a KILL QUERY is made towards a running query in another connection. The query can complete early so the kill is lost, and the test fails due to expecting ER_QUERY_INTERRUPTED. Fix by removing the KILL QUERY. It is not needed, as the query completes by itself after SHOW EXPLAIN FOR. Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org> --- mysql-test/main/show_explain.result | 11 +++++++---- mysql-test/main/show_explain.test | 4 ---- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/mysql-test/main/show_explain.result b/mysql-test/main/show_explain.result index 6bdc773aa4c..22ac7de6153 100644 --- a/mysql-test/main/show_explain.result +++ b/mysql-test/main/show_explain.result @@ -244,9 +244,7 @@ set @foo= (select max(a) from t0 where sin(a) >0); connection default; show explain for $thr2; ERROR HY000: Target is not executing an operation with a query plan -kill query $thr2; connection con1; -ERROR 70100: Query execution was interrupted SET debug_dbug=@old_debug; # # Attempt SHOW EXPLAIN for an UPDATE @@ -568,9 +566,14 @@ SELECT * FROM v1, t2; connection default; show explain for $thr2; ERROR HY000: Target is not executing an operation with a query plan -kill query $thr2; connection con1; -ERROR 70100: Query execution was interrupted +a b +8 4 +8 5 +8 6 +8 7 +8 8 +8 9 SET debug_dbug=@old_debug; DROP VIEW v1; DROP TABLE t2, t3; diff --git a/mysql-test/main/show_explain.test b/mysql-test/main/show_explain.test index e6cf3971738..749c08b1804 100644 --- a/mysql-test/main/show_explain.test +++ b/mysql-test/main/show_explain.test @@ -273,9 +273,7 @@ connection default; --source include/wait_condition.inc --error ER_TARGET_NOT_EXPLAINABLE evalp show explain for $thr2; -evalp kill query $thr2; connection con1; ---error ER_QUERY_INTERRUPTED reap; SET debug_dbug=@old_debug; @@ -504,9 +502,7 @@ connection default; --source include/wait_condition.inc --error ER_TARGET_NOT_EXPLAINABLE evalp show explain for $thr2; -evalp kill query $thr2; connection con1; ---error ER_QUERY_INTERRUPTED reap; SET debug_dbug=@old_debug; DROP VIEW v1; -- 2.30.2