Comment 1 for bug 608416

Patrick Crews (patrick-crews) wrote :

Failing query:
EXPLAIN EXTENDED SELECT table2 . `col_enum_not_null_key` AS field1 , table1 . `col_char_1024_key` AS field2 FROM ( ( SELECT SUBQUERY1_t1 . * FROM ( BB AS SUBQUERY1_t1 RIGHT JOIN AA AS SUBQUERY1_t2 ON (SUBQUERY1_t2 . `col_int_not_null_key` = SUBQUERY1_t1 . `col_int_key` ) ) ) AS table1 INNER JOIN ( ( DD AS table2 STRAIGHT_JOIN BB AS table3 ON (table3 . `col_char_10_not_null_key` = table2 . `col_char_key` ) ) ) ON (table3 . `col_char_key` = table2 . `col_text_not_null` ) ) WHERE ( ( SELECT MIN( SUBQUERY2_t2 . `col_char_10_not_null_key` ) AS SUBQUERY2_field1 FROM AA AS SUBQUERY2_t1 WHERE ( EXISTS ( ( SELECT CHILD_SUBQUERY1_t2 . `col_char_10_not_null_key` AS CHILD_SUBQUERY1_field1 FROM ( BB AS CHILD_SUBQUERY1_t1 INNER JOIN AA AS CHILD_SUBQUERY1_t2 ON (CHILD_SUBQUERY1_t2 . `col_int_key` = CHILD_SUBQUERY1_t1 . `pk` ) ) WHERE ( CHILD_SUBQUERY1_t2 . `col_char_10_not_null_key` > 'y' AND CHILD_SUBQUERY1_t1 . `col_int_not_null_key` = CHILD_SUBQUERY1_t1 . `col_int_not_null` ) HAVING CHILD_SUBQUERY1_t2 . `col_bigint_key` >= 3) ) AND SUBQUERY2_t1 . `col_int_key` != 8 ) ) IS NOT NULL ) AND ( table1 . `col_int_key` = 160 AND table1 . `col_int_key` = 197 ) AND table3 . `col_text_not_null` >= 'g' GROUP BY field1, field2