Below is the list of changes that have just been committed into a local
5.0 repository of timka. When timka does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.1968 05/09/12 19:05:55 timour@stripped +3 -0
Merge mysql.com:/home/timka/mysql/src/5.0-virgin
into mysql.com:/home/timka/mysql/src/5.0-bug-12943
mysql-test/t/select.test
1.76 05/09/12 19:05:53 timour@stripped +21 -23
merge BUG#12943
mysql-test/r/select.result
1.91 05/09/12 19:05:53 timour@stripped +20 -20
merge BUG#12943
sql/sql_parse.cc
1.484 05/09/12 18:56:50 timour@stripped +0 -0
Auto merged
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: timour
# Host: lamia.home
# Root: /home/timka/mysql/src/5.0-bug-12943/RESYNC
--- 1.483/sql/sql_parse.cc 2005-09-11 02:23:01 +03:00
+++ 1.484/sql/sql_parse.cc 2005-09-12 18:56:50 +03:00
@@ -6360,7 +6360,7 @@
SYNOPSIS
make_join_on_context()
thd pointer to current thread
- left_op lefto operand of the JOIN
+ left_op left operand of the JOIN
right_op rigth operand of the JOIN
DESCRIPTION
--- 1.90/mysql-test/r/select.result 2005-09-12 08:28:50 +03:00
+++ 1.91/mysql-test/r/select.result 2005-09-12 19:05:53 +03:00
@@ -2922,3 +2922,23 @@
select * from t1 inner join t2 using (a);
a b b
1 10 10
+create table t1 (a int, c int);
+create table t2 (b int);
+create table t3 (b int, a int);
+create table t4 (c int);
+insert into t1 values (1,1);
+insert into t2 values (1);
+insert into t3 values (1,1);
+insert into t4 values (1);
+select * from t1 join t2 join t3 on (t2.b = t3.b and t1.a = t3.a);
+a c b b a
+1 1 1 1 1
+select * from t1, t2 join t3 on (t2.b = t3.b and t1.a = t3.a);
+ERROR 42S22: Unknown column 't1.a' in 'on clause'
+select * from t1 join t2 join t3 join t4 on (t1.a = t4.c and t2.b = t4.c);
+a c b b a c
+1 1 1 1 1 1
+select * from t1 join t2 join t4 using (c);
+c a b
+1 1 1
+drop table t1, t2, t3, t4;
--- 1.75/mysql-test/t/select.test 2005-09-12 08:28:50 +03:00
+++ 1.76/mysql-test/t/select.test 2005-09-12 19:05:53 +03:00
@@ -2499,3 +2499,24 @@
# both queries should produce the same result
select * from t1 inner join t2 using (A);
select * from t1 inner join t2 using (a);
+# Bug #12943 Incorrect nesting of [INNER| CROSS] JOIN due to unspecified
+# associativity in the parser.
+#
+
+create table t1 (a int, c int);
+create table t2 (b int);
+create table t3 (b int, a int);
+create table t4 (c int);
+insert into t1 values (1,1);
+insert into t2 values (1);
+insert into t3 values (1,1);
+insert into t4 values (1);
+
+select * from t1 join t2 join t3 on (t2.b = t3.b and t1.a = t3.a);
+# Notice that ',' has lower priority than 'join', thus we have that:
+# t1, t2 join t3 <==> t1, (t2 join t3).
+-- error 1054
+select * from t1, t2 join t3 on (t2.b = t3.b and t1.a = t3.a);
+select * from t1 join t2 join t3 join t4 on (t1.a = t4.c and t2.b = t4.c);
+select * from t1 join t2 join t4 using (c);
+drop table t1, t2, t3, t4;
| Thread |
|---|
| • bk commit into 5.0 tree (timour:1.1968) | timour | 12 Sep |