Comment 2 for bug 902356

Revision history for this message
Timour Katchaounov (timour) wrote :

The bug is present only with materialization=on. A simpler test case:

CREATE TABLE t1 (pk INT PRIMARY KEY, a INT, KEY(a) ) ENGINE=InnoDB;
INSERT INTO t1 VALUES (0, 4),(8, 6);

# The view needs to be UNDEFINED or MERGE
CREATE VIEW view_t1 AS SELECT * FROM t1;

set optimizer_switch='materialization=on,in_to_exists=off,semijoin=off';

SELECT * FROM t1 WHERE (2, 9) IN (SELECT DISTINCT a, pk FROM view_t1) OR a = 7;