Comment 6 for bug 611704

Revision history for this message
Philip Stoev (pstoev-askmonty) wrote : Re: Crash in replace_where_subcondition on executing a nested subquery as a stored procedure or prepared statement and semijoin=on

Even simpler test case without prepared statements:

SET SESSION optimizer_switch='semijoin=on,materialization=off,firstmatch=off,loosescan=off';

CREATE TABLE t1 ( f1 int) ;

CREATE TABLE t2 ( f1 int) ;

CREATE TABLE t3 ( f1 int) ;

SELECT * FROM (
        SELECT t3.*
        FROM t2 STRAIGHT_JOIN t3
        ON t3.f1
        AND (t3.f1 ) IN (
                SELECT t1.f1
                FROM t1
        )
) AS alias1;