diff options
author | unknown <pem@mysql.com> | 2002-10-15 16:33:06 +0200 |
---|---|---|
committer | unknown <pem@mysql.com> | 2002-10-15 16:33:06 +0200 |
commit | 53a0e2992a08a08a03ffad32e6d65ee18d9505b0 (patch) | |
tree | c5d1a62edee658063313b8ca82ecf5c59acc42a2 /mysql-test/r/select.result | |
parent | b9ce7600692730c5649aac3786ecc47bd8869912 (diff) | |
download | mariadb-git-53a0e2992a08a08a03ffad32e6d65ee18d9505b0.tar.gz |
SCRUM Task 430: Allowing braces in joins by simply removing them.
Fixed the remaining join variations, (left, right, natural, etc).
(Previous fix only solved "," and "[cross] join".)
mysql-test/r/select.result:
Added more test case results for more braced join fixes.
mysql-test/t/select.test:
Added more tests for braced join fixes.
sql/sql_yacc.yy:
Changed the remaining join_table_list cases to handle braces.
Also added some precedence declaration to silence shift/reduce conflicts
warnings that turned up after these fixes.
Diffstat (limited to 'mysql-test/r/select.result')
-rw-r--r-- | mysql-test/r/select.result | 175 |
1 files changed, 175 insertions, 0 deletions
diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result index f0e19788ab3..e0697f07cb8 100644 --- a/mysql-test/r/select.result +++ b/mysql-test/r/select.result @@ -3292,4 +3292,179 @@ a a a 1 3 3 2 3 3 3 3 3 +select * from (t1 as t2 left join t1 as t3 using (a)) straight_join t1; +a a a +1 1 1 +2 2 1 +3 3 1 +1 1 2 +2 2 2 +3 3 2 +1 1 3 +2 2 3 +3 3 3 +select * from t1 straight_join (t1 as t2 left join t1 as t3 using (a)); +a a a +1 1 1 +2 1 1 +3 1 1 +1 2 2 +2 2 2 +3 2 2 +1 3 3 +2 3 3 +3 3 3 +select * from (t1 as t2 left join t1 as t3 using (a)) inner join t1 on t1.a>1; +a a a +1 1 2 +2 2 2 +3 3 2 +1 1 3 +2 2 3 +3 3 3 +select * from t1 inner join (t1 as t2 left join t1 as t3 using (a)) on t1.a>1; +a a a +1 1 NULL +2 1 1 +3 1 1 +1 2 NULL +2 2 2 +3 2 2 +1 3 NULL +2 3 3 +3 3 3 +select * from (t1 as t2 left join t1 as t3 using (a)) inner join t1 using ( a ); +a a a +1 1 1 +2 2 2 +3 3 3 +select * from t1 inner join (t1 as t2 left join t1 as t3 using (a)) using ( a ); +a a a +1 1 1 +2 1 NULL +3 1 NULL +1 2 NULL +2 2 2 +3 2 NULL +1 3 NULL +2 3 NULL +3 3 3 +select * from (t1 as t2 left join t1 as t3 using (a)) left outer join t1 on t1.a>1; +a a a +1 1 2 +1 1 3 +2 2 2 +2 2 3 +3 3 2 +3 3 3 +select * from t1 left outer join (t1 as t2 left join t1 as t3 using (a)) on t1.a>1; +a a a +1 1 NULL +2 1 1 +3 1 1 +1 2 NULL +2 2 2 +3 2 2 +1 3 NULL +2 3 3 +3 3 3 +select * from (t1 as t2 left join t1 as t3 using (a)) left join t1 using ( a ); +a a a +1 1 1 +2 2 2 +3 3 3 +select * from t1 left join (t1 as t2 left join t1 as t3 using (a)) using ( a ); +a a a +1 1 1 +2 1 NULL +3 1 NULL +1 2 NULL +2 2 2 +3 2 NULL +1 3 NULL +2 3 NULL +3 3 3 +select * from (t1 as t2 left join t1 as t3 using (a)) natural left join t1; +a a a +1 1 1 +2 2 2 +3 3 3 +select * from t1 natural left join (t1 as t2 left join t1 as t3 using (a)); +a a a +1 1 1 +2 1 NULL +3 1 NULL +1 2 NULL +2 2 2 +3 2 NULL +1 3 NULL +2 3 NULL +3 3 3 +select * from (t1 as t2 left join t1 as t3 using (a)) right join t1 on t1.a>1; +a a a +1 NULL 1 +2 NULL 1 +3 NULL 1 +1 1 2 +2 2 2 +3 3 2 +1 1 3 +2 2 3 +3 3 3 +select * from t1 right join (t1 as t2 left join t1 as t3 using (a)) on t1.a>1; +a a a +2 1 1 +3 1 1 +2 2 2 +3 2 2 +2 3 3 +3 3 3 +select * from (t1 as t2 left join t1 as t3 using (a)) right outer join t1 using ( a ); +a a a +1 1 1 +2 NULL 1 +3 NULL 1 +1 NULL 2 +2 2 2 +3 NULL 2 +1 NULL 3 +2 NULL 3 +3 3 3 +select * from t1 right outer join (t1 as t2 left join t1 as t3 using (a)) using ( a ); +a a a +1 1 1 +2 2 2 +3 3 3 +select * from (t1 as t2 left join t1 as t3 using (a)) natural right join t1; +a a a +1 1 1 +2 NULL 1 +3 NULL 1 +1 NULL 2 +2 2 2 +3 NULL 2 +1 NULL 3 +2 NULL 3 +3 3 3 +select * from t1 natural right join (t1 as t2 left join t1 as t3 using (a)); +a a a +1 1 1 +2 2 2 +3 3 3 +select * from t1 natural join (t1 as t2 left join t1 as t3 using (a)); +a a a +1 1 1 +2 1 NULL +3 1 NULL +1 2 NULL +2 2 2 +3 2 NULL +1 3 NULL +2 3 NULL +3 3 3 +select * from (t1 as t2 left join t1 as t3 using (a)) natural join t1; +a a a +1 1 1 +2 2 2 +3 3 3 drop table t1; |