• MySQL Build Team's avatar
    Backport into build-200906240007-5.1.34sp1 · e82378ac
    MySQL Build Team authored
    > ------------------------------------------------------------
    > revno: 2852.12.6
    > tags: clone-5.1.35-build, mysql-5.1.35
    > revision-id: gshchepa@mysql.com-20090513075139-g50shsfjaf1dstdn
    > parent: joerg@mysql.com-20090508190407-ymqxmp6daeta6fdj
    > committer: Gleb Shchepa <gshchepa@mysql.com>
    > branch nick: mysql-5.1
    > timestamp: Wed 2009-05-13 12:51:39 +0500
    > message:
    >   Bug #44290: explain crashes for subquery with distinct in
    >               SQL_SELECT::test_quick_select
    >   
    >   The crash was caused by an incomplete cleanup of JOIN_TAB::select
    >   during the filesort of rows for GROUP BY clause inside a subquery.
    >   Queries where a quick index access is replaced with filesort was
    >   was affected. For example:
    >   
    >     SELECT 1 FROM
    >       (SELECT COUNT(DISTINCT c1) FROM t1
    >          WHERE c2 IN (1, 1) AND c3 = 2 GROUP BY c2) x
    >   
    >   Quick index access related data in the SQL_SELECT::test_quick_select
    >   function was inconsistent after an incomplete cleanup.
    >   This function has been completed to prevent crashes in the
    >   SQL_SELECT::test_quick_select function.
    e82378ac
mix1.inc 42.9 KB