1. 07 Feb, 2014 2 commits
    • unknown's avatar
      MDEV-4726: Race in mysql-test/suite/rpl/t/rpl_gtid_stop_start.test · 7bb022f3
      unknown authored
      Some GTID test cases were using include/wait_condition.inc with a
      condition like SELECT COUNT(*)=4 FROM t1 to wait for the slave to
      catch up with the master. This causes races and test failures, as the
      changes to the tables become visible at the COMMIT of the SQL thread
      (or even before in case of MyISAM), but the changes to
      @@gtid_slave_pos only become visible a little bit after the COMMIT.
      
      Now that we have MASTER_GTID_WAIT(), just use that to sync up in a
      GTID-friendly way, wrapped in nice include/save_master_gtid.inc and
      include/sync_with_master_gtid.inc scripts.
      7bb022f3
    • unknown's avatar
      MDEV-4984: Implement MASTER_GTID_WAIT() and @@LAST_GTID. · 4e6606ac
      unknown authored
      MASTER_GTID_WAIT() is similar to MASTER_POS_WAIT(), but works with a
      GTID position rather than an old-style filename/offset.
      
      @@LAST_GTID gives the GTID assigned to the last transaction written
      into the binlog.
      
      Together, the two can be used by applications to obtain the GTID of
      an update on the master, and then do a MASTER_GTID_WAIT() for that
      position on any read slave where it is important to get results that
      are caught up with the master at least to the point of the update.
      
      The implementation of MASTER_GTID_WAIT() is implemented in a way
      that tries to minimise the performance impact on the SQL threads,
      even in the presense of many waiters on single GTID positions (as
      from @@LAST_GTID).
      4e6606ac
  2. 31 Jan, 2014 1 commit
  3. 07 Jan, 2014 1 commit
    • unknown's avatar
      Merge into 10.0-base: MDEV-5363, make parallel replication waits killable. · 90a76ff2
      unknown authored
      There are some places in parallel replication where transactions wait
      for one another. Make sure those waits are killable by the (super)user.
      
      Upon kill, unfinished transactions will be rolled back and the SQL thread
      stops with an error.
      
      Add a number of test cases to test the different cases. Also fix some
      existing bugs found by those tests.
      90a76ff2
  4. 06 Jan, 2014 1 commit
    • unknown's avatar
      MDEV-5363: Make parallel replication waits killable · cee92518
      unknown authored
      Add another test case. This one for killing a query that is waiting
      for a prior commit, when --log-slave-updates=0 (in this case the
      wait happens in different code from --log-slave-updates=1).
      cee92518
  5. 03 Jan, 2014 1 commit
    • unknown's avatar
      MDEV-5363: Make parallel replication waits killable · c4e76b20
      unknown authored
      Add another test case. This one for killing the SQL driver thread while it is
      waiting for room in the list of events queued for a worker thread.
      
      Fix bugs found:
      
       - Several memory leaks in various error cases.
      
       - SQL error code was not set (for SHOW SLAVE STATUS etc.) when killed.
      c4e76b20
  6. 19 Dec, 2013 1 commit
  7. 18 Dec, 2013 1 commit
    • unknown's avatar
      MDEV-5363: Make parallel replication waits killable · 86a2c03b
      unknown authored
        
      Add another test case. This one for killing a worker while its transaction is
      waiting to start until the previous transaction has committed.
      
      Fix setting reading_or_writing to 0 in worker threads so SHOW SLAVE STATUS can
      show something more useful than "Reading from net".
      86a2c03b
  8. 17 Dec, 2013 6 commits
  9. 16 Dec, 2013 1 commit
    • unknown's avatar
      MDEV-5363: Make parallel replication waits killable · f2c4765c
      unknown authored
      Fix locking bug / race introduced by previous patch: If we
      bail out of next_event() due to kill, there was a small window
      where we could exit without rli->data_lock held, causing an
      unlock-twice bug.
      f2c4765c
  10. 15 Dec, 2013 4 commits
  11. 13 Dec, 2013 2 commits
    • unknown's avatar
      MDEV-5363: Make parallel replication waits killable · dbfe5f47
      unknown authored
      Add a test case for killing a waiting query in parallel replication.
      
      Fix several bugs found:
      
       - We should not wakeup_subsequent_commits() in ha_rollback_trans(), since we
         do not know the right wakeup_error() to give.
      
       - When a wait_for_prior_commit() is killed, we must unregister from the
         waitee so we do not race and get an extra (non-kill) wakeup.
      
       - We need to deal with error propagation correctly in queue_for_group_commit
         when one thread is killed.
      
       - Fix one locking issue in queue_for_group_commit(), we could unlock the
         waitee lock too early and this end up processing wakeup() with insufficient
         locking.
      
       - Fix Xid_log_event::do_apply_event; if commit fails it must not update the
         in-memory @@gtid_slave_pos state.
      
       - Fix and cleanup some things in the rpl_parallel.cc error handling.
      
       - Add a missing check for killed in the slave sql driver thread, to avoid a
         race.
      dbfe5f47
    • Sergei Golubchik's avatar
      5.3 merge · e68bccc7
      Sergei Golubchik authored
      e68bccc7
  12. 12 Dec, 2013 5 commits
  13. 11 Dec, 2013 2 commits
  14. 07 Dec, 2013 1 commit
  15. 06 Dec, 2013 2 commits
  16. 05 Dec, 2013 3 commits
    • Igor Babaev's avatar
      Merge · 21d0d8c5
      Igor Babaev authored
      21d0d8c5
    • Igor Babaev's avatar
      Fixed bug mdev-5382 · ccf5871d
      Igor Babaev authored
      When marking used columns the function find_field_in_table_ref() erroneously
      called the walk method for the real item behind a view/derived table field
      with the second parameter set to TRUE.
      This erroneous code was introduced in 2006. 
      ccf5871d
    • unknown's avatar
      MDEV-5363: Make parallel replication waits killable · 4d6ee2d1
      unknown authored
      Make wait_for_prior_commit killable, and handle the error if
      killed.
      4d6ee2d1
  17. 04 Dec, 2013 1 commit
  18. 03 Dec, 2013 1 commit
  19. 02 Dec, 2013 2 commits
  20. 01 Dec, 2013 1 commit
  21. 29 Nov, 2013 1 commit