• Jorgen Loland's avatar
    Bug#16394084: LOOSE INDEX SCAN WITH QUOTED INT PREDICATE · 30e2a543
    Jorgen Loland authored
                  RETURNS RANDOM DATA
                     
    MySQL 5.5 specific version of bugfix.
          
    When Loose Index Scan Range access is used, MySQL execution needs
    to copy non-aggregated fields. end_send() checked if this was
    necessary by checking if join_tab->select->quick had type
    QS_TYPE_GROUP_MIN_MAX.
          
    In this bug, however, MySQL created a sort index to sort the rows
    read from this range access method. create_sort_index() deletes
    join_tab->select->quick which makes it impossible to inquire
    the join_tab if LIS has been used.
          
    The fix for MySQL 5.5 is to introduce a variable in JOIN_TAB
    that stores whether or not LIS has been used. There is no need
    for this variable in later MySQL versions because the relevant
    code has been refactored.
    30e2a543
sql_select.cc 575 KB