1. 09 Apr, 2013 1 commit
  2. 05 Apr, 2013 1 commit
    • unknown's avatar
      MDEV-26: Global transaction ID. · b7363eb4
      unknown authored
      Replace CHANGE MASTER TO ... master_gtid_pos='xxx' with a new system
      variable @@global.gtid_pos.
      
      This is more logical; @@gtid_pos is global, not per-master, and it is not
      affected by RESET SLAVE.
      
      Also rename master_gtid_pos=AUTO to master_use_gtid=1, which again is more
      logical.
      b7363eb4
  3. 04 Apr, 2013 1 commit
    • unknown's avatar
      MDEV-26: Global transaction ID. · c2cbc9ce
      unknown authored
      Move combining slave and gtid binlog state into a separate function.
      
      Make SHOW ALL SLAVES STATUS use the same function, so it shows the
      same value used by slave connect.
      
      Add a test case.
      c2cbc9ce
  4. 02 Apr, 2013 1 commit
    • unknown's avatar
      MDEV-26: Global transaction ID · bdf6367d
      unknown authored
      More fixes for test failures in Buildbot:
      
       - Do not run crashing test in Valgrind.
      
       - FLUSH TABLES did not work to avoid errors about not closed tables when
         crashing server. Suppress the messages instead.
      
       - Rewrite multi-source test case to only start one pair of slave threads at a
         time, to work-around the bug MDEV-4352.
      bdf6367d
  5. 29 Mar, 2013 2 commits
    • unknown's avatar
      MDEV-26: Global transaction ID. · d639aece
      unknown authored
      More fixes for race conditions in test cases.
      d639aece
    • unknown's avatar
      MDEV-26: Global transaction ID. · 0f266bc8
      unknown authored
      Fix yet another race in the rpl_gtid_startpos test case.
      
      Implement include/wait_for_purge.inc to purge binary logs; we need to
      retry the purge multiple times until it succeeds in removing all the logs
      we want, as binlog dump threads can be slow to stop on loaded machines and
      hold back purge of logs that are still referenced by the thread.
      0f266bc8
  6. 28 Mar, 2013 2 commits
    • unknown's avatar
      MDEV-26: Global transaction ID. · 5aaf73fc
      unknown authored
      Add tests crashing the slave in the middle of replication and checking that
      replication picks-up again on restart in a crash-safe way.
      
      Fix silly code that causes crash by inserting uninitialised data into a hash.
      5aaf73fc
    • unknown's avatar
      MDEV-26: Global transaction ID. · 9303ecd0
      unknown authored
      Fix some test case races and .result file updates, found with Buildbot.
      9303ecd0
  7. 27 Mar, 2013 6 commits
    • unknown's avatar
      MDEV-26: Global transaction ID. · b0389850
      unknown authored
      Test crashing the master, check that it recovers the binlog state.
      
      Fix one bug introduced by previous commit (crash-recoved binlog state was
      overwritten by loading stale binlog state file).
      
      Fix Windows build error.
      b0389850
    • unknown's avatar
      MDEV-26: Global transaction ID. · 0fdbdde4
      unknown authored
      Implement test case rpl_gtid_stop_start.test to test normal stop and restart
      of master and slave mysqld servers.
      
      Fix a couple bugs found with the test:
      
       - When InnoDB is disabled (no XA), the binlog state was not read when master
         mysqld starts.
      
       - Remove old code that puts a bogus D-S-0 into the initial binlog state, it
         is not correct in current design.
      
       - Fix memory leak in gtid_find_binlog_file().
      0fdbdde4
    • unknown's avatar
      MDEV-26: Global transaction ID. · cb65cee8
      unknown authored
      When slave requested to start at some GTID, and that GTID was the very
      last event (within its replication domain) in some binlog file, we did
      not allow the binlog dump thread on the master to start from the
      beginning of a following binlog file. This is a problem, since the
      binlog file containing the GTID is likely to be purged if the
      replication domain is unused for long.
      
      With this fix, if the Gtid list event at the start of a binlog file
      contains exactly the GTID requested by the slave, we allow to start
      the binlog dump thread from this file, taking care not to skip any
      events from that domain in the file.
      cb65cee8
    • unknown's avatar
      MDEV-26: Global transaction ID. · e5b60f0a
      unknown authored
      Fix bug that RESET SLAVE did not reset Using_Gtid back to 0.
      e5b60f0a
    • unknown's avatar
      MDEV-26: Global transaction ID. · 20e02111
      unknown authored
      Fix MDEV-4329. When user does CHANGE MASTER TO
      MASTER_GTID_POS='<explicit GTID state>', we check that this state
      does not conflict with the binlog. But the code forgot to give an
      error in the case where a domain was completely missing from the
      requested position (eg. MASTER_GTID_POS='').
      20e02111
    • unknown's avatar
      MDEV-26: Global transaction ID. · 466ceba6
      unknown authored
      Silence compiler warning.
      466ceba6
  8. 26 Mar, 2013 3 commits
    • unknown's avatar
      MDEV-26: Global transaction ID. · f66e3474
      unknown authored
      Fix missing error check for applying Gtid_log_event.
      
      Fix a couple compiler warnings.
      f66e3474
    • unknown's avatar
      MDEV-26: Global transaction ID. · 5fa4c235
      unknown authored
      Fix remaining two sporadic test failures in the full test suite:
      
       - Remove crash in DBUG_ASSERT() in _db_flush() (bug also exists in main
         tree).
      
       - Fix locking order violation for LOCK_status by temporarily unlocking it
         while locking LOCK_active_mi (like a similar fix for
         LOCK_global_variables).
      5fa4c235
    • unknown's avatar
      MDEV-26: Global transaction ID · d9f975d0
      unknown authored
      Adjust full test suite to work with GTID.
      
      Huge patch, mainly due to having to update .result file for all SHOW BINLOG
      EVENTS and mysqlbinlog outputs, where the new GTID events pop up.
      
      Everything was painstakingly checked to be still correct and valid .result
      file updates.
      d9f975d0
  9. 22 Mar, 2013 2 commits
  10. 21 Mar, 2013 3 commits
    • unknown's avatar
      MDEV-26: Global transaction ID. · b6b84d68
      unknown authored
      Fix error handling when record_gtid() fails to update the
      mysql.rpl_slave_state table.
      b6b84d68
    • unknown's avatar
      MDEV-26: Global transaction ID. · e590f891
      unknown authored
      Fix MDEV-4278: Slave does not check that master understands GTID.
      
      Now the slave will abort with a suitable error if an attempt is made to connect
      with GTID to a master that does not support GTID.
      e590f891
    • unknown's avatar
      MDEV-26: Global transaction ID. · 9bb989a9
      unknown authored
      Fix MDEV-4275 - I/O thread restart duplicates events in the relay log.
      The first time we connect to master after CHANGE MASTER or restart, we connect
      from the GTID position. But then subsequent reconnects or IO thread restarts
      reconnect with the old-style file/offset binlog pos from where it left off at
      last disconnect. This is necessary to avoid duplicate events in the relay
      logs, as there is nothing that synchronises the SQL thread update of GTID
      state (multiple threads in case of multi-source) with IO thread reconnects.
      
      Test cases.
      
      Some small cleanups and fixes.
      9bb989a9
  11. 18 Mar, 2013 1 commit
    • unknown's avatar
      MDEV-26: Global transaction ID. · 9d9ddad7
      unknown authored
      Fix things so that a master can switch with MASTER_GTID_POS=AUTO to a slave
      that was previously running with log_slave_updates=0, by looking into the
      slave replication state on the master when the slave requests something not
      present in the binlog.
      
      Be a bit more strict about what position the slave can ask for, to avoid some
      easy-to-hit misconfiguration errors.
      
      Start over with seq_no counter when RESET MASTER.
      9d9ddad7
  12. 14 Mar, 2013 1 commit
    • unknown's avatar
      MDEV-26: Global transaction ID. · 379819d8
      unknown authored
      After-rebase fixes. Rebase was done to be able to build on top
      of the binlog background thread of MDEV-532.
      379819d8
  13. 11 Mar, 2013 4 commits
    • unknown's avatar
      MDEV-26: Global transaction ID. · 008363e8
      unknown authored
      Add a missing check for correct table definition.
      008363e8
    • unknown's avatar
      MDEV-26: Global Transaction ID. · 5e414f6b
      unknown authored
      Move a bunch of GTID specific code into new file rpl_gtid.cc. Make libmysqld build.
      5e414f6b
    • unknown's avatar
      MDEV-26: Global Transaction ID. · 32086353
      unknown authored
      Improvements to record_gtid():
      
       - Check for correct table definition of mysql.rpl_slave_state
       - Use autocommit, to save one call to ha_commit_trans()
       - Slightly more efficient way to set table->write_set
       - Use ha_index_read_map() to locate rows to support any storage engine.
      32086353
    • unknown's avatar
      MDEV-26: Global transaction ID. · 1baa0a57
      unknown authored
      Extend table definition checking to also be able to check for correct
      definition of the primary key.
      1baa0a57
  14. 27 Feb, 2013 2 commits
    • unknown's avatar
      MDEV-26: Global Transaction ID · 06ffea8c
      unknown authored
      Fix that CHANGE MASTER ... MASTER_GTID_POS="" works to start from the very
      beginning of the binary log (with test case).
      
      Fix that not finding the requested GTID position in master binlog results in
      fatal error, not endless connect retry.
      06ffea8c
    • unknown's avatar
      MDEV-26: Global Transaction ID. · a7e1860e
      unknown authored
      Add test case demonstrating multi-source replication with GTID.
      
      Test that we can move from being slave of two masters to be a slave
      deeper down in the hierarchy (of a higher-up multi-source slave),
      and vice versa.
      a7e1860e
  15. 26 Feb, 2013 1 commit
    • unknown's avatar
      MDEV-26: Global transaction ID. · 861830f9
      unknown authored
      Remove the two-component form of GTID with implicit domain_id=0, as it
      is likely to cause more confusion than help.
      
      Give a better error for CHANGE MASTER ... MASTER_GTID_POS='gtid,gitd,...'
      when two specified GTIDs have conflicting domain_id.
      861830f9
  16. 25 Feb, 2013 1 commit
    • unknown's avatar
      MDEV-26: Global transaction ID · 1f08be94
      unknown authored
      Fix lock order violation. Make sure we temporarily release
      LOCK_global_system_variables before taking LOCK_active_mi.
      Otherwise we get a lock dependency cycle when we use
      open_tables() under LOCK_active_mi.
      1f08be94
  17. 22 Feb, 2013 2 commits
    • unknown's avatar
      MDEV-26: Global Transaction ID · 2cf3d61f
      unknown authored
       - Fix skipping initial MyISAM DML when connecting using GTID.
      
       - Fix RESET MASTER not clearing in-memory binlog state.
      
       - Fix not reading standalone flag in Gtid_log_event::peek().
      
       - Fix skipping DDL that the slave has already seen when using GTID position.
      2cf3d61f
    • unknown's avatar
      MDEV-26: Global Transaction ID · fff47f40
      unknown authored
       - Fix that binlog_gtid_pos() (and hence slave connect) does not work
         correctly in the very first binlog file (due to not logging empty
         Gtid_list_log_event).
      
       - Remove one instance of the stupid domain_id-0-is-implicit.
      
       - Rename the confusing Gtid_Pos_Auto in SHOW SLAVE STATUS to Using_Gtid.
      
       - Fix memory leak.
      fff47f40
  18. 21 Feb, 2013 2 commits
    • unknown's avatar
      MDEV-26: Global transaction ID. · cb46c333
      unknown authored
      Fix crash in binlog_gtid_pos('', 4) (and thus slave connect) when master does not
      have binlog enabled.
      cb46c333
    • unknown's avatar
      MDEV-26: Global transaction ID · c350177a
      unknown authored
       - Add first basic mysql-test-run test case which tests switch to new master
         using MASTER_GTID_POS=AUTO.
      
       - When we connect with GTID, do not use any old relay logs, as they may
         contain the wrong events or be corrupt after crash.
      
       - Fix old bug that fails replication if we receive a heartbeat event
         immediately after an event was omitted in the stream from the master.
      
       - Fix rpl_end to clear Gtid_Pos_Auto, to keep check_testcase happy.
      c350177a
  19. 19 Feb, 2013 2 commits
  20. 18 Feb, 2013 1 commit
    • unknown's avatar
      MDEV-26: Global transaction ID. · ff8676e0
      unknown authored
      Fix initial loading of mysql.rpl_slave_state, the code had several
      issues.
      
      Some very basic MTR stuff, more to come.
      ff8676e0
  21. 15 Feb, 2013 1 commit
    • unknown's avatar
      MDEV-26: Global Transaction ID. · bfa3f154
      unknown authored
      Fix things so that GTID state on slave is updated also for
      non-XID event groups (ie. DDL and MyISAM DML).
      bfa3f154