summaryrefslogtreecommitdiff
path: root/mysql-test/t/subselect_sj2.test
diff options
context:
space:
mode:
authorSergey Petrunya <psergey@askmonty.org>2012-03-27 14:43:26 +0400
committerSergey Petrunya <psergey@askmonty.org>2012-03-27 14:43:26 +0400
commit84a53543c5cca294e771cd7629e8beb8327320f5 (patch)
tree7c6b6c57df5d5888d9fe1aede735ea6061483f02 /mysql-test/t/subselect_sj2.test
parentff731f39ca150d30b098f2513df7ea1d2a6bb22d (diff)
downloadmariadb-git-84a53543c5cca294e771cd7629e8beb8327320f5.tar.gz
BUG#965872: Server crashes in embedding_sjm on a simple 1-table select with AND and OR
- This is a regession introduced by fix for BUG#951937 - The problem was that there were scenarios where check_simple_equality() would create an Item_equal object but would not call item_equal->set_context_field() on it. - The fix was to add the missing calls.
Diffstat (limited to 'mysql-test/t/subselect_sj2.test')
-rw-r--r--mysql-test/t/subselect_sj2.test10
1 files changed, 10 insertions, 0 deletions
diff --git a/mysql-test/t/subselect_sj2.test b/mysql-test/t/subselect_sj2.test
index 2b8c5597719..b9a1b91771e 100644
--- a/mysql-test/t/subselect_sj2.test
+++ b/mysql-test/t/subselect_sj2.test
@@ -1175,6 +1175,16 @@ SELECT * FROM t2
DROP VIEW v1;
DROP TABLE t1, t2;
+--echo #
+--echo # BUG#965872: Server crashes in embedding_sjm on a simple 1-table select with AND and OR
+--echo # (this is a regression caused by the fix for BUG#951937)
+CREATE TABLE t1 ( a INT, b INT, c INT, d INT );
+INSERT INTO t1 VALUES (4,2,8,9),(4,2,7,8);
+
+SELECT * FROM t1
+WHERE a = d AND ( b = 50 AND b = d OR a = c );
+DROP TABLE t1;
+
--echo #
--echo # BUG#951283: Wrong result (missing rows) with semijoin+firstmatch, IN/ANY subquery
--echo #