Skip to content
  • Jorgen Loland's avatar
    6d5eddf6
    Bug#16394084: LOOSE INDEX SCAN WITH QUOTED INT PREDICATE · 6d5eddf6
    Jorgen Loland authored
                  RETURNS RANDOM DATA
         
    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. Thus, instead of having a
    join_tab->select->quick we had a
    join_tab->filesort->select->quick. The fix is to also check if
    the LIS range access method was used as input to filesort and if
    so perform copy_fields.
          
    Filesort is used in this case because MySQL does not trust 
    quoted int to give exact matches. See
    test_if_equality_guarantees_uniqueness(). We may want to remove
    this restriction. See bug 15920635.
    6d5eddf6
    Bug#16394084: LOOSE INDEX SCAN WITH QUOTED INT PREDICATE
    Jorgen Loland authored
                  RETURNS RANDOM DATA
         
    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. Thus, instead of having a
    join_tab->select->quick we had a
    join_tab->filesort->select->quick. The fix is to also check if
    the LIS range access method was used as input to filesort and if
    so perform copy_fields.
          
    Filesort is used in this case because MySQL does not trust 
    quoted int to give exact matches. See
    test_if_equality_guarantees_uniqueness(). We may want to remove
    this restriction. See bug 15920635.
Loading