• Chaithra Gopalareddy's avatar
    Bug #20730129: BACKPORT BUG#19612819 TO 5.1 · a2cd622f
    Chaithra Gopalareddy authored
    Backport from mysql-5.5 to mysql-5.1
    
    Bug #19612819 :  FILESORT: ASSERTION FAILED: POS->FIELD != 0 || POS->ITEM != 0
    
    Problem:
    While getting the temp table field for a REF_ITEM
    make_sortorder is using the real_item. As a result
    server fails later with an assert.
    
    Solution:
    Do not use real_item to get the temp table field.
    Instead use the REF_ITEM itself as temp table fields
    are created for REF_ITEM not the real_item.
    a2cd622f
sql_select.cc 557 KB