diff options
author | Sergey Petrunya <psergey@askmonty.org> | 2009-08-25 13:38:22 +0300 |
---|---|---|
committer | Sergey Petrunya <psergey@askmonty.org> | 2009-08-25 13:38:22 +0300 |
commit | de41681afaa15345425a6d2bea8a43c717d77bb1 (patch) | |
tree | 312af9c22c75549040a132720611aaa3527c3b34 /mysql-test/r/table_elim.result | |
parent | 9400700b995d00021819f4c483a07975a3ce60d7 (diff) | |
download | mariadb-git-de41681afaa15345425a6d2bea8a43c717d77bb1.tar.gz |
MWL#17: Table elimination
- More test coverage
- Remove unused code
Diffstat (limited to 'mysql-test/r/table_elim.result')
-rw-r--r-- | mysql-test/r/table_elim.result | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/mysql-test/r/table_elim.result b/mysql-test/r/table_elim.result index 4e53f4892bc..6d5a540fa04 100644 --- a/mysql-test/r/table_elim.result +++ b/mysql-test/r/table_elim.result @@ -314,8 +314,8 @@ create table t1 (a int, b int, c int, d int); insert into t1 values (0,0,0,0),(1,1,1,1),(2,2,2,2),(3,3,3,3); create table t2 (pk int primary key, b int) as select a as pk, a as b from t1 where a in (1,2); -create table t3 (pk int primary key, b int) -as select a as pk, a as b from t1 where a in (1,3); +create table t3 (pk1 int, pk2 int, b int, unique(pk1,pk2)); +insert into t3 select a as pk1, a as pk2, a as b from t1 where a in (1,3); explain select t1.a from t1 left join t2 on t2.pk=t1.a and t2.b<t1.b; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL NULL NULL NULL NULL 4 @@ -344,4 +344,11 @@ id select_type table type possible_keys key key_len ref rows Extra explain select t1.a from t1 left join t2 on t2.pk in (t1.a); id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL NULL NULL NULL NULL 4 +explain select t1.a from t1 left join t2 on TRUE; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 4 +1 SIMPLE t2 index NULL PRIMARY 4 NULL 2 Using index +explain select t1.a from t1 left join t3 on t3.pk1=t1.a and t3.pk2 IS NULL; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 4 drop table t1,t2,t3; |