mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge 10.4 into 10.5
This commit is contained in:
@ -2755,3 +2755,34 @@ WHERE t3.pk IN (2);
|
||||
drop view v4;
|
||||
drop table t1,t2,t3,t4;
|
||||
SET optimizer_switch=@org_optimizer_switch;
|
||||
#
|
||||
# MDEV-22866: Crash in join optimizer with constant outer join nest
|
||||
#
|
||||
CREATE TABLE t1 (a INT) ENGINE=MyISAM;
|
||||
INSERT INTO t1 VALUES (1),(2);
|
||||
CREATE TABLE t2 (b INT) ENGINE=MyISAM;
|
||||
INSERT INTO t2 VALUES (3),(4);
|
||||
CREATE TABLE t3 (c INT, KEY(c)) ENGINE=MyISAM;
|
||||
CREATE TABLE t4 (d INT, KEY(d)) ENGINE=MyISAM;
|
||||
INSERT INTO t4 VALUES (5),(6);
|
||||
CREATE TABLE t5 (e INT) ENGINE=MyISAM;
|
||||
INSERT INTO t5 VALUES (7),(8);
|
||||
CREATE TABLE t6 (f INT) ENGINE=MyISAM;
|
||||
INSERT INTO t6 VALUES (9),(10);
|
||||
SELECT *
|
||||
FROM
|
||||
t1
|
||||
LEFT JOIN (
|
||||
t2 LEFT JOIN (
|
||||
t3 JOIN
|
||||
t4 ON t3.c = t4.d and t3.c >2 and t3.c<0
|
||||
) ON t2.b >= t4.d
|
||||
) ON t1.a <= t2.b
|
||||
LEFT JOIN t5 ON t2.b = t5.e
|
||||
LEFT JOIN t6 ON t3.c = t6.f;
|
||||
a b c d e f
|
||||
1 3 NULL NULL NULL NULL
|
||||
2 3 NULL NULL NULL NULL
|
||||
1 4 NULL NULL NULL NULL
|
||||
2 4 NULL NULL NULL NULL
|
||||
drop table t1,t2,t3,t4,t5,t6;
|
||||
|
Reference in New Issue
Block a user