1. 20 Mar, 2007 1 commit
    • gkodinov/kgeorge@macbook.local's avatar
      Bug #24484: · 28962a76
      gkodinov/kgeorge@macbook.local authored
      To correctly decide which predicates can be evaluated with a given table
      the optimizer must know the exact set of tables that a predicate depends 
      on. If that mask is too wide (refer to non-existing tables) the optimizer
      can erroneously skip a predicate.
      One such case of wrong table usage mask were the aggregate functions.
      The have a all-1 mask (meaning depend on all tables, including non-existent
      ones).
      Fixed by making a real used_tables mask for the aggregates. The mask is
      constructed in the following way :
      1. OR the table dependency masks of all the arguments of the aggregate.
      2. If all the arguments of the function are from the local name resolution 
        context and it is evaluated in the same name resolution
        context where it is referenced all the tables from that name resolution 
        context are OR-ed to the dependency mask. This is to denote that an
        aggregate function depends on the number of rows it processes.
      3. Handle correctly the case of an aggregate function optimization (such that
        the aggregate function can be pre-calculated and made a constant).
      
      Made sure that an aggregate function is never a constant (unless subject of a 
      specific optimization and pre-calculation).  
      
      One other flaw was revealed and fixed in the process : references were 
      not calling the recalculation method for used_tables of their targets.
      28962a76
  2. 01 Feb, 2007 6 commits
  3. 31 Jan, 2007 6 commits
  4. 30 Jan, 2007 4 commits
  5. 27 Jan, 2007 1 commit
    • igor@olga.mysql.com's avatar
      Fixed bug #24420. · e8977809
      igor@olga.mysql.com authored
      Objects of the classes Item_func_is_not_null_test and Item_func_trig_cond
      must be transparent for the method Item::split_sum_func2 as these classes
      are pure helpers. It means that the method Item::split_sum_func2 should
      look at those objects as at pure wrappers.
      e8977809
  6. 26 Jan, 2007 5 commits
  7. 25 Jan, 2007 1 commit
  8. 24 Jan, 2007 16 commits