• Sergei Petrunia's avatar
    Window functions: make "ORDER BY window_func" work · cb002d34
    Sergei Petrunia authored
    - When window functions are present, JOIN::simple_order should be set
      to FALSE. (Otherwise, the optimizer may attempt to do a "pre-sorting"
      on the first join_tab. Which can work in some cases, but generally
      isn't)
    
    - filesort tries to only read table fields that it requires. Window
      function requires its temp.table field.  In order to pass this info
      to filesort, added an implementation of Item_window_func::
      register_field_in_read_map.
    cb002d34
win.test 23.4 KB