MDEV-8989: ORDER BY optimizer ignores equality propagation

Post-fix #2:
- Update test results
- Make the optimization conditional under @@optimizer_switch flag.
- The optimization is now disabled by default, so .result files
  are changed back to be what they were before the MDEV-8989 patch.
This commit is contained in:
Sergei Petrunia 2016-06-01 23:43:11 +03:00
commit 5a5a54f7b4
16 changed files with 50 additions and 34 deletions

View file

@ -2000,6 +2000,8 @@ drop table t1,t2;
--echo #
--echo # MDEV-8989: ORDER BY optimizer ignores equality propagation
--echo #
set @tmp_8989=@@optimizer_switch;
set optimizer_switch='orderby_uses_equalities=on';
create table t0(a int);
insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
@ -2075,3 +2077,7 @@ explain select * from t3 where b=a order by a limit 10;
explain select * from t3 where b=a order by b limit 10;
drop table t0,t1,t2,t3;
set @@optimizer_switch=@tmp_8989;
set optimizer_switch='orderby_uses_equalities=on';