• gkodinov/kgeorge@macbook.local's avatar
    Bug #22781: SQL_BIG_RESULT fails to influence sort plan · 13633864
    gkodinov/kgeorge@macbook.local authored
     Currently SQL_BIG_RESULT is checked only at compile time.
     However, additional optimizations may take place after
     this check that change the sort method from 'filesort'
     to sorting via index. As a result the actual plan
     executed is not the one specified by the SQL_BIG_RESULT
     hint. Similarly, there is no such test when executing
     EXPLAIN, resulting in incorrect output.
     The patch corrects the problem by testing for
     SQL_BIG_RESULT both during the explain and execution
     phases.
    13633864
group_by.test 27.8 KB