MDEV-18635 The test case for bug mdev-16727 crashes the server
in the tree bb-10.4-mdev7486 The crash was caused because after merge of bb-10.4-mdev7486 and 10.4 branches changes for mdev-16727 were missing.
This commit is contained in:
parent
e4f1094c50
commit
d25af33116
@ -3836,13 +3836,24 @@ DROP TABLE t1;
|
||||
# of multiple equalities
|
||||
#
|
||||
CREATE TABLE t1 (a varchar(1));
|
||||
INSERT INTO `t1` VALUES ('x'), ('y'), ('z');
|
||||
INSERT INTO t1 VALUES ('x'), ('y'), ('z');
|
||||
CREATE TABLE t2 (b varchar(1));
|
||||
INSERT INTO t2 VALUES ('x');
|
||||
CREATE TABLE t3 (c varchar(1));
|
||||
INSERT INTO t3 VALUES ('y');
|
||||
CREATE TABLE t4 (d varchar(1));
|
||||
INSERT INTO t4 VALUES ('x'), ('z');
|
||||
SELECT * FROM t1
|
||||
JOIN t2 ON (t1.a=t2.b)
|
||||
LEFT JOIN t3 ON (t1.a=t3.c)
|
||||
WHERE (t1.a) IN
|
||||
(
|
||||
SELECT t4.d
|
||||
FROM t4
|
||||
ORDER BY t4.d
|
||||
);
|
||||
a b c
|
||||
x x NULL
|
||||
DROP TABLE t1,t2,t3,t4;
|
||||
#
|
||||
# MDEV-17360: IN subquery predicate with outer reference in the left part
|
||||
|
@ -799,7 +799,7 @@ DROP TABLE t1;
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (a varchar(1));
|
||||
INSERT INTO `t1` VALUES ('x'), ('y'), ('z');
|
||||
INSERT INTO t1 VALUES ('x'), ('y'), ('z');
|
||||
|
||||
CREATE TABLE t2 (b varchar(1));
|
||||
INSERT INTO t2 VALUES ('x');
|
||||
@ -810,15 +810,15 @@ INSERT INTO t3 VALUES ('y');
|
||||
CREATE TABLE t4 (d varchar(1));
|
||||
INSERT INTO t4 VALUES ('x'), ('z');
|
||||
|
||||
# SELECT * FROM t1
|
||||
# JOIN t2 ON (t1.a=t2.b)
|
||||
# LEFT JOIN t3 ON (t1.a=t3.c)
|
||||
# WHERE (t1.a) IN
|
||||
# (
|
||||
# SELECT t4.d
|
||||
# FROM t4
|
||||
# ORDER BY t4.d
|
||||
# );
|
||||
SELECT * FROM t1
|
||||
JOIN t2 ON (t1.a=t2.b)
|
||||
LEFT JOIN t3 ON (t1.a=t3.c)
|
||||
WHERE (t1.a) IN
|
||||
(
|
||||
SELECT t4.d
|
||||
FROM t4
|
||||
ORDER BY t4.d
|
||||
);
|
||||
|
||||
DROP TABLE t1,t2,t3,t4;
|
||||
|
||||
|
@ -5803,7 +5803,7 @@ Item *and_new_conditions_to_optimized_cond(THD *thd, Item *cond,
|
||||
if (equality->fix_fields(thd, NULL))
|
||||
return NULL;
|
||||
}
|
||||
*cond_eq= &new_cond_equal;
|
||||
(*cond_eq)->copy(new_cond_equal);
|
||||
}
|
||||
new_conds_list.append((List<Item> *)&new_cond_equal.current_level);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user