diff options
author | unknown <sergefp@mysql.com> | 2006-01-14 01:28:42 +0300 |
---|---|---|
committer | unknown <sergefp@mysql.com> | 2006-01-14 01:28:42 +0300 |
commit | fdf998317923234b11b281a5885fb6c1552a0d3b (patch) | |
tree | 3d592104a590247cc62902a64248d850c2dd8a81 /mysql-test | |
parent | 6bbc50cd857edf7aa1724dbae38c58fb357eb7ef (diff) | |
parent | e6693c13035fca502c9cdc371e867a077bfd0667 (diff) | |
download | mariadb-git-fdf998317923234b11b281a5885fb6c1552a0d3b.tar.gz |
Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/psergey/mysql-5.0-bug16393-r2
sql/sql_select.cc:
Auto merged
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/join_nested.result | 20 | ||||
-rw-r--r-- | mysql-test/t/join_nested.test | 14 |
2 files changed, 31 insertions, 3 deletions
diff --git a/mysql-test/r/join_nested.result b/mysql-test/r/join_nested.result index 6b7293d46bc..faad969fcd1 100644 --- a/mysql-test/r/join_nested.result +++ b/mysql-test/r/join_nested.result @@ -960,7 +960,7 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t2 ALL NULL NULL NULL NULL 3 Using where 1 SIMPLE t3 ALL NULL NULL NULL NULL 2 Using where 1 SIMPLE t4 ref idx_b idx_b 5 test.t2.b 2 Using where -1 SIMPLE t5 ALL NULL NULL NULL NULL 3 Using where +1 SIMPLE t5 ALL idx_b NULL NULL NULL 3 Using where 1 SIMPLE t7 ALL NULL NULL NULL NULL 2 Using where 1 SIMPLE t6 ALL NULL NULL NULL NULL 3 Using where 1 SIMPLE t8 ALL NULL NULL NULL NULL 2 Using where @@ -1009,7 +1009,7 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t2 ALL NULL NULL NULL NULL 3 Using where 1 SIMPLE t3 ALL NULL NULL NULL NULL 2 Using where 1 SIMPLE t4 ref idx_b idx_b 5 test.t2.b 2 Using where -1 SIMPLE t5 ALL NULL NULL NULL NULL 3 Using where +1 SIMPLE t5 ALL idx_b NULL NULL NULL 3 Using where 1 SIMPLE t7 ALL NULL NULL NULL NULL 2 Using where 1 SIMPLE t6 ALL NULL NULL NULL NULL 3 Using where 1 SIMPLE t8 ref idx_b idx_b 5 test.t5.b 2 Using where @@ -1059,7 +1059,7 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t2 ALL NULL NULL NULL NULL 3 Using where 1 SIMPLE t3 ALL NULL NULL NULL NULL 2 Using where 1 SIMPLE t4 ref idx_b idx_b 5 test.t2.b 2 Using where -1 SIMPLE t5 ALL NULL NULL NULL NULL 3 Using where +1 SIMPLE t5 ALL idx_b NULL NULL NULL 3 Using where 1 SIMPLE t7 ALL NULL NULL NULL NULL 2 Using where 1 SIMPLE t6 ALL NULL NULL NULL NULL 3 Using where 1 SIMPLE t8 ref idx_b idx_b 5 test.t5.b 2 Using where @@ -1467,3 +1467,17 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t6 ref a a 5 test.t4.b X 1 SIMPLE t5 ref a a 5 test.t3.b X drop table t0, t1, t2, t3, t4, t5, t6, t7; +create table t1 (a int); +insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +create table t2 (a int, filler char(100), key(a)); +insert into t2 select A.a + 10*B.a, '' from t1 A, t1 B; +create table t3 like t2; +insert into t3 select * from t2; +explain select * from t1 left join +(t2 left join t3 on (t2.a = t3.a)) +on (t1.a = t2.a); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 10 +1 SIMPLE t2 ref a a 5 test.t1.a 1 +1 SIMPLE t3 ref a a 5 test.t2.a 1 +drop table t1, t2, t3; diff --git a/mysql-test/t/join_nested.test b/mysql-test/t/join_nested.test index 9f23e2d0e2f..145edded486 100644 --- a/mysql-test/t/join_nested.test +++ b/mysql-test/t/join_nested.test @@ -900,3 +900,17 @@ explain select * from t2 left join join t5 on t5.a=t3.b) on t3.a=t2.b; drop table t0, t1, t2, t3, t4, t5, t6, t7; + +# BUG#16393 +create table t1 (a int); +insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +create table t2 (a int, filler char(100), key(a)); +insert into t2 select A.a + 10*B.a, '' from t1 A, t1 B; +create table t3 like t2; +insert into t3 select * from t2; + +explain select * from t1 left join + (t2 left join t3 on (t2.a = t3.a)) + on (t1.a = t2.a); +drop table t1, t2, t3; + |