1. 23 Mar, 2016 1 commit
    • Sergei Petrunia's avatar
      Fix a PS re-execution problem and code cleanup · d8b8b5af
      Sergei Petrunia authored
      - Make Item_XXX::cleanup() clean List<Cached_item> orderby_fields.
        (Items survive across PS re-executions. Cached_item don't, because
         they keep pointers to fix_field'ed items, etc)
      - Move List<Cached_item> out into Group_bound_tracker.
      d8b8b5af
  2. 22 Mar, 2016 1 commit
    • Igor Babaev's avatar
      Changed the base class for Item_window_func from Item_result_field to · 602e15a0
      Igor Babaev authored
      Item_func_or_sum.
      Implemented method update_used_tables for class Item_findow_func.
      Added the flag Item::with_window_func.
      Made sure that window functions could be used only in SELECT list
      and ORDER BY clause.
      Added test cases that checked different illegal placements of
      window functions.
      602e15a0
  3. 18 Mar, 2016 3 commits
  4. 17 Mar, 2016 7 commits
  5. 16 Mar, 2016 2 commits
  6. 15 Mar, 2016 6 commits
    • Vicențiu Ciorbaru's avatar
      Implemented avg() window function. · 21651541
      Vicențiu Ciorbaru authored
      It is based on the sum() function, thus much of the logic is shared.
      
      Considering that there are 2 counters stored within the function, one
      that handles the null value, while the other that handles the divisor
      for the avg computation, it is possible to remove the counter from the
      Item_sum_avg. I have not removed it in this patch as we may choose to
      refactor the whole code into a separate class.
      This remains to be dicussed.
      21651541
    • Vicențiu Ciorbaru's avatar
      Fix 2 more bugs in item_windowfunc. · aa74fef2
      Vicențiu Ciorbaru authored
      1. Item_windowfunc must check the nullness of the field if it returns the
         value from the result_field.
      2. The decimal value must come from the window_func instead of the
         result_field when not fetching values from the result_field.
      
      Added a more extensive test case that highlights if these bugs occur.
      The 2 select statements check behaviour for decimal and real typed
      fields respectively.
      aa74fef2
    • Vicențiu Ciorbaru's avatar
      Remove no longer needed TODO. · 350903e9
      Vicențiu Ciorbaru authored
      350903e9
    • Vicențiu Ciorbaru's avatar
      Make sure to return the result value when calling Item_windowfunc::val_real() · 333ac13b
      Vicențiu Ciorbaru authored
      This caused Item_windowfunc to return garbage.
      333ac13b
    • Sergei Petrunia's avatar
      Continuation of "Implemented a counter within Item_sum_sum" a few commits before · 83330431
      Sergei Petrunia authored
      Query result had 0 where it should have had NULLs:
      - Make Item_window_func::val* functions honor NULL-handling conventions:
        1. set null_value to indicate whether we've returned a NULL value
        2. val_str and val_decimal should return NULL pointer when they're
           returning SQL NULL value.
      
      Fix assertion failure when sending results to network.
      - The assert was due to window func returing SQL NULL despite having
        maybe_null=false
      - Fixed by settting Item_window_func::maybe_null correctly in fix_fields
      83330431
    • Sergei Petrunia's avatar
      MDEV-8646: Re-engineer the code for post-join operations · 21a0291c
      Sergei Petrunia authored
      Make query pushdown work in the post-refactored code.
      This fixes sequence.group_by test.
      21a0291c
  7. 14 Mar, 2016 4 commits
  8. 13 Mar, 2016 2 commits
  9. 11 Mar, 2016 3 commits
  10. 10 Mar, 2016 1 commit
  11. 07 Mar, 2016 3 commits
  12. 06 Mar, 2016 2 commits
  13. 03 Mar, 2016 2 commits
  14. 02 Mar, 2016 3 commits