Loading mysql-test/r/join_outer.result +8 −0 Original line number Diff line number Diff line Loading @@ -975,3 +975,11 @@ EMPNUM NAME GRP 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; mysql-test/t/join_outer.test +12 −0 Original line number Diff line number Diff line Loading @@ -698,4 +698,16 @@ SELECT * FROM v1 WHERE EMPNUM < 10; 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; sql/sql_select.cc +1 −1 Original line number Diff line number Diff line Loading @@ -7064,7 +7064,7 @@ static COND* substitute_for_best_equal_field(COND *cond, List_iterator_fast<Item_equal> 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); } } } Loading Loading
mysql-test/r/join_outer.result +8 −0 Original line number Diff line number Diff line Loading @@ -975,3 +975,11 @@ EMPNUM NAME GRP 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;
mysql-test/t/join_outer.test +12 −0 Original line number Diff line number Diff line Loading @@ -698,4 +698,16 @@ SELECT * FROM v1 WHERE EMPNUM < 10; 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;
sql/sql_select.cc +1 −1 Original line number Diff line number Diff line Loading @@ -7064,7 +7064,7 @@ static COND* substitute_for_best_equal_field(COND *cond, List_iterator_fast<Item_equal> 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); } } } Loading