1. 21 Jul, 2015 1 commit
    • Jan Lindström's avatar
      MDEV-8501: encryption.create_or_replace fails in buildbot on P8 builders · 62b5a561
      Jan Lindström authored
      Analysis: There is race between drop table and encryption threads that
      could cause encryption thread to enter mutex that has been already
      released.
      
      Fix: When destroying crypt_data first enter the mutex and set crypt data
      unavailable, then release the memory and clean up the data. This should
      make the race more unprobable. Additionally, added big_test for
      create_or_replace as it could fail testcase timeout
      if you have slow I/O (tested that testcase passes with --mem).
      62b5a561
  2. 20 Jul, 2015 1 commit
  3. 19 Jul, 2015 4 commits
  4. 17 Jul, 2015 1 commit
  5. 16 Jul, 2015 2 commits
    • Monty's avatar
      Fix for MySQL bug #77448 Inconsistent handling of RAND() in WHERE and HAVING · 0ad00c66
      Monty authored
      Problem was that for queries of type:
      
      select rand() r, rand()  p, rand() = rand() from a having r = p
      
      The optimizer thought that r = p was same as rand() = rand() and this would always be true.
      
      The problem was that when testing if two expressions are equal, we didn't take into account no determinstic functions.
      
      The fix is to not compare non deterministic functions as equal.
      0ad00c66
    • Monty's avatar
      MDEV-8469 Add RESET MASTER TO x to allow specification of binlog file nr · 872a953b
      Monty authored
      Other things:
      - Avoid calling init_and_set_log_file_name() when opening binary log.
      - Remove newlines early when reading from index file.
      - Ensure that reset_logs() will work even if thd is 0 (Can happen on startup)
      - Added thd to sart_slave_threads() for better error handling.
      872a953b
  6. 15 Jul, 2015 1 commit
  7. 14 Jul, 2015 6 commits
  8. 13 Jul, 2015 1 commit
  9. 10 Jul, 2015 2 commits
  10. 09 Jul, 2015 2 commits
  11. 08 Jul, 2015 2 commits
  12. 07 Jul, 2015 2 commits
  13. 06 Jul, 2015 5 commits
  14. 05 Jul, 2015 2 commits
    • Monty's avatar
      8d4d185a
    • Monty's avatar
      Fixes done while working on MDEV-4119: · 86377d07
      Monty authored
      Fixed several optimizer issues relatied to GROUP BY:
      
      a) Refering to a SELECT column in HAVING sometimes calculated it twice, which caused problems with non determinstic functions
      
      b) Removing duplicate fields and constants from GROUP BY was done too late for "using index for group by" optimization to work
      
      c) EXPLAIN SELECT ... GROUP BY did wrongly show 'Using filesort' in some cases involving "Using index for group-by"
      
      
      a) was fixed by:
      - Changed last argument to Item::split_sum_func2() from bool to int to allow more flags
      - Added flag argument to Item::split_sum_func() to allow on to specify if the item was in the SELECT part
      - Mark all split_sum_func() calls from SELECT with SPLIT_SUM_SELECT
      - Changed split_sum_func2() to do nothing if called with an argument that is not a sum function and doesn't include sum functions, if we are not an argument to SELECT.
      
      This ensures that in a case like
      select a*sum(b) as f1 from t1 where a=1 group by c having f1 <= 10;
      
      That 'a' in the SELECT part is stored as a reference in the temporary table togeher with sum(b) while the 'a' in having isn't (not needed as 'a' is already a reference to a column in the result)
      
      b) was fixed by:
      - Added an extra remove_const() pass for GROUP BY arguments before make_join_statistics() in case of one table SELECT.
      
      This allowes get_best_group_min_max() to optimize things better.
      
      c) was fixed by:
      - Added test for group by optimization in JOIN::exec_inner for
        select->quick->get_type() == QUICK_SELECT_I::QS_TYPE_GROUP_MIN_MAX
      
      item.cc:
      - Simplifed Item::split_sum_func2()
        - Split test to make them faster and easier to read
        - Changed last argument to Item::split_sum_func2() from bool to int to allow more flags
        - Added flag argument to Item::split_sum_func() to allow on to specify if the item was in the SELECT part
        - Changed split_sum_func2() to do nothing if called with an argument that is not a sum function and doesn't include sum functions, if we are not an argument to SELECT.
      
      opt_range.cc:
      - Simplified get_best_group_min_max() by calcuating first how many group_by elements.
      - Use join->group instead of join->group_list to test if group by, as join->group_list may be NULL if everything was optimized away.
      
      sql_select.cc:
      - Added an extra remove_const() pass for GROUP BY arguments before make_join_statistics() in case of one table SELECT.
      - Use group instead of group_list to test if group by, as group_list may be NULL if everything was optimized away.
      - Moved printing of "Error in remove_const" to remove_const() instead of having it in caller.
      - Simplified some if tests by re-ordering code.
      - update_depend_map_for_order() and remove_const() fixed to handle the case where make_join_statistics() has not yet been called (join->join_tab is 0 in this case)
      86377d07
  15. 03 Jul, 2015 5 commits
  16. 02 Jul, 2015 3 commits