1. 04 Mar, 2014 6 commits
    • Michael Widenius's avatar
      Fixed bug found by Pavel Ivanov in Gtid_log_event. · a6926451
      Michael Widenius authored
      - Removed double call to trans_begin() for GTID BEGIN event
      - Don't set OPTION_BEGIN before calling trans_begin() as this causes extra work in trans_begin()
      
      sql/log_event.cc:
        Removed double call to trans_begin for GTID BEGIN event.
        Don't set OPTION_BEGIN before calling trans_begin() as this causes extra work in trans_begin().
        This was done by removing parsing of "BEGIN" and instead executing trans_begin() direct.
        This is much faster, but we lost the ability logging of possible slow "BEGIN" statements. As this should never happen it can be ignored.
      a6926451
    • Michael Widenius's avatar
      Fixed timing problem in rpl_heartbeat_basic.test · 2520e8d1
      Michael Widenius authored
      mysql-test/suite/rpl/t/rpl_heartbeat_basic.test:
        Added sync_slave_with_master to remove timing problem
      2520e8d1
    • unknown's avatar
      5ec49e64
    • unknown's avatar
      MDEV-5754: MySQL 5.5 slaves cannot replicate from MariaDB 10.0 · b5b82108
      unknown authored
      The problem was when a GTID event was part of a group commit, and so contained
      a commit id. The code that replaces GTID with a BEGIN event for old slaves did
      not correctly handle this case.
      
      Fix the code so that the GTID with commit id can also be properly replaced
      with a BEGIN query event. The extra two bytes are in the BEGIN event replaced
      with a dummy, empty time zone string.
      b5b82108
    • unknown's avatar
      MDEV-5769: Slave crashes on attempt to do parallel replication from an older master · ec374f1e
      unknown authored
      Older master has no GTID events, so such events are not available for
      deciding on scheduling of event groups and so on.
      
      With this patch, we run such events from old masters single-threaded, in the
      sql driver thread.
      
      This seems better than trying to make the parallel code handle the data from
      older masters; while possible, this would require a lot of testing (as well as
      possibly some extra overhead in the scheduling of events), which hardly seems
      worthwhile.
      ec374f1e
    • Sergei Golubchik's avatar
  2. 03 Mar, 2014 1 commit
    • unknown's avatar
      MDEV-5764: START SLAVE UNTIL does not work with parallel replication · 641feed4
      unknown authored
      With parallel replication, there can be any number of events queued on
      in-memory lists in the worker threads.
      
      For normal STOP SLAVE, we want to skip executing any remaining events on those
      lists and stop as quickly as possible.
      
      However, for START SLAVE UNTIL, when the UNTIL position is reached in the SQL
      driver thread, we must _not_ stop until all already queued events for the
      workers have been executed - otherwise we would stop too early, before the
      actual UNTIL position had been completely reached.
      
      The code did not handle UNTIL correctly, stopping too early due to not
      executing the queued events to completion. Fix this, and also implement that
      an explicit STOP SLAVE in the middle (when the SQL driver thread has reached
      the UNTIL position but the workers have not) _will_ cause an immediate stop.
      641feed4
  3. 02 Mar, 2014 3 commits
  4. 01 Mar, 2014 3 commits
  5. 28 Feb, 2014 4 commits
  6. 27 Feb, 2014 8 commits
  7. 26 Feb, 2014 14 commits
    • Sergei Golubchik's avatar
      OQGraph fails in --embedded · f19b5f4e
      Sergei Golubchik authored
      f19b5f4e
    • Sergei Golubchik's avatar
      InnoDB 5.6.15 merge. · 15ee9721
      Sergei Golubchik authored
      update test results
      15ee9721
    • Sergei Golubchik's avatar
      5.6.15 · eeb7091e
      Sergei Golubchik authored
      eeb7091e
    • Sergei Golubchik's avatar
      f92058a2
    • Sergei Golubchik's avatar
      ac585e9e
    • Sergei Golubchik's avatar
      01758609
    • unknown's avatar
      Merge MDEV-5657 (parallel replication) to 10.0 · 1c9aa7ec
      unknown authored
      1c9aa7ec
    • unknown's avatar
      Merge MDEV-5657 (parallel replication) to 10.0 · 20959fa0
      unknown authored
      20959fa0
    • Sergei Golubchik's avatar
      Percona-Server-5.6.15-rel63.0.tar.gz · b338c8eb
      Sergei Golubchik authored
      b338c8eb
    • Sergei Golubchik's avatar
      Fix code in make_sortkey() that only worked by chance · 6bc7bd0e
      Sergei Golubchik authored
      (assert added by MySQL verified that strnxfrm can only *increase*
      the string length if from == to, and the latter is a random
      decision made by individual items and String::realloc).
        
      Fix it by avoiding the memcpy in the first place.
      6bc7bd0e
    • Sergei Golubchik's avatar
      10.0-base merge · 0dc23679
      Sergei Golubchik authored
      0dc23679
    • unknown's avatar
      MDEV-5657: Parallel replication. · e90f68c0
      unknown authored
      Clean up and improve the parallel implementation code, mainly related to
      scheduling of work to threads and handling of stop and errors.
      
      Fix a lot of bugs in various corner cases that could lead to crashes or
      corruption.
      
      Fix that a single replication domain could easily grab all worker threads and
      stall all other domains; now a configuration variable
      --slave-domain-parallel-threads allows to limit the number of
      workers.
      
      Allow next event group to start as soon as previous group begins the commit
      phase (as opposed to when it ends it); this allows multiple event groups on
      the slave to participate in group commit, even when no other opportunities for
      parallelism are available.
      
      Various fixes:
      
       - Fix some races in the rpl.rpl_parallel test case.
      
       - Fix an old incorrect assertion in Log_event iocache read.
      
       - Fix repeated malloc/free of wait_for_commit and rpl_group_info objects.
      
       - Simplify wait_for_commit wakeup logic.
      
       - Fix one case in queue_for_group_commit() where killing one thread would
         fail to correctly signal the error to the next, causing loss of the
         transaction after slave restart.
      
       - Fix leaking of pthreads (and their allocated stack) due to missing
         PTHREAD_CREATE_DETACHED attribute.
      
       - Fix how one batch of group-committed transactions wait for the previous
         batch before starting to execute themselves. The old code had a very
         complex scheduling where the first transaction was handled differently,
         with subtle bugs in corner cases. Now each event group is always scheduled
         for a new worker (in a round-robin fashion amongst available workers).
         Keep a count of how many transactions have started to commit, and wait for
         that counter to reach the appropriate value.
      
       - Fix slave stop to wait for all workers to actually complete processing;
         before, the wait was for update of last_committed_sub_id, which happens a
         bit earlier, and could leave worker threads potentially accessing bits of
         the replication state that is no longer valid after slave stop.
      
       - Fix a couple of places where the test suite would kill a thread waiting
         inside enter_cond() in connection with debug_sync; debug_sync + kill can
         crash in rare cases due to a race with mysys_var_current_mutex in this
         case.
      
       - Fix some corner cases where we had enter_cond() but no exit_cond().
      
       - Fix that we could get failure in wait_for_prior_commit() but forget to flag
         the error with my_error().
      
       - Fix slave stop (both for normal stop and stop due to error). Now, at stop
         we pick a specific safe point (in terms of event groups executed) and make
         sure that all event groups before that point are executed to completion,
         and that no event group after start executing; this ensures a safe place to
         restart replication, even for non-transactional stuff/DDL. In error stop,
         make sure that all prior event groups are allowed to execute to completion,
         and that any later event groups that have started are rolled back, if
         possible. The old code could leave eg. T1 and T3 committed but T2 not, or
         it could even leave half a transaction not rolled back in some random
         worker, which would cause big problems when that worker was later reused
         after slave restart.
      
       - Fix the accounting of amount of events queued for one worker. Before, the
         amount was reduced immediately as soon as the events were dequeued (which
         happens all at once); this allowed twice the amount of events to be queued
         in memory for each single worker, which is not what users would expect.
      
       - Fix that an error set during execution of one event was sometimes not
         cleared before executing the next, causing problems with the error
         reporting.
      
       - Fix incorrect handling of thd->killed in worker threads.
      e90f68c0
    • unknown's avatar
      MDEV-4309: DBT-3 Q1 benchmark: Benchmark + profile a patch · 98260750
      unknown authored
      Removed repetative calls of virtual functions.
      Removed check of posibility just copy field for every record.
      98260750
    • Sergey Vojtovich's avatar
      MDEV-5612 - my_rename() deletes files when it shouldn't · 9d918f41
      Sergey Vojtovich authored
      Ported fix for MySQL BUG#51861.
      9d918f41
  8. 25 Feb, 2014 1 commit