1. 08 Apr, 2015 1 commit
    • 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
  2. 30 Mar, 2015 2 commits
    • 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
  3. 25 Jan, 2015 1 commit
    • Sergey Petrunya's avatar
      MDEV-5719: Wrong result with GROUP BY and LEFT OUTER JOIN · fb71449b
      Sergey Petrunya authored
      Merged revision 5224 from mysql-5.6 and added a test case.
      ..
      revno: 5224
      committer: Sergey Glukhov <sergey.glukhov@oracle.com>
      branch nick: mysql-5.6
      timestamp: Wed 2013-06-19 14:24:08 +0400
      message:
          Bug#16620047 INCORRECT QUERY RESULT (AFTER SERVER UPGRADE)
      fb71449b
  4. 23 Jan, 2015 4 commits
  5. 22 Jan, 2015 2 commits
  6. 21 Jan, 2015 6 commits
  7. 20 Jan, 2015 2 commits
    • Olivier Bertrand's avatar
      - Last revision was to add the JSON table type. This one adds a sort · e5767723
      Olivier Bertrand authored
        on the multiple table result to obtain the same result on Windows
        and Linux (because files can be retrieved in a different order)
      modified:
        storage/connect/mysql-test/connect/r/json.result
        storage/connect/mysql-test/connect/t/json.test
      e5767723
    • Olivier Bertrand's avatar
      - Fix compile errors and warnings of LINUX G++ · 8fc69564
      Olivier Bertrand authored
      added:
        storage/connect/json.cpp
        storage/connect/json.h
        storage/connect/mysql-test/connect/r/json.result
        storage/connect/mysql-test/connect/std_data/biblio.jsn
        storage/connect/mysql-test/connect/std_data/expense.jsn
        storage/connect/mysql-test/connect/std_data/mulexp3.jsn
        storage/connect/mysql-test/connect/std_data/mulexp4.jsn
        storage/connect/mysql-test/connect/std_data/mulexp5.jsn
        storage/connect/mysql-test/connect/t/json.test
        storage/connect/tabjson.cpp
        storage/connect/tabjson.h
      modified:
        storage/connect/CMakeLists.txt
        storage/connect/engmsg.h
        storage/connect/filamtxt.h
        storage/connect/ha_connect.cc
        storage/connect/msgid.h
        storage/connect/mycat.cc
        storage/connect/plgdbsem.h
        storage/connect/tabdos.cpp
        storage/connect/value.cpp
        storage/connect/value.h
      8fc69564
  8. 19 Jan, 2015 19 commits
  9. 18 Jan, 2015 3 commits