Loading mysql-test/r/select.result +17 −0 Original line number Diff line number Diff line Loading @@ -2943,3 +2943,20 @@ select * from t1 join t2 join t4 using (c); c a b 1 1 1 drop table t1, t2, t3, t4; create table t1(x int, y int); create table t2(x int, y int); create table t3(x int, primary key(x)); insert into t1 values (1, 1), (2, 1), (3, 1), (4, 3), (5, 6), (6, 6); insert into t2 values (1, 1), (2, 1), (3, 3), (4, 6), (5, 6); insert into t3 values (1), (2), (3), (4), (5); select t1.x, t3.x from t1, t2, t3 where t1.x = t2.x and t3.x >= t1.y and t3.x <= t2.y; x x 1 1 2 1 3 1 3 2 3 3 4 3 4 4 4 5 drop table t1,t2,t3; mysql-test/t/select.test +12 −0 Original line number Diff line number Diff line Loading @@ -2523,3 +2523,15 @@ 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; # # Bug #12291 Table wasn't reinited for index scan after sequential scan # create table t1(x int, y int); create table t2(x int, y int); create table t3(x int, primary key(x)); insert into t1 values (1, 1), (2, 1), (3, 1), (4, 3), (5, 6), (6, 6); insert into t2 values (1, 1), (2, 1), (3, 3), (4, 6), (5, 6); insert into t3 values (1), (2), (3), (4), (5); select t1.x, t3.x from t1, t2, t3 where t1.x = t2.x and t3.x >= t1.y and t3.x <= t2.y; drop table t1,t2,t3; sql/opt_range.cc +3 −4 Original line number Diff line number Diff line Loading @@ -750,10 +750,9 @@ int QUICK_RANGE_SELECT::init() { DBUG_ENTER("QUICK_RANGE_SELECT::init"); if (file->inited == handler::NONE) if (file->inited != handler::NONE) file->ha_index_or_rnd_end(); DBUG_RETURN(error= file->ha_index_init(index)); error= 0; DBUG_RETURN(0); } Loading Loading
mysql-test/r/select.result +17 −0 Original line number Diff line number Diff line Loading @@ -2943,3 +2943,20 @@ select * from t1 join t2 join t4 using (c); c a b 1 1 1 drop table t1, t2, t3, t4; create table t1(x int, y int); create table t2(x int, y int); create table t3(x int, primary key(x)); insert into t1 values (1, 1), (2, 1), (3, 1), (4, 3), (5, 6), (6, 6); insert into t2 values (1, 1), (2, 1), (3, 3), (4, 6), (5, 6); insert into t3 values (1), (2), (3), (4), (5); select t1.x, t3.x from t1, t2, t3 where t1.x = t2.x and t3.x >= t1.y and t3.x <= t2.y; x x 1 1 2 1 3 1 3 2 3 3 4 3 4 4 4 5 drop table t1,t2,t3;
mysql-test/t/select.test +12 −0 Original line number Diff line number Diff line Loading @@ -2523,3 +2523,15 @@ 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; # # Bug #12291 Table wasn't reinited for index scan after sequential scan # create table t1(x int, y int); create table t2(x int, y int); create table t3(x int, primary key(x)); insert into t1 values (1, 1), (2, 1), (3, 1), (4, 3), (5, 6), (6, 6); insert into t2 values (1, 1), (2, 1), (3, 3), (4, 6), (5, 6); insert into t3 values (1), (2), (3), (4), (5); select t1.x, t3.x from t1, t2, t3 where t1.x = t2.x and t3.x >= t1.y and t3.x <= t2.y; drop table t1,t2,t3;
sql/opt_range.cc +3 −4 Original line number Diff line number Diff line Loading @@ -750,10 +750,9 @@ int QUICK_RANGE_SELECT::init() { DBUG_ENTER("QUICK_RANGE_SELECT::init"); if (file->inited == handler::NONE) if (file->inited != handler::NONE) file->ha_index_or_rnd_end(); DBUG_RETURN(error= file->ha_index_init(index)); error= 0; DBUG_RETURN(0); } Loading