1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

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.
This commit is contained in:
Sergey Petrunya
2012-03-27 14:43:26 +04:00
parent ff731f39ca
commit 84a53543c5
5 changed files with 39 additions and 0 deletions

View File

@ -1043,6 +1043,15 @@ y y
y y
DROP VIEW v1;
DROP TABLE t1, t2;
#
# BUG#965872: Server crashes in embedding_sjm on a simple 1-table select with AND and OR
# (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 );
a b c d
DROP TABLE t1;
#
# BUG#951283: Wrong result (missing rows) with semijoin+firstmatch, IN/ANY subquery
#

View File

@ -1057,6 +1057,15 @@ y y
y y
DROP VIEW v1;
DROP TABLE t1, t2;
#
# BUG#965872: Server crashes in embedding_sjm on a simple 1-table select with AND and OR
# (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 );
a b c d
DROP TABLE t1;
#
# BUG#951283: Wrong result (missing rows) with semijoin+firstmatch, IN/ANY subquery
#

View File

@ -1045,6 +1045,15 @@ y y
y y
DROP VIEW v1;
DROP TABLE t1, t2;
#
# BUG#965872: Server crashes in embedding_sjm on a simple 1-table select with AND and OR
# (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 );
a b c d
DROP TABLE t1;
#
# BUG#951283: Wrong result (missing rows) with semijoin+firstmatch, IN/ANY subquery
#

View File

@ -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 #