diff options
author | Sergey Petrunya <psergey@askmonty.org> | 2012-05-10 13:43:48 +0400 |
---|---|---|
committer | Sergey Petrunya <psergey@askmonty.org> | 2012-05-10 13:43:48 +0400 |
commit | 58b9164f0468768eff64841f4f066840b9ff2206 (patch) | |
tree | 68cc0cd3398c393767bbd3bd332060ec8f26fb10 /mysql-test/r/show_explain.result | |
parent | cdc9a1172d7b75b16d92a6179478c2689ac04bae (diff) | |
download | mariadb-git-58b9164f0468768eff64841f4f066840b9ff2206.tar.gz |
MDEV-238: SHOW EXPLAIN: Server crashes in JOIN::print_explain with FROM subquery and GROUP BY
- Support SHOW EXPLAIN for selects that have "Using temporary; Using filesort".
Diffstat (limited to 'mysql-test/r/show_explain.result')
-rw-r--r-- | mysql-test/r/show_explain.result | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/mysql-test/r/show_explain.result b/mysql-test/r/show_explain.result index 74def21585f..db1d57b7004 100644 --- a/mysql-test/r/show_explain.result +++ b/mysql-test/r/show_explain.result @@ -284,4 +284,29 @@ a 7 8 9 +set debug=''; +# +# MDEV-238: SHOW EXPLAIN: Server crashes in JOIN::print_explain with FROM subquery and GROUP BY +# +CREATE TABLE t2 ( a INT ); +INSERT INTO t2 VALUES (1),(2),(1),(4),(2); +explain SELECT alias.a FROM t2, ( SELECT * FROM t2 ) AS alias GROUP BY alias.a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 5 Using temporary; Using filesort +1 SIMPLE t2 ALL NULL NULL NULL NULL 5 Using join buffer (flat, BNL join) +set debug='d,show_explain_in_find_all_keys'; +SELECT alias.a FROM t2, ( SELECT * FROM t2 ) AS alias GROUP BY alias.a; +# NOTE: current code will not show "Using join buffer": +show explain for $thr2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 5 Using temporary; Using filesort +1 SIMPLE t2 ALL NULL NULL NULL NULL 5 +Warnings: +Note 1003 SELECT alias.a FROM t2, ( SELECT * FROM t2 ) AS alias GROUP BY alias.a +a +1 +2 +4 +set debug=''; +DROP TABLE t2; drop table t0,t1; |