diff options
author | Sergei Petrunia <psergey@askmonty.org> | 2014-11-28 22:23:29 +0300 |
---|---|---|
committer | Sergei Petrunia <psergey@askmonty.org> | 2014-11-28 22:23:29 +0300 |
commit | 2ac3b39e68bf6bf1b56e6eafd290c0a78368d0be (patch) | |
tree | 4b02aba6761e6fa6291f8ce70578ea3377c848fc /mysql-test/t/explain_json.test | |
parent | 3a5e080d4dbe58675e6324eaa807bc2c7aa8795d (diff) | |
download | mariadb-git-2ac3b39e68bf6bf1b56e6eafd290c0a78368d0be.tar.gz |
EXPLAIN FORMAT=JSON: support derived tables
Diffstat (limited to 'mysql-test/t/explain_json.test')
-rw-r--r-- | mysql-test/t/explain_json.test | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/mysql-test/t/explain_json.test b/mysql-test/t/explain_json.test index 3917ce40b1e..8631d85a323 100644 --- a/mysql-test/t/explain_json.test +++ b/mysql-test/t/explain_json.test @@ -80,5 +80,18 @@ explain format=json delete from t0 where a < 3; explain format=json update t0 set a=3 where a in (2,3,4); +--echo # +--echo # A derived table +--echo # +create table t1 (a int, b int); +insert into t1 select a,a from t0; +explain format=json +select * from (select a, count(*) as cnt from t1 group by a) as tbl +where cnt>0; + +explain format=json +select * from (select a, count(*) as cnt from t1 group by a) as tbl1, t1 as +tbl2 where cnt=tbl2.a; + drop table t0; |