From: Date: June 15 2005 11:02am Subject: bk commit into 5.0 tree (igor:1.1936) BUG#11285 List-Archive: http://lists.mysql.com/internals/26015 X-Bug: 11285 Message-Id: <20050615090236.4FA42147678@rurik.mysql.com> 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.1936 05/06/15 02:02:25 igor@stripped +3 -0 join_outer.result, join_outer.test: Added a test case for bug #11285. sql_select.cc: Fixed bug #11285. The problem occurred with Item_equal in an 'on expression' that was evaluated to false. mysql-test/r/join_outer.result 1.40 05/06/15 02:01:38 igor@stripped +8 -0 Added a test case for bug #11285. mysql-test/t/join_outer.test 1.29 05/06/15 02:01:23 igor@stripped +12 -0 Added a test case for bug #11285. sql/sql_select.cc 1.334 05/06/15 01:57:43 igor@stripped +1 -1 Fixed bug #11285. The problem occurred with Item_equal in an 'on expression' that was evaluated to false. # 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.333/sql/sql_select.cc Mon Jun 13 06:28:15 2005 +++ 1.334/sql/sql_select.cc Wed Jun 15 01:57:43 2005 @@ -7064,7 +7064,7 @@ List_iterator_fast it(cond_equal->current_level); while ((item_equal= it++)) { - eliminate_item_equal(cond, cond_equal->upper_levels, item_equal); + cond= eliminate_item_equal(cond, cond_equal->upper_levels, item_equal); } } } --- 1.39/mysql-test/r/join_outer.result Sat May 21 08:42:43 2005 +++ 1.40/mysql-test/r/join_outer.result Wed Jun 15 02:01:38 2005 @@ -975,3 +975,11 @@ 0 KERI 10 9 BARRY NULL DROP TABLE t1,t2; +CREATE TABLE t1 (c11 int); +CREATE TABLE t2 (c21 int); +INSERT INTO t1 VALUES (30), (40), (50); +INSERT INTO t2 VALUES (300), (400), (500); +SELECT * FROM t1 LEFT JOIN t2 ON (c11=c21 AND c21=30) WHERE c11=40; +c11 c21 +40 NULL +DROP TABLE t1, t2; --- 1.28/mysql-test/t/join_outer.test Sat May 21 08:42:10 2005 +++ 1.29/mysql-test/t/join_outer.test Wed Jun 15 02:01:23 2005 @@ -698,4 +698,16 @@ DROP TABLE t1,t2; +# +# Test for bug #11285: false Item_equal on expression in outer join +# + +CREATE TABLE t1 (c11 int); +CREATE TABLE t2 (c21 int); +INSERT INTO t1 VALUES (30), (40), (50); +INSERT INTO t2 VALUES (300), (400), (500); + +SELECT * FROM t1 LEFT JOIN t2 ON (c11=c21 AND c21=30) WHERE c11=40; + +DROP TABLE t1, t2;