1. 26 Mar, 2013 1 commit
  2. 25 Mar, 2013 4 commits
    • Michael Widenius's avatar
      Automatic merge · 6b3654f9
      Michael Widenius authored
      6b3654f9
    • Michael Widenius's avatar
      Automatic merge · 2c40fb56
      Michael Widenius authored
      2c40fb56
    • unknown's avatar
      MDEV-4322: Race in binlog checkpointing during server shutdown. · 22f91edd
      unknown authored
      During server shutdown, we need to wait for binlog checkpointing to
      finish in the binlog background thread before closing the binlog.
      
      This was not done, so we could get assert and failure to finish the
      final binlog checkpoint if shutdown happened in the middle.
      22f91edd
    • Michael Widenius's avatar
      Speed up connection time: · d8986fd6
      Michael Widenius authored
      -Change my_rnd() slightly to make it safer if two threads use it at the same time.
      -Avoid some sprintf and strmov in vio.
      -Changed thread_count to be automaticly incremented (instead of under LOCK_thread_count).
      -Thread cache now uses LOCK_thread_cache instead of LOCK_thread_count.
      -Moved delete thd out from LOCK_thread_count.
      -Save some mysql_cond_broadcast(&COND_thread_count) calls.
      -Removed call to getsockname() during connect.
      -Initialize random generator without locks.
      
      Other things:
      -Fixed test cases that depends on changes for LOCK_grant
      -Added thread_safe_decrement32() and thread_safe_increment32()
      -Removed sql_rnd_with_mutex() and get_thread_running()
      -In check_table_access() don't lock LOCK_grant if we can resolve the grant with user or db level grants (the normal case).
      -Don't use a lock for setting THD->query_id.
      -Fixed bug where thd->set_query_id() could be set to same value by multiple threads.
      
      Thanks to Yoshinori Matsunobu for the benchmark of connection speed and to
      Domas Mituzas for the inspiration for many of the fixes.
      
      
      include/violite.h:
        Change desc to a string pointer
      mysql-test/suite/perfschema/r/all_instances.result:
        Added new mutex
      mysql-test/suite/perfschema/t/func_mutex.test:
        Test for LOCK_system_variables_hash instead of LOCK_grant, as LOCK_grant is not anymore always taken for SELECT's.
      mysys/my_gethwaddr.c:
        More DBUG
      mysys/my_rnd.c:
        Change my_rnd() slightly to make it safer if two threads use it at the same time.
      sql/event_scheduler.cc:
        Changed thread_count to be automically incremented
        Moved some safe things out from LOCK_thread_count.
        Simplify deleting of THD for running thread.
      sql/mysqld.cc:
        Changed thread_count to be automically incremented
        Thread cache now uses LOCK_thread_cache instead of LOCK_thread_count
        Added delete_running_thd()
        Moved delete thd out from LOCK_thread_count
        More DBUG
        Only call  mysql_cond_broadcast(&COND_thread_count) if thread_count is 0
        Removed call to getsockname() (old not anymore needed check)
      sql/mysqld.h:
        Removed sql_rnd_with_mutex() (not needed anymore)
        Removed not used function get_thread_running()
        Added thread_safe_decrement32() and thread_safe_increment32()
        Simplified dec_thread_running() and inc_thread_running()
        next_query_id() should return the original value for global_query_id, not the next one.
        (Bug introduced with MySQL 5.5 merge).
      sql/sql_acl.cc:
        In check_table_access() don't lock LOCK_grant if we can resolve the grant with user or db level grants (the normal case).
      sql/sql_class.cc:
        Removed thd_lock_thread_count() and thd_unlock_thread_count()
        Initialize random generator without locks
        Don't use a lock for setting THD->query_id.
        (This is only accessed by thread owning the THD)
      sql/sql_class.h:
        Don't use a lock for setting THD->query_id.
      sql/sql_insert.cc:
        Changed thread_count to be automically incremented
      sql/sql_parse.cc:
        Changed thread_count to be automically incremented
        Fixed bug where thd->set_query_id() could be set to same value by multiple threads.
      vio/vio.c:
        Don't generate 'desc' with sprintf/strmov. Assign a pointer instead.
        (Good enough as this is just for debugging)
      d8986fd6
  3. 19 Mar, 2013 1 commit
    • Michael Widenius's avatar
      Speed up connection time: · 615d51b6
      Michael Widenius authored
      -Change my_rnd() slightly to make it safer if two threads use it at the same time.
      -Avoid some sprintf and strmov in vio.
      -Changed thread_count to be automically incremented (instead of under LOCK_thread_count).
      -Thread cache now uses LOCK_thread_cache instead of LOCK_thread_count.
      -Moved delete thd out from LOCK_thread_count.
      -Save some mysql_cond_broadcast(&COND_thread_count) calls.
      -Removed call to getsockname() during connect.
      -Initialize random generator without locks.
      
      Other things:
      -Added thread_safe_decrement32() and thread_safe_increment32()
      -Removed sql_rnd_with_mutex() and get_thread_running()
      
      Thanks to Yoshinori Matsunobu for the benchmark of connection speed and to
      Domas Mituzas for the inspiration for many of the fixes.
       
      
      include/violite.h:
        Change desc to a string pointer
      mysql-test/suite/perfschema/r/all_instances.result:
        Added new mutex
      mysys/my_rnd.c:
        Change my_rnd() slightly to make it safer if two threads use it at the same time.
      sql/event_scheduler.cc:
        Changed thread_count to be automically incremented
        Moved some safe things out from LOCK_thread_count.
        Simplify deleting of THD for running thread.
      sql/mysqld.cc:
        Changed thread_count to be automically incremented
        Thread cache now uses LOCK_thread_cache instead of LOCK_thread_count
        Added delete_running_thd()
        Moved delete thd out from LOCK_thread_count
        More DBUG_ENTER
        Only call  mysql_cond_broadcast(&COND_thread_count) if thread_count is 0
        Removed call to getsockname() (old not anymore needed check)
      sql/mysqld.h:
        Removed sql_rnd_with_mutex() (not needed anymore)
        Removed not used function get_thread_running()
        Added thread_safe_decrement32() and thread_safe_increment32()
        Simplified dec_thread_running() and inc_thread_running()
      sql/sql_class.cc:
        Removed thd_lock_thread_count() and thd_unlock_thread_count()
        Initialize random generator without locks
      sql/sql_insert.cc:
        Changed thread_count to be automically incremented
      sql/sql_parse.cc:
        Changed thread_count to be automically incremented
      vio/vio.c:
        Don't generate 'desc' with sprintf/strmov. Assign a pointer instead.
        (Good enough as this is just for debugging)
      615d51b6
  4. 17 Mar, 2013 2 commits
    • Michael Widenius's avatar
      Patch by Hartmut Holzgraefe · 8b047ac5
      Michael Widenius authored
      STRAIGHT_JOIN couldn't be combined with NATURAL or USING(), 
      INNER JOIN not with NATURAL (MDEV-4271, MySQL Bug #35268)
      
      Separate rules existed for "natural" (non-outer) joins and
      for STRAIGHT_JOIN, with the only difference code wise being 
      that with STRAIGHT_JOIN the "straight" property of the right
      side table was set before calling the appropriate add_...()
      function.
      
      The "natural_join" parser rule has now been extended to also
      accept STRAIGHT_JOIN, and the rule result value is set to
      1 for straight joins, 0 otherwise, so acting as a "straight"
      flag that can directly be assigned to the "straight" property
      of the right side table.
      
      The rule parsing NATURAL JOIN was hard coded to accept just
      this keyword combination, without support for either 
      STRAIGHT_JOIN or the optional INNER.
      
      The "natural_join" rule has now been split up in an inner
      "inner_join" rule that matches the JOIN, INNER JOIN and
      STRAIGHT_JOIN cases while "natural_join" also matches
      CROSS JOIN. 
      
      The NATURAL rule has been changed to accept "inner_join"
      instead of just JOIN, so now NATURAL STRAIGHT_JOIN and
      NATURAL INNER JOIN also work as expected.
      
      As a side effect the removal of the duplciated rules
      for STRAIGHT_JOIN handling has reduced the shift/reduce
      conflict count by one.
      
      mysql-test/r/join.result:
        Added new test cases
      mysql-test/t/join.test:
        Added new test cases
      sql/sql_yacc.yy:
        The "natural_join" parser rule was extended to also accept STRAIGHT_JOIN
        NATURAL STRAIGHT_JOIN and NATURAL INNER JOIN also now work as expected
      8b047ac5
    • Michael Widenius's avatar
  5. 12 Mar, 2013 1 commit
  6. 07 Mar, 2013 1 commit
    • Sergey Petrunya's avatar
      Fix buildbot failure: · 62222eb5
      Sergey Petrunya authored
      Backport the code that runs cassandra.test only when Cassandra is 
      present and running from 10.0 to 10.0-base.
      62222eb5
  7. 27 Feb, 2013 1 commit
  8. 25 Feb, 2013 1 commit
  9. 15 Feb, 2013 1 commit
    • Michael Widenius's avatar
      Fixed BUG#51763 Can't delete rows from MEMORY table with HASH key · 7042dd38
      Michael Widenius authored
      mysql-test/suite/heap/heap.result:
        Added test case
      mysql-test/suite/heap/heap.test:
        Added test case
      storage/heap/hp_delete.c:
        Fixed that we don't change order of keys for the current key when we delete them from the hash table.
        Fixed that 'current_hash_ptr' is correct after heap_delete_key().
        Don't "reset current_hash_ptr" on delete; This will improve time a lot for delete of rows when not all rows matches the search criteria.
      7042dd38
  10. 07 Feb, 2013 2 commits
    • Elena Stepanova's avatar
      Fix for MDEV-4149, backport from 10.0: · a555ceb2
      Elena Stepanova authored
        committer: Sergei Golubchik <sergii@pisem.net> 
          fix for a valgrind builds. 
          my_alloca() cannot have MY_THREAD_SPECIFIC, because can be used 
          outside of the THD context. 
      a555ceb2
    • unknown's avatar
      MDEV-537 Make multi-column non-top level subqueries to be executed via index... · e648ff11
      unknown authored
      MDEV-537 Make multi-column non-top level subqueries to be executed via index (index/unique subquery)
                 instead of single_select_engine
      
      This task changes the IN-EXISTS rewrite for multi-column subqueries
      "(a, b) IN (select b, c ...)" to work in the same way as for
      single-column subqueries "a IN (select b ...) with respect to the
      injection of NULL-rejecting predicates.
       
      More specifically, the method
      Item_in_subselect::create_row_in_to_exists_cond()
      adds Item_is_not_null_test and Item_func_trig_cond only if the left
      IN operand can be NULL. Not having these predicates when not necessary,
      makes it possible to rewrite the subquery into a "unique_subquery" or
      "index_subquery" when there is a suitable index on the only
      subquery table.
      e648ff11
  11. 05 Feb, 2013 1 commit
  12. 04 Feb, 2013 3 commits
  13. 31 Jan, 2013 1 commit
  14. 30 Jan, 2013 2 commits
  15. 29 Jan, 2013 5 commits
  16. 28 Jan, 2013 7 commits
  17. 26 Jan, 2013 2 commits
  18. 25 Jan, 2013 4 commits