• Aditya A's avatar
    Bug#17588348: INDEX MERGE USED ON PARTITIONED TABLE · 097a5b59
    Aditya A authored
                   CAN RETURN WRONG RESULT SET
    
    PROBLEM
    -------
    In ha_partition::cmp_ref() we were only calling the 
    underlying cmp_ref() of storage engine if the records
    are in the same partiton,else we sort by partition and
    returns the result.But the index merge intersect 
    algorithm expects first to sort by row-id first and 
    then by partition id.
    
    FIX
    ---
    Compare the refernces first using storage engine cmp_ref
    and then if references are equal(only happens if 
    non clustered index is used) then sort it by partition id.
    
    [Approved by Mattiasj #rb3755]
    -
    097a5b59
ha_partition.cc 240 KB