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/t/show_explain.test | |
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/t/show_explain.test')
-rw-r--r-- | mysql-test/t/show_explain.test | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/mysql-test/t/show_explain.test b/mysql-test/t/show_explain.test index 4fc6aaad932..8c9d5f4c1e8 100644 --- a/mysql-test/t/show_explain.test +++ b/mysql-test/t/show_explain.test @@ -300,8 +300,30 @@ connection default; evalp show explain for $thr2; connection con1; reap; +set debug=''; + +--echo # +--echo # MDEV-238: SHOW EXPLAIN: Server crashes in JOIN::print_explain with FROM subquery and GROUP BY +--echo # +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; + +set debug='d,show_explain_in_find_all_keys'; +send SELECT alias.a FROM t2, ( SELECT * FROM t2 ) AS alias GROUP BY alias.a; + +connection default; +--source include/wait_condition.inc +--echo # NOTE: current code will not show "Using join buffer": +evalp show explain for $thr2; +connection con1; +reap; +set debug=''; + ## TODO: Test this: have several SHOW EXPLAIN requests be queued up for a ## thread and served together. +DROP TABLE t2; + drop table t0,t1; |