Commit 4849615d authored by Sergey Petrunya's avatar Sergey Petrunya

Fix buildbot failure in show_explain.test:

mysqltest: At line 477: query 'show explain for $thr2' failed: 1933: Target is not running an EXPLAINable command

After the fix for MDEV-4144, subquery with WHERE pk= (select ...) became a degenerate, constant 
SELECT.  It is not executed in normal way anymore, so it is not possible to catch it in-execution.
parent 88e7bc24
...@@ -442,9 +442,9 @@ WHERE pk= (SELECT MAX(pk) FROM t2 WHERE pk = 3) ...@@ -442,9 +442,9 @@ WHERE pk= (SELECT MAX(pk) FROM t2 WHERE pk = 3)
); );
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t2 ALL NULL NULL NULL NULL 20 Using where 1 PRIMARY t2 ALL NULL NULL NULL NULL 20 Using where
2 SUBQUERY t2 const PRIMARY PRIMARY 4 const 1 Using where 2 SUBQUERY t2 const PRIMARY PRIMARY 4 const 1
3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL Select tables optimized away 3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
set @show_explain_probe_select_id=2; set @show_explain_probe_select_id=1;
set debug_dbug='+d,show_explain_probe_do_select'; set debug_dbug='+d,show_explain_probe_do_select';
SELECT * FROM t2 WHERE a = SELECT * FROM t2 WHERE a =
(SELECT MAX(a) FROM t2 (SELECT MAX(a) FROM t2
...@@ -453,7 +453,7 @@ WHERE pk= (SELECT MAX(pk) FROM t2 WHERE pk = 3) ...@@ -453,7 +453,7 @@ WHERE pk= (SELECT MAX(pk) FROM t2 WHERE pk = 3)
show explain for $thr2; show explain for $thr2;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t2 ALL NULL NULL NULL NULL 20 Using where 1 PRIMARY t2 ALL NULL NULL NULL NULL 20 Using where
2 SUBQUERY t2 const PRIMARY PRIMARY 4 const 1 Using where 2 SUBQUERY t2 const PRIMARY PRIMARY 4 const 1
3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL Select tables optimized away 3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
Warnings: Warnings:
Note 1003 SELECT * FROM t2 WHERE a = Note 1003 SELECT * FROM t2 WHERE a =
......
...@@ -466,7 +466,7 @@ explain SELECT * FROM t2 WHERE a = ...@@ -466,7 +466,7 @@ explain SELECT * FROM t2 WHERE a =
WHERE pk= (SELECT MAX(pk) FROM t2 WHERE pk = 3) WHERE pk= (SELECT MAX(pk) FROM t2 WHERE pk = 3)
); );
set @show_explain_probe_select_id=2; set @show_explain_probe_select_id=1;
set debug_dbug='+d,show_explain_probe_do_select'; set debug_dbug='+d,show_explain_probe_do_select';
send SELECT * FROM t2 WHERE a = send SELECT * FROM t2 WHERE a =
(SELECT MAX(a) FROM t2 (SELECT MAX(a) FROM t2
......
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