1. 12 Dec, 2009 1 commit
    • Staale Smedseng's avatar
      Bug #45058 init_available_charsets uses double checked locking · 983770aa
      Staale Smedseng authored
            
      As documented in the bug report, the double checked locking
      pattern has inherent issues, and cannot guarantee correct
      initialization.
      
      This patch replaces the logic in init_available_charsets()
      with the use of pthread_once(3). A wrapper function,
      my_pthread_once(), is introduced and is used in lieu of direct
      calls to init_available_charsets(). Related defines
      MY_PTHREAD_ONCE_* are also introduced.
      
      For the Windows platform, the implementation in lp:sysbench is
      ported. For single-thread use, a simple define calls the
      function and sets the pthread_once control variable.
      
      Charset initialization is modified to use my_pthread_once().
      983770aa
  2. 11 Dec, 2009 13 commits
  3. 10 Dec, 2009 9 commits
  4. 09 Dec, 2009 7 commits
    • Evgeny Potemkin's avatar
      Bug#49489: Uninitialized cache led to a wrong result. · 69fa790f
      Evgeny Potemkin authored
      Arg_comparator uses Item_cache objects to store constants being compared when
      they're need a type conversion. Because this cache wasn't initialized properly
      Arg_comparator might produce wrong comparison result.
      
      The Arg_comparator::cache_converted_constant function now initializes cache
      prior to usage.
      69fa790f
    • Alfranio Correia's avatar
      ebed1914
    • Olav Sandstaa's avatar
      Fix for Bug#49506 Valgrind error in make_cond_for_table_from_pred · 2b0642a6
      Olav Sandstaa authored
            
      This fix has been proposed by Sergey Petrunya and has been contributed
      under SCA by sca@askmonty.org.
            
      The cause for this valgrind error is that in the function
      add_cond_and_fix() in sql_select.cc an Item_cond_and object is
      created. This is marked as fixed but does not have a correct
      table_map() attribute. Later, in make_join_select(), if
      engine_condition_pushdown is in use, this table map is used and
      results in the valgrind error.
            
      The fix is to add a call to update_used_tables() in add_cond_and_fix()
      so that the table map is updated correctly.
            
      This patch is tested by multiple existing tests (e.g. the tests
      innodb_mysql, innodb, fulltext, compress all produces this valgrind
      warning/error without this fix).
      2b0642a6
    • He Zhenxing's avatar
      Merge from 5.0-bugteam · a8a01f20
      He Zhenxing authored
      a8a01f20
    • He Zhenxing's avatar
      removed rpl_killed_ddl from disabled list · 714348a8
      He Zhenxing authored
      714348a8
    • He Zhenxing's avatar
      Merge Bug#45520 fix from 5.0-bugteam · bda9422a
      He Zhenxing authored
      bda9422a
    • He Zhenxing's avatar
      BUG#45520 rpl_killed_ddl fails sporadically in pb2 · 9058e481
      He Zhenxing authored
      There are three issues that caused rpl_killed_ddl fails sporadically
      in pb2:
      
       1) thd->clear_error() was not called before create Query event
      if operation is executed successfully.
       2) DATABASE d2 might do exist because the statement to CREATE or
      ALTER it was killed
       3) because of bug 43353, kill the query that do DROP FUNCTION or
          DROP PROCEDURE can result in SP not found
      
      This patch fixed all above issues by:
       1) Called thd->clear_error() if the operation succeeded.
       2) Add IF EXISTS to the DROP DATABASE d2 statement
       3) Temporarily disabled testing DROP FUNCTION/PROCEDURE IF EXISTS.
      9058e481
  5. 08 Dec, 2009 1 commit
  6. 07 Dec, 2009 2 commits
  7. 06 Dec, 2009 5 commits
    • Luis Soares's avatar
      Automerge bzr bundle from bug report. · 1ee79014
      Luis Soares authored
      Removed rpl_cross_version from experimental list.
      1ee79014
    • Luis Soares's avatar
    • Luis Soares's avatar
      BUG#49119: Master crashes when executing 'REVOKE ... ON · 289c1493
      Luis Soares authored
      {PROCEDURE|FUNCTION} FROM ...'
      
      The master would hit an assertion when binary log was
      active. This was due to the fact that the thread's diagnostics
      area was being cleared before writing to the binlog,
      independently of mysql_routine_grant returning an error or
      not. When mysql_routine_grant was to return an error, the return
      value and the diagnostics area contents would
      mismatch. Consequently, neither my_ok would be called nor an
      error would be signaled in the diagnostics area, eventually
      triggering the assertion in net_end_statement.
      
      We fix this by not clearing the diagnostics area at binlogging
      time. 
      289c1493
    • Staale Smedseng's avatar
      Merge from 5.0 · d5391ed6
      Staale Smedseng authored
      d5391ed6
    • Staale Smedseng's avatar
      Bug #47391 no stack trace printed to error log on · 846c81c7
      Staale Smedseng authored
      solaris after a crash
            
      This patch adds a Solaris-specific version of
      print_stacktrace() which uses printstack(2), available on all
      Solaris versions since Solaris 9. (While Solaris 11 adds
      support for the glibc functions backtrace_*() as of
      PSARC/2007/162, printstack() is used for consistency over all
      Solaris versions.)
      
      The symbol names are mangled, so use of c++filt may be
      required as described in the MySQL documentation.
      846c81c7
  8. 05 Dec, 2009 1 commit
  9. 04 Dec, 2009 1 commit
    • Ramil Kalimullin's avatar
      Fix for bug#49199: Optimizer handles incorrectly: · 7888c983
      Ramil Kalimullin authored
      field='const1' AND field='const2' in some cases
      
      Building multiple equality predicates containing
      a constant which is compared as a datetime (with a field)
      we should take this fact into account and compare the 
      constant with another possible constatns as datetimes 
      as well.
      
      E.g. for the
      SELECT ... WHERE a='2001-01-01' AND a='2001-01-01 00:00:00'
      we should compare '2001-01-01' with '2001-01-01 00:00:00' as
      datetimes but not as strings.
      7888c983