• unknown's avatar
    Bug #24778: Innodb: No result when using ORDER BY · f3e261a9
    unknown authored
    This bug was intruduced by the fix for bug#17212 (in 4.1). It is not 
    ok to call test_if_skip_sort_order since this function will 
    alter the execution plan. By contract it is not ok to call 
    test_if_skip_sort_order in this context.
    
    This bug appears only in the case when the optimizer has chosen 
    an index for accessing a particular table but finds a covering 
    index that enables it to skip ORDER BY. This happens in 
    test_if_skip_sort_order.
    
    
    mysql-test/r/key.result:
      Bug#24778
      
      test case.
      
      The bug causes the result to be the empty set.
    mysql-test/t/key.test:
      Bug#24778
      
      The minimal test case that reveals the bug. The reason for such a 
      complicated schema is that we have to convince the optimizer to 
      pick one index, then discard it in order to be able to skip 
      ORDER BY.
    sql/sql_select.cc:
      bug#24778
      
      Removed the call to test_if_skip_sort_order that constituted the
      bug.
    f3e261a9
key.result 15.1 KB