1. 08 Apr, 2015 6 commits
    • Kristian Nielsen's avatar
      Merge MDEV-7910 into 10.1 · 82b9eb5e
      Kristian Nielsen authored
      82b9eb5e
    • Kristian Nielsen's avatar
      MDEV-7910: innodb.binlog_consistent fails sporadically in buildbot · b3c7c8cd
      Kristian Nielsen authored
      The test case was missing --source include/wait_for_binlog_checkpoint.inc.
      So it could occasionally fail if the checkpoint managed to occur just at the
      right point in time between fetching the two binlog positions to compare.
      b3c7c8cd
    • Kristian Nielsen's avatar
      MDEV-7888, MDEV-7929: Parallel replication hangs sometimes on ANALYZE TABLE or DDL · 7ee1a41c
      Kristian Nielsen authored
      Follow-up patch with 10.1-specific changes.
      
      Add test cases that more closely resembles the original bug report (which uses
      the 10.1-specific --slave-parallel-mode=optimistic).
      
      Also fix the code so that ANALYZE statements are now marked as DDL, and will
      not be attempted to speculatively run in parallel with other transactions.
      7ee1a41c
    • Kristian Nielsen's avatar
      48c10fb5
    • Kristian Nielsen's avatar
      MDEV-7888, MDEV-7929: Parallel replication hangs sometimes on ANALYZE TABLE or DDL · 3b961347
      Kristian Nielsen authored
      The hangs occur when the group_commit_orderer object is freed before the last
      mark_start_commit() call on it - this loses the wakeup to other waiting worker
      threads, causing them to hang until killed manually.
      
      The object was freed because wakeup_subsequent_commits() was called two early
      in two places. For MDEV-7888, during ANALYZE TABLE, and for MDEV-7929 during
      record_gtid() after processing a DDL event. The group_commit_orderer object
      can be freed when its last transaction has called wait_for_prior_commit().
      
      Fix by implementing a suspend/resume mechanism for wakeup_subsequent_commits()
      that can be used in places where a transaction is committed without this being
      the commit of the actual replication event group.
      
      Also add a protection mechanism (that asserts in debug builds) which can
      prevent the too-early free and hang if other similar bugs should remain in
      other parts of the code.
      3b961347
    • Sergei Petrunia's avatar
      MDEV-7927: Server crashes in in Time_and_counter_tracker::incr_loops · 2b475b56
      Sergei Petrunia authored
      - JOIN::save_explain_data should also set JOIN::tracker (it already
        sets join_tab[0].tracker). This is needed for UNIONs inside subqueries.
      2b475b56
  2. 07 Apr, 2015 3 commits
  3. 06 Apr, 2015 6 commits
  4. 03 Apr, 2015 4 commits
  5. 01 Apr, 2015 1 commit
  6. 31 Mar, 2015 2 commits
  7. 30 Mar, 2015 4 commits
    • Kristian Nielsen's avatar
      Merge MDEV-7847 and MDEV-7882 into 10.0. · f573b65e
      Kristian Nielsen authored
      Conflicts:
      	mysql-test/suite/rpl/r/rpl_parallel.result
      	sql/rpl_parallel.cc
      f573b65e
    • Kristian Nielsen's avatar
      MDEV-7847: "Slave worker thread retried transaction 10 time(s) in vain, giving... · 880f2273
      Kristian Nielsen authored
      MDEV-7847: "Slave worker thread retried transaction 10 time(s) in vain, giving up", followed by replication hanging
      
      This patch fixes a bug in the error handling in parallel replication, when one
      worker thread gets a failure and other worker threads processing later
      transactions have to rollback and abort.
      
      The problem was with the lifetime of group_commit_orderer objects (GCOs).
      A GCO is freed when we register that its last event group has committed. This
      relies on register_wait_for_prior_commit() and wait_for_prior_commit() to
      ensure that the fact that T2 has committed implies that any earlier T1 has
      also committed, and can thus no longer execute mark_start_commit().
      
      However, in the error case, the code was skipping the
      register_wait_for_prior_commit() and wait_for_prior_commit() calls. Thus
      commit ordering was not guaranteed, and a GCO could be freed too early. Then a
      later mark_start_commit() would reference deallocated GCO, which could lead to
      lost wakeup (causing slave threads to hang) or other corruption.
      
      This patch makes also the error case respect commit order. This way, also the
      error case gets the GCO lifetime correct, and the hang no longer occurs.
      880f2273
    • Kristian Nielsen's avatar
      MDEV-7882: Excessive transaction retry in parallel replication · a4082918
      Kristian Nielsen authored
      When a transaction in parallel replication needs to retry (eg. because of
      deadlock kill), first wait for all prior transactions to commit before doing
      the retry. This way, we avoid the retry once again conflicting with a prior
      transaction, requiring yet another retry.
      
      Without this patch, we saw "in the wild" that transactions had to be retried
      more than 10 times to succeed, which exceeds the default
      --slave_transaction_retries value and is in any case undesirable.
      
      (We already do this in 10.1 in "optimistic" parallel replication mode; this
      patch just makes the code use the same logic for "conservative" mode (only
      mode in 10.0)).
      a4082918
    • Alexander Barkov's avatar
      Removing Item_string::m_cs_specified and · 59df1009
      Alexander Barkov authored
      making Item_string::is_cs_specified() virtual instead.
      59df1009
  8. 29 Mar, 2015 3 commits
  9. 27 Mar, 2015 2 commits
  10. 26 Mar, 2015 1 commit
    • Alexander Barkov's avatar
      Preparatory refactoring for: · 50eee605
      Alexander Barkov authored
      MDEV-6218 Wrong result of CHAR_LENGTH(non-BMP-character) with 3-byte utf8
      - Moving get_text() as a method to Lex_input_stream.
      - Moving the unescaping part into a separate function,
        this piece of code will later go to /strings most likely.
      - Removing Lex_input_string::yytoklen, as it's not needed any more.
      50eee605
  11. 25 Mar, 2015 7 commits
  12. 24 Mar, 2015 1 commit
    • Kristian Nielsen's avatar
      MDEV-7825: Parallel replication race condition on gco->flags, possibly resulting in slave hang · bd2ae787
      Kristian Nielsen authored
      The patch for optimistic parallel replication as a memory optimisation moved
      the gco->installed field into a bit in gco->flags. However, that is just plain
      wrong. The gco->flags field is owned by the SQL driver thread, but
      gco->installed is used by the worker threads, so this will cause a race
      condition.
      
      The user-visible problem might be conflicts between transactions and/or slave
      threads hanging.
      
      So revert this part of the optimistic parallel replication patch, going back
      to using a separate field gco->installed like in 10.0.
      bd2ae787