Bug #46305 | Wrong and variable result on simple JOIN + XOR + subquery optimizations | ||
---|---|---|---|
Submitted: | 20 Jul 2009 12:01 | Modified: | 12 Jan 2010 14:23 |
Reporter: | Philip Stoev | Email Updates: | |
Status: | Can't repeat | Impact on me: | |
Category: | MySQL Server: Optimizer | Severity: | S2 (Serious) |
Version: | 6.0 | OS: | Any |
Assigned to: | Tor Didriksen | CPU Architecture: | Any |
Tags: | optimizer_switch, semijoin, subquery |
[20 Jul 2009 12:01]
Philip Stoev
[9 Dec 2009 7:43]
Tor Didriksen
Currently this grammar (conf/subquery_semijoin.yy) generates queries which makes the server crash. A simplified version of the crashing query is SELECT DISTINCT BIT_XOR( OUTR . `col_datetime_nokey` ) AS X FROM B AS OUTR WHERE ( OUTR . `pk` , OUTR . `col_int_nokey` ) IN ( SELECT INNR . `col_int_nokey` AS X , INNR . `col_int_key` AS Y FROM BB AS INNR2 LEFT JOIN CC AS INNR ON ( INNR2 . `col_varchar_key` >= INNR . `col_varchar_nokey` ) ) If I patch in the (not yet approved) patch for Bug#46692 the server does not crash for the above query. So, there is no point in pursuing this bug until Bug#46692 is fixed.
[9 Dec 2009 7:57]
Øystein Grøvlen
Bug#46692 does not apply if there are more than one row in each table.
[12 Jan 2010 14:23]
Tor Didriksen
The grammar subquery_semijoin.yy has uncovered a series of crash bugs in the server. After the recent bugfixes, I cannot find any more errors. The indicated query now constently returns 0 rows, both with 6.0-codebase-bugfixing and next-mr-bugfixing.