1. 01 Apr, 2013 1 commit
  2. 31 Mar, 2013 4 commits
  3. 30 Mar, 2013 1 commit
    • Igor Babaev's avatar
      Fixed several bugs for mwl #253. · 90554986
      Igor Babaev authored
      One of them is quite serious: the function table_cond_selectivity used
      the TABLE_REF structure for ref/eq_ref access methods as if they had been
      filled. In  fact these structure are filled after the best execution plan
      has been chosen.
      
      The other bugs happened due to:
      - an erroneous attempt at get statistics on the result of materialization
        of a view
      - incorrect handling of ranges with no left/right limits when calculating
        selectivity of range conditions on non-indexed columns
      - lack of cleanup for some newly introduced fields
       
      90554986
  4. 27 Mar, 2013 2 commits
  5. 26 Mar, 2013 9 commits
  6. 25 Mar, 2013 5 commits
    • Sergei Golubchik's avatar
      fixes for windows · 03d08bed
      Sergei Golubchik authored
      03d08bed
    • 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
  7. 22 Mar, 2013 1 commit
  8. 21 Mar, 2013 2 commits
  9. 20 Mar, 2013 5 commits
  10. 19 Mar, 2013 2 commits
    • 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
    • Sergei Golubchik's avatar
      extend check_global_access() to avoid my_error when it's not needed · e73f13a7
      Sergei Golubchik authored
      (in INFORMATION_SCHEMA).
      e73f13a7
  11. 26 Mar, 2013 2 commits
  12. 25 Mar, 2013 1 commit
    • Michael Widenius's avatar
      Patch by Ian Good for MDEV-4319: mysqlbinlog output ambiguous escaping · c579bce3
      Michael Widenius authored
      The output of mysqlbinlog (with "-v --base64-output=DECODE-ROWS" flags) can not always be read or parsed correctly
      when string columns contain single-quotes or backslash characters.
      
      The fix for this bug is to escape single-quote and backslash characters on output, so that the result is both more
      readable and more easily parse-able.
      
      Note that this is just for comments, so it doesn't affect the replication.
      
      sql/log_event.cc:
        Escape \ and ' properly for mysqlbin user comments.
      c579bce3
  13. 19 Mar, 2013 2 commits
  14. 18 Mar, 2013 3 commits
    • unknown's avatar
      MDEV-4269 fix. · 2cd7cf8f
      unknown authored
      Item_default_value inherited form Item_field so should create temporary table field similary.
      2cd7cf8f
    • Alexey Botchkov's avatar
      MDEV-4252 geometry query crashes server. · 589247ae
      Alexey Botchkov authored
          Additional fixes for possible overflows in length-related
          calculations in 'spatial' implementations.
          Checks added to the ::get_data_size() methods.
          max_n_points decreased to occupy less 2G size. An
          object of that size is practically inoperable anyway.
      589247ae
    • Sergei Golubchik's avatar
      MDEV-4289 Assertion `0' fails in make_sortkey with GROUP_CONCAT, MAKE_SET, GROUP BY · a4a18e0c
      Sergei Golubchik authored
      Item_func_make_set wasn't taking into account the first argument when
      calculating maybe_null.
      
      sql/item_strfunc.cc:
        rewrite Item_func_make_set, removing separate storage of the first argument
      sql/item_strfunc.h:
        rewrite Item_func_make_set, removing separate storage of the first argument
      a4a18e0c