summaryrefslogtreecommitdiff
path: root/mysql-test/t/join_outer_innodb.test
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2012-02-15 18:08:08 +0100
committerSergei Golubchik <sergii@pisem.net>2012-02-15 18:08:08 +0100
commit25609313ffbd9205e921d0793cf423f711d10ced (patch)
treef04a1c26fabcc5463aca51a860f03131e02d94f7 /mysql-test/t/join_outer_innodb.test
parent47a54a2e087a7c1fc861bcbc114c14987f492cfe (diff)
parent764eeeee74f999fe2107fc362236563be0025093 (diff)
downloadmariadb-git-25609313ffbd9205e921d0793cf423f711d10ced.tar.gz
5.3.4 merge
Diffstat (limited to 'mysql-test/t/join_outer_innodb.test')
-rw-r--r--mysql-test/t/join_outer_innodb.test15
1 files changed, 15 insertions, 0 deletions
diff --git a/mysql-test/t/join_outer_innodb.test b/mysql-test/t/join_outer_innodb.test
index 0d47c4ea57b..c5cf66c816b 100644
--- a/mysql-test/t/join_outer_innodb.test
+++ b/mysql-test/t/join_outer_innodb.test
@@ -61,3 +61,18 @@ ORDER BY pk;
DROP TABLE t1,t2;
--echo # End BUG#58456
+
+#
+# Bug #848652: crash with RIGHT JOIN and GROUP BY
+#
+
+CREATE TABLE t1(a int, b int, KEY (a), PRIMARY KEY (b)) ENGINE=InnoDB;
+
+CREATE TABLE t2 (b int, PRIMARY KEY (b));
+INSERT INTO t2 VALUES (4),(9);
+
+SELECT STRAIGHT_JOIN t1.a FROM t1 RIGHT JOIN t2 ON t1.b = t2.b
+ WHERE (t1.b NOT BETWEEN 1 AND 7 OR t1.a IS NULL AND t1.b = t2.b) AND t2.b = 4
+GROUP BY 1;
+
+DROP TABLE t1,t2;