diff options
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; |