1. 17 Mar, 2010 3 commits
    • Luis Soares's avatar
      Merged bundle from bug report. · 9c1918a7
      Luis Soares authored
      9c1918a7
    • Luis Soares's avatar
      Merge bundle from bug report. · a9c295e5
      Luis Soares authored
      a9c295e5
    • Luis Soares's avatar
      BUG#51426: overflow for auto_increment column causes slave to stop · 92b5e586
      Luis Soares authored
      In BUG#49562 we fixed the case where numeric user var events
      would not serialize the flag stating whether the value was signed
      or unsigned (unsigned_flag). This fixed the case that the slave
      would get an overflow while treating the unsigned values as
      signed.
            
      In this bug, we find that the unsigned_flag can sometimes change
      between the moment that the user value is recorded for binlogging
      purposes and the actual binlogging time. Since we take the
      unsigned_flag from the runtime variable data, at binlogging time,
      and the variable value is comes from the copy taken earlier in
      the execution, there may be inconsistency in the
      User_var_log_event between the variable value and its
      unsigned_flag.
            
      We fix this by also copying the unsigned_flag of the
      user_var_entry when its value is copied, for binlogging
      purposes. Later, at binlogging time, we use the copied
      unsigned_flag and not the one in the runtime user_var_entry
      instance.
      92b5e586
  2. 16 Mar, 2010 2 commits
  3. 15 Mar, 2010 11 commits
    • Mats Kindahl's avatar
      Merging with mysql-trunk-bugfixing · 03768a2f
      Mats Kindahl authored
      03768a2f
    • Mats Kindahl's avatar
      Merging with mysql-trunk-bugfixing · c4276d3f
      Mats Kindahl authored
      c4276d3f
    • Konstantin Osipov's avatar
      A post-review fix for type-aware metadata locks. · 09b7a0d1
      Konstantin Osipov authored
      DDL no longer aborts mysql_lock_tables(), and hence
      we no longer need to support need_reopen flag of this
      call. 
      Remove the flag, and all the code in the server
      that was responsible for handling the case when
      it was set. This allowed to simplify: 
      open_and_lock_tables_derived(), the delayed thread,
      multi-update.
      
      Rename MYSQL_LOCK_IGNORE_FLUSH to MYSQL_OPEN_IGNORE_FLUSH,
      since we now only support this flag in open_table().
      
      Rename MYSQL_LOCK_PERF_SCHEMA to MYSQL_LOCK_LOG_TABLE,
      to avoid confusion.
      
      Move the wait for the global read lock for cases
      when we do updates in SELECT f1() or DO (UPDATE) to 
      open_table() from mysql_lock_tables(). When waiting
      for the read lock, we could raise need_reopen flag,
      which is no longer present in mysql_lock_tables().
      Since the block responsible for waiting for GRL
      was moved, MYSQL_LOCK_IGNORE_GLOBAL_READ_LOCK
      was renamed to MYSQL_OPEN_IGNORE_GLOBAL_READ_LOCK.
      
      
      mysql-test/r/mdl_sync.result:
        Update test results (see comments for mdl_sync.test).
      mysql-test/t/mdl_sync.test:
        Update tests: an abort mysql_lock_tables() called for an
        INSERT no longer auto-closes SQL HANDLERS, since it
        no longer leads to back-off and retry.
      sql/ha_ndbcluster_binlog.cc:
        Remove unused variables.
      sql/lock.cc:
        Remove support for need_reopen parameter of mysql_lock_tables().
        Update comments.
      sql/log_event_old.cc:
        Remove the loop responsible for handling need_reopen
        out parameter of mysql_lock_tables().
      sql/mysql_priv.h:
        Update open and lock tables flag names.
      sql/share/errmsg-utf8.txt:
        Add a new error message to report when
        thr_multi_lock() is aborted.
      sql/sql_base.cc:
        Update comments. Rename MYSQL_LOCK_IGNORE_FLUSH
        to MYSQL_OPEN_IGNORE_FLUSH.
      sql/sql_class.h:
        Remove unused code.
      sql/sql_db.cc:
        Remove an unused bit of code.
      sql/sql_handler.cc:
        For backward compatibility, we still want to back off and
        retry when a call to mysql_lock_tables() is aborted
        from within an SQL HANDLER. Write an internal error
        handler to support the case.
      sql/sql_insert.cc:
        Call mysql_lock_tables() no longer has need_reopen
        out parameter. Simplify the code by removing 
        the crud that took care of it.
        MYSQL_LOCK_IGNORE_FLUSH is now only supported by
        open_tables().
      sql/sql_show.cc:
        Rename MYSQL_LOCK_IGNORE_FLUSH to MYSQL_OPEN_IGNORE_FLUSH
      sql/sql_table.cc:
        Remove an unused parameter.
      sql/sql_update.cc:
        Remove the need_reopen loop from multi-update.
        We no also longer need to cleanup the parse tree in case
        when mysql_lock_tables() is aborted and thus an infinite
        source of multi-update bugs is gone.
      sql/tztime.cc:
        Rename MYSQL_LOCK_IGNORE_FLUSH to MYSQL_OPEN_IGNORE_FLUSH,
        since from now on this flag is only supported by open_table().
      09b7a0d1
    • Vladislav Vaintroub's avatar
      merge · a45162d4
      Vladislav Vaintroub authored
      a45162d4
    • Alexander Nozdrin's avatar
      Auto-merge from mysql-trunk. · 8825ea3f
      Alexander Nozdrin authored
      8825ea3f
    • Alexander Nozdrin's avatar
      A patch for Bug#52071 (rpl_ndb.rpl_ndb_ctype_ucs2_def fails). · c161a487
      Alexander Nozdrin authored
      Use new command line options instead of deprecated and removed ones.
      c161a487
    • Alexander Nozdrin's avatar
      6be830e1
    • Magnus Blåudd's avatar
      Merge · cdb480d6
      Magnus Blåudd authored
      cdb480d6
    • Magnus Blåudd's avatar
      Merge in fix for bug#42589 · df1ed40b
      Magnus Blåudd authored
      df1ed40b
    • Jon Olav Hauglid's avatar
      Bug #51160 Deadlock around SET GLOBAL EVENT_SCHEDULER = ON|OFF · c7c1f219
      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.
      c7c1f219
    • Alexander Nozdrin's avatar
      Auto-merge from mysql-trunk. · f007796b
      Alexander Nozdrin authored
      f007796b
  4. 14 Mar, 2010 1 commit
    • Mats Kindahl's avatar
      Bug #51938 plugin_dir gets bad default value · cba4c8d1
      Mats Kindahl authored
      When building the script directory using a CMake-based build, both the
      variables in config.h.cmake (including PLUGINDIR) and the variables in
      CMakeList.txt (which includes pkgplugindir).
      
      However, for autotools-based builds, only pkgplugindir is substituted,
      which means that the plugin-path is not substituted.
      
      This patch solves the problem by using pkgplugindir, which works on both
      CMake-based and autotools-based builds, instead of PLUGINDIR.
      cba4c8d1
  5. 13 Mar, 2010 1 commit
  6. 12 Mar, 2010 8 commits
  7. 11 Mar, 2010 8 commits
  8. 10 Mar, 2010 6 commits
    • Luis Soares's avatar
      Fix for BUG#51716 and BUG#51787: test case improvements. · 092d5038
      Luis Soares authored
      Split rpl_row_charset into:
      
        - rpl_row_utf16.
        - rpl_row_utf32.
      
      This way these tests can run independently if server supports
      either one of the charsets but not both.
      
      Cleaned up rpl_row_utf32 which had a spurious instruction:
      -- let $reset_slave_type_conversions= 0
      092d5038
    • Davi Arnaut's avatar
      Automatic merge. · f147aa35
      Davi Arnaut authored
      f147aa35
    • Luis Soares's avatar
      Fix for BUG#51716 and BUG#51787. · ade4977c
      Luis Soares authored
      In BUG#51787 we were using the wrong charset to print out the
      data. We were using the field charset for the string that would
      hold the information. This caused the assertion, because the
      string length was not aligned with UTF32 bytes requirements for
      storage.
      
      We fix this by using &my_charset_latin1 in the string object
      instead of the field->charset(). As a side-effect, we needed to
      extend the show_sql_type interface so that it took the field
      charset is now passed as a parameter, so that one is able to
      calculate the correct field size.
      
      In BUG#51716 we had issues with Field_string::pack and
      Field_string::unpack. When packing, the length was incorrectly
      calculated. When unpacking, the padding the string would be
      padded with the wrong bytes (a few bytes less than it should).
      
      We fix this by resorting to charset abstractions (functions) that
      calculate the correct length when packing and pad correctly the
      string when unpacking.
      ade4977c
    • Joerg Bruehe's avatar
      Automerge into next-mr-bugfixing. · 3396ca22
      Joerg Bruehe authored
      3396ca22
    • Alexander Nozdrin's avatar
      929293b9
    • Konstantin Osipov's avatar
      A fix and a test case for Bug#51710 FLUSH TABLES <view> WITH READ · 7fe455a6
      Konstantin Osipov authored
      LOCK kills the server.
      
      Prohibit FLUSH TABLES WITH READ LOCK application to views or
      temporary tables.
      Fix a subtle bug in the implementation when we actually
      did not remove table share objects from the table cache after 
      acquiring exclusive locks.
      
      mysql-test/r/flush.result:
        Update results (Bug#51710)
      mysql-test/t/flush.test:
        Add a test case for Bug#51710.
      sql/sql_parse.cc:
        Fix Bug#51710 "FLUSH TABLES <view> WITH READ LOCK
        killes the server.
        Ensure we don't open views and temporary tables.
        Fix a yet another bug in the implementation which 
        did not actually remove the tables from cache after acquiring
        exclusive locks.
      7fe455a6