summaryrefslogtreecommitdiff
path: root/mysql-test/t/join_outer.test
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2010-10-27 16:31:22 -0700
committerIgor Babaev <igor@askmonty.org>2010-10-27 16:31:22 -0700
commit4f75a8254a3d65df031f4a3ea7ad44bb07917280 (patch)
tree40d6e05a135292981e2f3ce6246db2a7170c30cf /mysql-test/t/join_outer.test
parent851b2c3a025722101c7a0823dd03ff259196388c (diff)
parent0c53cd1ec9cbc50daf5b8d7c9f11e10f4d1fe564 (diff)
downloadmariadb-git-4f75a8254a3d65df031f4a3ea7ad44bb07917280.tar.gz
Merge 5.3-mwl128 -> 5.3
Diffstat (limited to 'mysql-test/t/join_outer.test')
-rw-r--r--mysql-test/t/join_outer.test44
1 files changed, 44 insertions, 0 deletions
diff --git a/mysql-test/t/join_outer.test b/mysql-test/t/join_outer.test
index b14d9a40300..aed1450e607 100644
--- a/mysql-test/t/join_outer.test
+++ b/mysql-test/t/join_outer.test
@@ -1030,4 +1030,48 @@ select t2.pk,
drop table t1,t2,t3,t4;
+--echo #
+--echo # Bug#57024: Poor performance when conjunctive condition over the outer
+--echo # table is used in the on condition of an outer join
+--echo #
+
+create table t1 (a int);
+insert into t1 values (NULL), (NULL), (NULL), (NULL);
+insert into t1 select * from t1;
+insert into t1 select * from t1;
+insert into t1 select * from t1;
+insert into t1 select * from t1;
+insert into t1 select * from t1;
+insert into t1 select * from t1;
+insert into t1 select * from t1;
+insert into t1 select * from t1;
+insert into t1 select * from t1;
+insert into t1 select * from t1;
+insert into t1 select * from t1;
+insert into t1 select * from t1;
+insert into t1 select * from t1;
+insert into t1 select * from t1;
+insert into t1 select * from t1;
+insert into t1 select * from t1;
+insert into t1 select * from t1;
+insert into t1 select * from t1;
+insert into t1 values (4), (2), (1), (3);
+
+create table t2 like t1;
+insert into t2 select if(t1.a is null, 10, t1.a) from t1;
+
+create table t3 (a int, b int, index idx(a));
+insert into t3 values (1, 100), (3, 301), (4, 402), (1, 102), (1, 101);
+
+analyze table t1,t2,t3;
+
+flush status;
+select sum(t3.b) from t1 left join t3 on t3.a=t1.a and t1.a is not null;
+show status like "handler_read%";
+flush status;
+select sum(t3.b) from t2 left join t3 on t3.a=t2.a and t2.a <> 10;
+show status like "handler_read%";
+
+drop table t1,t2,t3;
+
--echo End of 5.1 tests