1. 14 Oct, 2013 1 commit
  2. 12 Oct, 2013 1 commit
    • Igor Babaev's avatar
      Fixed bug mdev-5132. · b47707f3
      Igor Babaev authored
      Objects of the classes Item_func_isnull and Item_func_isnotnull
      must have the flag sargable set to TRUE.
      Set the value of the flag sargable only in constructors of the 
      classes inherited from Item_int_func.
      b47707f3
  3. 11 Oct, 2013 1 commit
  4. 10 Oct, 2013 1 commit
    • Igor Babaev's avatar
      Fixed bug mdev-5105. · 22d9f34f
      Igor Babaev authored
      The bug caused a memory overwrite in the function update_ref_and_keys()
      It happened due to a wrong value of SELECT_LEX::cond_count. This value
      historically was calculated by the fix_fields method. Now the logic of
      calling this method became too complicated and, as a result, this value
      is calculated not always correctly.
      The patch changes the way how and when  the values of SELECT_LEX::cond_count
      and of SELECT_LEX::between_count are calculated. The new code does it just at
      the beginning of update_ref_and_keys().
       
      22d9f34f
  5. 04 Oct, 2013 1 commit
    • Igor Babaev's avatar
      Fixed bug mdev-5078. · 1d619086
      Igor Babaev authored
      For aggregated fields from views/derived tables the possible adjustment
      of thd->lex->in_sum_func->max_arg_level in the function Item_field::fix_fields
      must be done before we leave the function.
      1d619086
  6. 03 Oct, 2013 1 commit
    • Igor Babaev's avatar
      Fixed bug mdev-5028. · 64212f11
      Igor Babaev authored
      Apparently in a general case a short-cut for the distinct optimization
      is invalid if join buffers are used to join tables after the tables whose
      values are to selected.
      64212f11
  7. 25 Sep, 2013 1 commit
  8. 16 Sep, 2013 5 commits
  9. 15 Sep, 2013 1 commit
    • Igor Babaev's avatar
      Fixed bug mdev-5015. · 31a57a23
      Igor Babaev authored
      The patch for mdev-4355 had a defect: the cached values for bitmaps of
      used tables were not updated when processing degenerate OR formulas.
      31a57a23
  10. 13 Sep, 2013 1 commit
  11. 12 Sep, 2013 2 commits
  12. 09 Sep, 2013 1 commit
  13. 06 Sep, 2013 1 commit
    • Igor Babaev's avatar
      Fixed bug mdev-4996. · d0f4bbc2
      Igor Babaev authored
      The fix for bug mdev-4971 not always correctly set the pointers to
      inherited multiple equalities in objects of the Item_equal class. 
      d0f4bbc2
  14. 30 Aug, 2013 1 commit
    • Igor Babaev's avatar
      Fixed bug mdev-4971. · 4b6cf9e6
      Igor Babaev authored
      The function propagate_new_equalities() did not updated properly
      the references to inherited multiple equalities.
      4b6cf9e6
  15. 29 Aug, 2013 1 commit
    • Igor Babaev's avatar
      Fixed bug mdev-4962. · 67b51c94
      Igor Babaev authored
      When a non-nullable datetime field is used under an IS NULL predicate
      of the WHERE condition in a query with outer joins the remove_eq_conds
      function should check whether this field belongs to an inner table
      of any outer join that can be, in a general case, a nested outer join.
      67b51c94
  16. 26 Aug, 2013 2 commits
    • Igor Babaev's avatar
      Fixed bug mdev-4952 · 6a6227bb
      Igor Babaev authored
      When in function remove_eq_conds() a sub-formula of the processed condition
      is replaced for another formula we should ensure that in the resulting
      formula AND/OR levels must alternate.
      6a6227bb
    • Igor Babaev's avatar
      Fixed bug mdev-4944. · ea34dca8
      Igor Babaev authored
      The patch to fix mdev-4418 turned out to be incorrect.
      At the substitution of single row tables in make_join_statistics()
      the used multiple equalities may change and references to the new multiple
      equalities must be updated. The function remove_eq_conds() takes care of it and
      it should be called right after the substitution of single row tables.
      Calling it after the call of make_join_statistics was a mistake.
      ea34dca8
  17. 24 Aug, 2013 1 commit
    • Igor Babaev's avatar
      Fixed bug mdev-4942. · 2e981264
      Igor Babaev authored
      Made sure that degenerate conjunctions/disjunctions are obtained from
      AND/OR conditions.
      2e981264
  18. 22 Aug, 2013 1 commit
  19. 21 Aug, 2013 1 commit
  20. 20 Aug, 2013 2 commits
    • Igor Babaev's avatar
      Fixed a bug/typo in the patch for mdev-4355, noticed after the patch · 66775317
      Igor Babaev authored
      had been merged into 5.5.
      
      Corrected the result of the output from the test case for mdev 4895.
      66775317
    • unknown's avatar
      Fix bug MDEV-4895 Valgrind warnings (Conditional jump or move depends on... · d5835791
      unknown authored
      Fix bug MDEV-4895 Valgrind warnings (Conditional jump or move depends on uninitialised value) in Field_datetime::get_date on GREATEST(..) IS NULL
      
      Analysis:
      The cause of the valgrind warning was an attempt to evaluate a Field that was not yet read.
      The reason was that on one hand Item_func_isnotnull was marked as constant by
      Item_func_isnotnull::update_used_tables, and this allowed eval_const_cond() to be called.
      On the other hand Item_func_isnotnull::val_int() evaluated its argument as if it was not
      constant.
      
      Solution:
      The fix make sure that Item_func_isnotnull::val_int() doesn't evaluate its argument when
      it is constant and cannot be NULL, because the result is known in this case. 
      d5835791
  21. 19 Aug, 2013 1 commit
  22. 17 Aug, 2013 1 commit
    • Igor Babaev's avatar
      Fixed bug mdev-4418. · 31380813
      Igor Babaev authored
      After single row substitutions there might appear new equalities.
      They should be properly propagated to all AND/OR levels the WHERE
      condition. It's done now with an additional call of remove_eq_conds(). 
      31380813
  23. 15 Aug, 2013 4 commits
    • Igor Babaev's avatar
      Merge · fdc96baf
      Igor Babaev authored
      fdc96baf
    • Igor Babaev's avatar
      Fixed bug mdev-4355. · d7dfc6c5
      Igor Babaev authored
      This patch almost totally revised the patch for bug mdev-4177.
      The latter had too many defects. In particular, it did not
      propagate multiple equalities formed when merging a degenerate
      disjunct into underlying AND formula.
      d7dfc6c5
    • Igor Babaev's avatar
      Merge 5.2->5.3 · fa154e94
      Igor Babaev authored
      fa154e94
    • Igor Babaev's avatar
      Merge 5.1->5.2 · b3ed28dd
      Igor Babaev authored
      b3ed28dd
  24. 13 Aug, 2013 1 commit
    • Igor Babaev's avatar
      Fixed bug mdev-4894. · a8880257
      Igor Babaev authored
      This a an old legacy performance bug.
      When a very selective range scan existed for the second table in a join,
      and, at the same time, there was another range condition depending on the
      fields of the first table, the optimizer chose a plan with
      'Range checked for each record'. This plan was extremely inefficient in
      comparison with the regular selective range scan.
      As a matter of fact the range scan chosen for each record was the same as
      that selective range scan. 
      
      Changed the test case for bug 24776 to preserve the old output for explain.
       
      a8880257
  25. 12 Aug, 2013 1 commit
  26. 01 Aug, 2013 1 commit
  27. 08 Aug, 2013 2 commits
  28. 01 Aug, 2013 1 commit
  29. 21 Jul, 2013 1 commit