summaryrefslogtreecommitdiff
path: root/mysql-test/r/join.result
diff options
context:
space:
mode:
authorSergey Petrunya <psergey@askmonty.org>2011-03-01 00:29:59 +0300
committerSergey Petrunya <psergey@askmonty.org>2011-03-01 00:29:59 +0300
commit10b8119ad3e5fa10fdddfb959a2e9878888bfed6 (patch)
tree550f81ccf3fbb2313af55241018f2186c6c4f31e /mysql-test/r/join.result
parent1b03a028fcc4a4ac6337a64c9bb85add5c1ae6bc (diff)
downloadmariadb-git-10b8119ad3e5fa10fdddfb959a2e9878888bfed6.tar.gz
BUG#724275: Crash in JOIN::optimize in maria-5.3
- Make equality-substitution-for-ref-access code in JOIN::optimize() treat join_tab->ref.key_copy correctly (in the way create_ref_for_key() has filled it).
Diffstat (limited to 'mysql-test/r/join.result')
-rw-r--r--mysql-test/r/join.result34
1 files changed, 34 insertions, 0 deletions
diff --git a/mysql-test/r/join.result b/mysql-test/r/join.result
index e8df0cfec2f..749e58df26f 100644
--- a/mysql-test/r/join.result
+++ b/mysql-test/r/join.result
@@ -1251,3 +1251,37 @@ Handler_read_rnd 0
Handler_read_rnd_next 1
DROP TABLE t1, t2;
End of 5.1 tests
+#
+# BUG#724275: Crash in JOIN::optimize in maria-5.3
+#
+create table t1 (a int);
+insert into t1 values (1),(2);
+insert into t1 select * from t1;
+create table t2 (a int, b int, key(a,b));
+insert into t2 values (1,1),(1,2),(1,3),(1,4),(2,5),(2,6),(2,7),(2,8),(2,9);
+insert into t2 select * from t2;
+insert into t2 select * from t2;
+insert into t2 select * from t2;
+create table t3 (a int, b int, key(a));
+insert into t3 values (1,1),(2,2);
+select * from
+t3 straight_join t1 straight_join t2 force index(a)
+where t2.a=1 and t2.b=t1.a and t1.a=t3.b and t3.a=1;
+a b a a b
+1 1 1 1 1
+1 1 1 1 1
+1 1 1 1 1
+1 1 1 1 1
+1 1 1 1 1
+1 1 1 1 1
+1 1 1 1 1
+1 1 1 1 1
+1 1 1 1 1
+1 1 1 1 1
+1 1 1 1 1
+1 1 1 1 1
+1 1 1 1 1
+1 1 1 1 1
+1 1 1 1 1
+1 1 1 1 1
+drop table t1,t2,t3;