Below is the list of changes that have just been committed into a local
5.0 repository of igor. When igor 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.1961 05/06/09 09:16:16 igor@stripped +3 -0
select.test, select.result:
Added a test case for bug #10084.
sql_yacc.yy:
Fixed bug #10084: STRAIGHT_JOIN for expressions with ON was
added.
mysql-test/t/select.test
1.48 05/06/09 09:15:47 igor@stripped +16 -0
Added a test case for bug #10084.
mysql-test/r/select.result
1.64 05/06/09 09:15:08 igor@stripped +17 -0
Added a test case for bug #10084.
sql/sql_yacc.yy
1.396 05/06/09 09:13:13 igor@stripped +4 -2
Fixed bug #10084: STRAIGHT_JOIN for expressions with ON was
added.
# 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: igor
# Host: rurik.mysql.com
# Root: /home/igor/dev/mysql-5.0-0
--- 1.395/sql/sql_yacc.yy Wed Jun 8 14:54:12 2005
+++ 1.396/sql/sql_yacc.yy Thu Jun 9 09:13:13 2005
@@ -5108,10 +5108,12 @@
join_table:
table_ref normal_join table_ref { TEST_ASSERT($1 && ($$=$3)); }
- | table_ref STRAIGHT_JOIN table_factor
- { TEST_ASSERT($1 && ($$=$3)); $3->straight=1; }
+ | table_ref STRAIGHT_JOIN table_ref
+ { TEST_ASSERT($1 && ($$=$3)); $3->straight=1; }
| table_ref normal_join table_ref ON expr
{ TEST_ASSERT($1 && ($$=$3)); add_join_on($3,$5); }
+ | table_ref STRAIGHT_JOIN table_ref ON expr
+ { TEST_ASSERT($1 && ($$=$3)); $3->straight=1; add_join_on($3,$5); }
| table_ref normal_join table_ref
USING
{
--- 1.63/mysql-test/r/select.result Thu May 26 07:47:38 2005
+++ 1.64/mysql-test/r/select.result Thu Jun 9 09:15:08 2005
@@ -2682,3 +2682,20 @@
COUNT(*)
0
drop table t1;
+CREATE TABLE t1 (a int);
+CREATE TABLE t2 (a int);
+INSERT INTO t1 VALUES (1), (2), (3), (4), (5);
+INSERT INTO t2 VALUES (2), (4), (6);
+SELECT t1.a FROM t1 STRAIGHT_JOIN t2 ON t1.a=t2.a;
+a
+2
+4
+EXPLAIN SELECT t1.a FROM t1 STRAIGHT_JOIN t2 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 5
+1 SIMPLE t2 ALL NULL NULL NULL NULL 3 Using where
+EXPLAIN SELECT t1.a FROM t1 INNER JOIN t2 ON t1.a=t2.a;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t2 ALL NULL NULL NULL NULL 3
+1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where
+DROP TABLE t1,t2;
--- 1.47/mysql-test/t/select.test Thu May 26 03:55:29 2005
+++ 1.48/mysql-test/t/select.test Thu Jun 9 09:15:47 2005
@@ -2255,3 +2255,19 @@
drop table t1;
+#
+# Test for bug #10084: STRAIGHT_JOIN with ON expression
+#
+
+CREATE TABLE t1 (a int);
+CREATE TABLE t2 (a int);
+INSERT INTO t1 VALUES (1), (2), (3), (4), (5);
+INSERT INTO t2 VALUES (2), (4), (6);
+
+SELECT t1.a FROM t1 STRAIGHT_JOIN t2 ON t1.a=t2.a;
+
+EXPLAIN SELECT t1.a FROM t1 STRAIGHT_JOIN t2 ON t1.a=t2.a;
+EXPLAIN SELECT t1.a FROM t1 INNER JOIN t2 ON t1.a=t2.a;
+
+DROP TABLE t1,t2;
+
| Thread |
|---|
| • bk commit into 5.0 tree (igor:1.1961) BUG#10084 | igor | 9 Jun |