Details
Description
CREATE TABLE t1 (column1 INT) ENGINE=MyISAM;
INSERT INTO t1 VALUES (3),(9);
CREATE TABLE t2 (column2 INT, column2_2 INT) ENGINE=MyISAM;
INSERT INTO t2 VALUES (1,1),(4,4);
CREATE TABLE t3 (column3 INT, column3_2 INT) ENGINE=MyISAM;
INSERT INTO t3 VALUES (6, 6),(8, 8);
CREATE TABLE t4 (column4 INT) ENGINE=MyISAM;
INSERT INTO t4 VALUES (2),(5);
PREPARE stmt FROM "
SELECT (
SELECT MAX( table1.column1 ) AS field1
FROM t1 AS table1
WHERE (table3.column3, table3.column3_2) IN ( SELECT table2.column2, table2.column2_2 AS field2 FROM t2 AS table2 )
) AS sq
FROM t3 AS table3, t4 AS table4 GROUP BY sq
";
EXECUTE stmt;
EXECUTE stmt;
deallocate prepare stmt;
drop table t1,t2,t3,t4;
Gliffy Diagrams
Attachments
Issue Links
- relates to
-
MDEV-7846 Server crashes in Item_subselect::fix_fields or fails with Thread stack overrun
-
- In Review
-
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions
The problem is that converting to semi-join makes reference on temporary Items.
Solution is to make reference via row object which was disassembled using Item_ref inherited object:
but dif above makes crashes in other tests