From f4484dfdbf2d78b0f357916ebd8ade024dd73c09 Mon Sep 17 00:00:00 2001 From: Alexander Barkov Date: Thu, 21 Mar 2019 13:43:17 +0400 Subject: MDEV-19008 Slow EXPLAIN SELECT ... WHERE col IN (const1,const2,(subquery)) --- mysql-test/main/func_debug.result | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'mysql-test/main/func_debug.result') diff --git a/mysql-test/main/func_debug.result b/mysql-test/main/func_debug.result index 7fcf522abba..e2bf0ca8df3 100644 --- a/mysql-test/main/func_debug.result +++ b/mysql-test/main/func_debug.result @@ -1655,3 +1655,22 @@ Note 1105 DBUG: [1] arg=2 handler=0 (time) Note 1105 DBUG: [2] arg=3 handler=2 (datetime) SET SESSION debug_dbug="-d,Predicant_to_list_comparator"; SET SESSION debug_dbug="-d,Item_func_in"; +# +# MDEV-19008 Slow EXPLAIN SELECT ... WHERE col IN (const1,const2,(subquery)) +# +SET SESSION debug_dbug="+d,Item_subselect"; +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +EXPLAIN SELECT * FROM t1 WHERE a IN (1,2,(SELECT MAX(a) FROM t1)); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 10 Using where +2 SUBQUERY t1 ALL NULL NULL NULL NULL 10 +SELECT * FROM t1 WHERE a IN (1,2,(SELECT MAX(a) FROM t1)); +a +1 +2 +9 +Warnings: +Note 1105 DBUG: Item_subselect::exec (select max(`test`.`t1`.`a`) from `test`.`t1`) +DROP TABLE t1; +SET SESSION debug_dbug="-d,Item_subselect"; -- cgit v1.2.1