diff options
author | Sergey Petrunya <psergey@askmonty.org> | 2012-08-02 17:12:23 +0400 |
---|---|---|
committer | Sergey Petrunya <psergey@askmonty.org> | 2012-08-02 17:12:23 +0400 |
commit | b71f7d97db491a7dc09f3b27336da214dd64b8f2 (patch) | |
tree | 4b9e09adfe231fd4249f9d542e76b06ad10827bf /mysql-test | |
parent | fd3e9c53c1b3c50ae85d020551915d5a31cd3044 (diff) | |
parent | 59e64b6c9bdcfd576db5118e5e33df2c813233dd (diff) | |
download | mariadb-git-b71f7d97db491a7dc09f3b27336da214dd64b8f2.tar.gz |
Merge
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/show_explain.result | 13 | ||||
-rw-r--r-- | mysql-test/t/show_explain.test | 14 |
2 files changed, 27 insertions, 0 deletions
diff --git a/mysql-test/r/show_explain.result b/mysql-test/r/show_explain.result index 2f7de62e7fe..c751e4f913f 100644 --- a/mysql-test/r/show_explain.result +++ b/mysql-test/r/show_explain.result @@ -1032,5 +1032,18 @@ max(a+b+c) 279 set debug_dbug=''; DROP TABLE t1,t2,t3; +# +# MDEV-416: Server crashes in SQL_SELECT::cleanup on EXPLAIN with SUM ( DISTINCT ) in a non-correlated subquery (5.5-show-explain tree) +# +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1),(2); +CREATE TABLE t2 (b INT); +INSERT INTO t2 VALUES (8),(9); +EXPLAIN SELECT * FROM t1 +WHERE ( 8, 89 ) IN ( SELECT b, SUM( DISTINCT b ) FROM t2 GROUP BY b ); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t2 ALL NULL NULL NULL NULL 2 Using filesort +DROP TABLE t1,t2; # End drop table t0; diff --git a/mysql-test/t/show_explain.test b/mysql-test/t/show_explain.test index 485bda84cf5..4bfee830986 100644 --- a/mysql-test/t/show_explain.test +++ b/mysql-test/t/show_explain.test @@ -1063,5 +1063,19 @@ set debug_dbug=''; DROP TABLE t1,t2,t3; +--echo # +--echo # MDEV-416: Server crashes in SQL_SELECT::cleanup on EXPLAIN with SUM ( DISTINCT ) in a non-correlated subquery (5.5-show-explain tree) +--echo # +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1),(2); + +CREATE TABLE t2 (b INT); +INSERT INTO t2 VALUES (8),(9); + +EXPLAIN SELECT * FROM t1 +WHERE ( 8, 89 ) IN ( SELECT b, SUM( DISTINCT b ) FROM t2 GROUP BY b ); + +DROP TABLE t1,t2; + --echo # End drop table t0; |