diff options
author | Sergey Petrunya <psergey@askmonty.org> | 2012-05-10 01:45:38 +0530 |
---|---|---|
committer | Sergey Petrunya <psergey@askmonty.org> | 2012-05-10 01:45:38 +0530 |
commit | cdc9a1172d7b75b16d92a6179478c2689ac04bae (patch) | |
tree | 076dfd3b68a30277bdf0b6d47007c28af91b525c /mysql-test/t | |
parent | ff40705f89b977d966427710e1b32a0774a2f0b3 (diff) | |
download | mariadb-git-cdc9a1172d7b75b16d92a6179478c2689ac04bae.tar.gz |
MWL#182: Explain running statements:
Make SHOW EXPLAIN work for queries that do "Using temporary" and/or "Using filesort"
- Patch#1: Don't lose "Using temporary/filesort" in the SHOW EXPLAIN output.
Diffstat (limited to 'mysql-test/t')
-rw-r--r-- | mysql-test/t/show_explain.test | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/mysql-test/t/show_explain.test b/mysql-test/t/show_explain.test index 717949d5cc5..4fc6aaad932 100644 --- a/mysql-test/t/show_explain.test +++ b/mysql-test/t/show_explain.test @@ -255,6 +255,52 @@ connection con1; reap; drop table t2; +--echo # +--echo # SHOW EXPLAIN for SELECT ... ORDER BY with "Using filesort" +--echo # +explain select * from t0 order by a; + +set debug='d,show_explain_probe_1'; +set @show_explain_probe_select_id=1; +send select * from t0 order by a; +connection default; +--source include/wait_condition.inc +evalp show explain for $thr2; +connection con1; +reap; + +--echo # +--echo # SHOW EXPLAIN for SELECT ... with "Using temporary" +--echo # +connection default; +explain select distinct a from t0; +connection con1; + +set debug='d,show_explain_probe_1'; +set @show_explain_probe_select_id=1; +send select distinct a from t0; +connection default; +--source include/wait_condition.inc +evalp show explain for $thr2; +connection con1; +reap; + +--echo # +--echo # SHOW EXPLAIN for SELECT ... with "Using temporary; Using filesort" +--echo # +connection default; +explain select distinct a from t0; +connection con1; + +set debug='d,show_explain_probe_1'; +set @show_explain_probe_select_id=1; +send select distinct a from t0; +connection default; +--source include/wait_condition.inc +evalp show explain for $thr2; +connection con1; +reap; + ## TODO: Test this: have several SHOW EXPLAIN requests be queued up for a ## thread and served together. |