mirror of
https://github.com/MariaDB/server.git
synced 2026-05-15 19:37:16 +02:00
BUG#868908: Crash in check_simple_equality() with semijoin + materialization + prepared statement
- Part 1 of the fix: for semi-join merged subqueries, calling child_join->optimize() until we're done with all PS-lifetime optimizations in the parent.
This commit is contained in:
parent
264aaf111d
commit
8e25dcfcd7
11 changed files with 225 additions and 34 deletions
|
|
@ -1427,7 +1427,30 @@ ON ( t2.f5 ) IN (
|
|||
);
|
||||
|
||||
DROP TABLE t1, t2, t3, t4, t5;
|
||||
--echo #
|
||||
--echo # BUG#868908: Crash in check_simple_equality() with semijoin + materialization + prepared statement
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 ( a int );
|
||||
CREATE TABLE t3 ( b int, c int) ;
|
||||
CREATE TABLE t2 ( a int ) ;
|
||||
CREATE TABLE t4 ( a int , c int) ;
|
||||
|
||||
PREPARE st1 FROM "
|
||||
SELECT STRAIGHT_JOIN *
|
||||
FROM t1
|
||||
WHERE ( 3 ) IN (
|
||||
SELECT t3.b
|
||||
FROM t3
|
||||
LEFT JOIN (
|
||||
t2 STRAIGHT_JOIN t4 ON ( t4.c = t2.a )
|
||||
) ON ( t4.a = t3.c )
|
||||
);
|
||||
";
|
||||
EXECUTE st1;
|
||||
EXECUTE st1;
|
||||
|
||||
DROP TABLE t1,t2,t3,t4;
|
||||
|
||||
--echo # This must be at the end:
|
||||
set optimizer_switch=@subselect_sj_mat_tmp;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue