1. 15 Mar, 2010 4 commits
    • Magnus Blåudd's avatar
      Merge · a9541803
      Magnus Blåudd authored
      a9541803
    • Magnus Blåudd's avatar
      Merge in fix for bug#42589 · fda5004d
      Magnus Blåudd authored
      fda5004d
    • Jon Olav Hauglid's avatar
      Bug #51160 Deadlock around SET GLOBAL EVENT_SCHEDULER = ON|OFF · dd69b281
      Jon Olav Hauglid authored
      This deadlock could occour betweeen one connection executing
      SET GLOBAL EVENT_SCHEDULER= ON and another executing SET GLOBAL
      EVENT_SCHEDULER= OFF. The bug was introduced by WL#4738.
      
      The first connection would hold LOCK_event_metadata (protecting
      the global variable) while trying to lock LOCK_global_system_variables
      starting the event scheduler thread (in THD:init()).
      
      The second connection would hold LOCK_global_system_variables
      while trying to get LOCK_event_scheduler after stopping the event
      scheduler inside event_scheduler_update().
      
      This patch fixes the problem by not using LOCK_event_metadata to
      protect the event_scheduler variable. It is still protected using
      LOCK_global_system_variables. This fixes the deadlock as it removes 
      one of the two mutexes used to produce it.
      
      However, this patch opens up the possibility that the event_scheduler
      variable and the real event_scheduler state can become out of sync
      (e.g. variable = OFF, but scheduler running). But this can only
      happen under very unlikely conditions - two concurrent SET GLOBAL
      statments, with one thread interrupted at the exact wrong moment.
      This is preferable to having the possibility of a deadlock.
      
      This patch also fixes a bug where it was possible to exit create_event()
      without releasing LOCK_event_metadata if running out of memory during
      its exection.
      
      No test case added since a repeatable test case would have required
      excessive use of new sync points. Instead we rely on the fact that
      this bug was easily reproduceable using RGQ tests.
      dd69b281
    • Alexander Nozdrin's avatar
      Auto-merge from mysql-trunk. · 27bb4377
      Alexander Nozdrin authored
      27bb4377
  2. 12 Mar, 2010 8 commits
  3. 11 Mar, 2010 7 commits
  4. 10 Mar, 2010 18 commits
  5. 09 Mar, 2010 3 commits
    • Marc Alff's avatar
      Bug#51878 Build break in HPUX involving mysql_prlock on a client · dbdd83a4
      Marc Alff authored
      This is a fix specific for HPUX,
      for which the compiler does not resolve properly dependencies
      involving unused inline functions.
      (See existing comments in mysql_thread.h)
      
      In include/mysql/psi/mysql_thread.h,
      the instrumentation helpers for mysql_prlock_*
      uses the pr lock apis.
      
      These apis are implemented in mysys/thr_rwlock.c,
      which is not linked to client code.
      
      As a result, the code does not link in libmysql_r, on HPUX.
      
      The fix is to cut dependencies explicitely,
      by introducing -DDISABLE_MYSQL_RWLOCK_H,
      when building client code.
      dbdd83a4
    • Tor Didriksen's avatar
      Bug#50888 valgrind warnings in Field_timestamp::val_str · 58d05cae
      Tor Didriksen authored
      Ensure that we store the correct cached_field_type whenever we cache Field items
      (in this case it allows us to compare dates as dates, rather than strings)
      58d05cae
    • Alexander Nozdrin's avatar
      cfffc11d