1. 04 Feb, 2010 2 commits
    • He Zhenxing's avatar
      Auto merge · 12c5f656
      He Zhenxing authored
      12c5f656
    • He Zhenxing's avatar
      Bug#49894 shifted MYSQL_REPLICATION_PLUGIN number · 6ad93ebb
      He Zhenxing authored
      The number for MYSQL_REPLICATION_PLUGIN was shifted when backporting
      because MYSQL_AUDIT_PLUGIN was not backported.
      
      This problem is fixed by backporting only the number of audit plugin
      and print an error when trying to load audit plugins. Note that
      replication plugins compiled against old MYSQL_REPLICATION_PLUGIN
      number will also be recognized as audit plugin and be rejected.
      
      include/mysql/plugin.h:
        backporting the number of audit plugin (MYSQL_AUDIT_PLUGIN)
      sql/sql_plugin.cc:
        backporting the number of audit plugin (MYSQL_AUDIT_PLUGIN)
        print an error when trying to load audit plugins
      6ad93ebb
  2. 30 Jan, 2010 1 commit
    • unknown's avatar
      BUG#50157 Assertion !active_tranxs_->is_tranx_end_pos(..) in ReplSemiSyncMaster::commitTrx · a1bfae20
      unknown authored
      The root cause of the crash is that a TranxNode is freed before it is used.
      A TranxNode is allocated and inserted into the active list each time 
      a log event is written and flushed into the binlog file. 
      The memory for TranxNode is allocated with thd_alloc and will be freed 
      at the end of the statement. The after_commit/after_rollback callback
      was supposed to be called before the end of each statement and remove the node from
      the active list. However this assumption is not correct in all cases(e.g. call 
      'CREATE TEMPORARY TABLE myisam_t SELECT * FROM innodb_t' in a transaction
       and delete all temporary tables automatically when a session closed), 
      and can cause the memory allocated for TranxNode be freed
      before it was removed from the active list. So The TranxNode pointer in the active
      list would become a wild pointer and cause the crash.
      
      After this patch, We have a class called a TranxNodeAllocate which manages the memory
      for allocating and freeing TranxNode. It uses my_malloc to allocate memory.
      
      
      sql/rpl_handler.cc:
        params are not initialized.
      a1bfae20
  3. 04 Dec, 2009 6 commits
    • He Zhenxing's avatar
      Auto merge postfix of Bug#49020 · 5f71056f
      He Zhenxing authored
      5f71056f
    • He Zhenxing's avatar
      Post fix for previous patch of Bug#49020 · 30d2870a
      He Zhenxing authored
      Added back n_frees, use 'clear' instead of 'free' since memory is
      not freed here.
      
      
      plugin/semisync/semisync_master.cc:
        Added back n_frees, use 'clear' instead of 'free' in the message since memory is not freed here.
      30d2870a
    • He Zhenxing's avatar
      Auto Merge fix for Bug#49170 · f73b44d6
      He Zhenxing authored
      f73b44d6
    • He Zhenxing's avatar
      Auto merge fix for Bug#49020 · 9e6430c5
      He Zhenxing authored
      9e6430c5
    • He Zhenxing's avatar
      Bug#49020 Semi-sync master crashed with free_pool == NULL, assertion `free_pool_' · c926610d
      He Zhenxing authored
      Before this patch, semisync assumed transactions running in parallel
      can not be larger than max_connections, but this is not true when
      the event scheduler is executing events, and cause semisync run out
      of preallocated transaction nodes.
      
      Fix the problem by allocating transaction nodes dynamically.
      
      This patch also fixed a possible deadlock when running UNINSTALL
      PLUGIN rpl_semi_sync_master and updating in parallel. Fixed by
      releasing the internal Delegate lock before unlock the plugins.
      
      mysql-test/suite/rpl/t/rpl_semi_sync_event.test:
        Add test case for bug#49020
      plugin/semisync/semisync_master.cc:
        Allocating TranxNode dynamically
      plugin/semisync/semisync_master.h:
        Allocating TranxNode dynamically
      sql/rpl_handler.cc:
        Unlock plugins after we have released the Delegate lock to avoid possible deadlock when uninstalling semisync master plugin and doing update in parallel.
      c926610d
    • He Zhenxing's avatar
      Bug#49170 Inconsistent placement of semisync plugin prevents it from getting tested · db1fee98
      He Zhenxing authored
      Add $basedir/lib/plugin to the search paths for semisync plugins.
      db1fee98
  4. 27 Nov, 2009 1 commit
    • He Zhenxing's avatar
      Bug#48351 Inconsistent library names for semisync plugin · 886a489b
      He Zhenxing authored
      The semisync plugin library names on Unix like systems were prefixed with
      'lib', which did not follow the conventions.
      
      Fix the problem by removing the 'lib' prefix on Unix systems.
      
      
      mysql-test/mysql-test-run.pl:
        Remove 'lib' prefix for semisync plugin library names
      plugin/semisync/Makefile.am:
        Remove 'lib' prefix for semisync plugin library names
      plugin/semisync/plug.in:
        Remove 'lib' prefix for semisync plugin library names
      886a489b
  5. 23 Oct, 2009 3 commits
  6. 18 Oct, 2009 1 commit
    • He Zhenxing's avatar
      Postfix of bug#45674 · d8dee8cb
      He Zhenxing authored
      rpl_semi_sync_master_wait_sessions was reset by FLUSH STATUS,
      which could cause the master fail to wake up waiting sessions and
      result in master timeout waiting for slave reply.
      
      rpl_semi_sync_master_wait_session should not be reset, this 
      problem is fixed by this patch.
      
      
      plugin/semisync/semisync_master_plugin.cc:
        Change wait_sessions from SHOW_LONG back to SHOW_FUNC so that it will not be reset by FLUSH STATUS.
      d8dee8cb
  7. 12 Oct, 2009 5 commits
    • He Zhenxing's avatar
      Backport post fix for semisync · 48e98026
      He Zhenxing authored
      Remove functions that no longer needed
      Fix warning suppressions
      
      mysql-test/suite/rpl/t/rpl_semi_sync.test:
        Fix warning suppressions
      plugin/semisync/semisync_slave.cc:
        Remove functions that no longer needed
      plugin/semisync/semisync_slave.h:
        Remove functions that no longer needed
      48e98026
    • He Zhenxing's avatar
      Backport BUG#47298 Semisync: always wait until timeout if no semi-sync slave available · 1a7c7a40
      He Zhenxing authored
      Add an option to control whether the master should keep waiting
      until timeout when it detected that there is no semi-sync slave
      available.
      
      The bool option 'rpl_semi_sync_master_wait_no_slave' is 1 by
      defalt, and will keep waiting until timeout. When set to 0, the
      master will switch to asynchronous replication immediately when
      no semi-sync slave is available.
      1a7c7a40
    • He Zhenxing's avatar
      BUG#45674 FLUSH STATUS does not reset semisynchronous counters · 26b47d93
      He Zhenxing authored
      Semi-sync status were not reset by FLUSH STATUS, this was because
      all semi-sync status variables are defined as SHOW_FUNC and FLUSH
      STATUS could only reset SHOW_LONG type variables.
      
      This problem is fixed by change all status variables that should
      be reset by FLUSH STATUS from SHOW_FUNC to SHOW_LONG.
      
      After the fix, the following status variables will be reset by
      FLUSH STATUS:
        Rpl_semi_sync_master_yes_tx
        Rpl_semi_sync_master_no_tx
      
      Note: normally, FLUSH STATUS itself will be written into binlog
      and be replicated, so after FLUSH STATS, one of
        Rpl_semi_sync_master_yes_tx
        Rpl_semi_sync_master_no_tx
      can be 1 dependent on the semi-sync status. So it's recommended
      to use FLUSH NO_WRITE_TO_BINLOG STATUS to avoid this.
      26b47d93
    • He Zhenxing's avatar
      Backport Bug#45852 Semisynch: Last_IO_Error: Fatal error: Failed to run 'after_queue_event' hook · 825dce21
      He Zhenxing authored
      Errors when send reply to master should never cause the IO thread
      to stop, because master can fall back to async replication if it
      does not get reply from slave.
      
      The problem is fixed by deliberately ignoring the return value of
      slaveReply.
      825dce21
    • He Zhenxing's avatar
      Backport BUG#45848 Semisynchronous replication internals are visible in SHOW PROCESSLIST and logs · f8155de0
      He Zhenxing authored
      Semi-sync uses an extra connection from slave to master to send
      replies, this is a normal client connection, and used a normal
      SET query to set the reply information on master, which is visible
      to user and may cause some confusion and complaining.
      
      This problem is fixed by using the method of sending reply by
      using the same connection that is used by master dump thread to
      send binlog to slave. Since now the semi-sync plugins are integrated
      with the server code, it is not a problem to use the internal net
      interfaces to do this.
      
      The master dump thread will mark the event requires a reply and
      wait for the reply when the event just sent is the last event
      of a transaction and semi-sync status is ON; And the slave will
      send a reply to master when it received such an event that requires
      a reply.
      f8155de0
  8. 03 Oct, 2009 1 commit
    • He Zhenxing's avatar
      Fix semisync master/slave status always showed as OFF on sparc · d8724a45
      He Zhenxing authored
      On sparc, semisync master/slave status is always showed as OFF, this
      is fixed by change rpl_semisync_master/slave_status variables from
      long to char.
      
      plugin/semisync/semisync_master.cc:
        Change rpl_semisync_master_status variables from long to char
      plugin/semisync/semisync_master.h:
        Change rpl_semisync_master_status variables from long to char
      plugin/semisync/semisync_slave.cc:
        Change rpl_semisync_slave_status variables from long to char
      plugin/semisync/semisync_slave.h:
        Change rpl_semisync_slave_status variables from long to char
      d8724a45
  9. 02 Oct, 2009 2 commits
  10. 30 Sep, 2009 2 commits
  11. 26 Sep, 2009 1 commit
  12. 21 Sep, 2009 1 commit
  13. 04 Sep, 2009 1 commit
  14. 03 Sep, 2009 6 commits
  15. 02 Sep, 2009 7 commits