Details
-
Bug
-
Status: In Review (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.4(EOL), 10.5, 10.6, 10.11, 11.0(EOL), 11.1(EOL), 11.2(EOL), 11.3(EOL)
-
None
-
None
Description
Test case:
CREATE TABLE t1(a INT) ENGINE=MYISAM;
|
INSERT INTO t1(a) VALUES (1);
|
 |
SELECT a FROM t1 WHERE (SELECT a,a) IN (SELECT a,a);
|
SELECT a FROM t1 WHERE (SELECT a,a) IN (SELECT 1,1);
|
SELECT a FROM t1 WHERE (SELECT a,a UNION SELECT 1,a FROM t1 ) IN (SELECT 1,1);
|
SELECT a FROM t1 WHERE (SELECT a,a UNION SELECT 1,a FROM t1 ) IN (SELECT a,a);
|
Note that these queries do not fail if the table engine is InnoDB. In order these query to fail with a debug assertion the optimizer should apply single row substitution which is done for MyISAM tables, but not for InnoDB tables. For InnoDB tables we can achieve the same failure using single row substitution for primary keys.
Attachments
Issue Links
- is duplicated by
-
MDEV-22375 Assertion `(engine->uncacheable() & ~8) || ! engine->is_executed() || with_recursive_reference' failed in Item_in_subselect::val_bool
- Closed
- relates to
-
MDEV-29070 SIGSEGV in my_decimal::operator= and Assertion `0' failed in Item_type_holder::val_decimal on SELECT
- Closed
-
MDEV-35654 Re-evaluation of constant subquery triggers debug assertion
- In Review