From 84a53543c5cca294e771cd7629e8beb8327320f5 Mon Sep 17 00:00:00 2001 From: Sergey Petrunya Date: Tue, 27 Mar 2012 14:43:26 +0400 Subject: 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. --- mysql-test/t/subselect_sj2.test | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'mysql-test/t/subselect_sj2.test') 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 # -- cgit v1.2.1