diff options
author | Kristian Nielsen <knielsen@knielsen-hq.org> | 2014-07-08 12:54:47 +0200 |
---|---|---|
committer | Kristian Nielsen <knielsen@knielsen-hq.org> | 2014-07-08 12:54:47 +0200 |
commit | 98fc5b3af8b1954e4480ac33d30493aa4de66ec4 (patch) | |
tree | 1177381a922f146c32444cc44d5564fbd0f10d8f /storage/xtradb/trx/trx0trx.cc | |
parent | e5149fa0d905c6702bd6dcc64c5e3194b6a630fc (diff) | |
download | mariadb-git-98fc5b3af8b1954e4480ac33d30493aa4de66ec4.tar.gz |
MDEV-5262, MDEV-5914, MDEV-5941, MDEV-6020: Deadlocks during parallel replication causing replication to fail.
After-review changes.
For this patch in 10.0, we do not introduce a new public storage engine API,
we just fix the InnoDB/XtraDB issues. In 10.1, we will make a better public
API that can be used for all storage engines (MDEV-6429).
Eliminate the background thread that did deadlock kills asynchroneously.
Instead, we ensure that the InnoDB/XtraDB code can handle doing the kill from
inside the deadlock detection code (when thd_report_wait_for() needs to kill a
later thread to resolve a deadlock).
(We preserve the part of the original patch that introduces dedicated mutex
and condition for the slave init thread, to remove the abuse of
LOCK_thread_count for start/stop synchronisation of the slave init thread).
Diffstat (limited to 'storage/xtradb/trx/trx0trx.cc')
-rw-r--r-- | storage/xtradb/trx/trx0trx.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/storage/xtradb/trx/trx0trx.cc b/storage/xtradb/trx/trx0trx.cc index 8af385b274c..64a7c9edd40 100644 --- a/storage/xtradb/trx/trx0trx.cc +++ b/storage/xtradb/trx/trx0trx.cc @@ -51,6 +51,9 @@ Created 3/26/1996 Heikki Tuuri #include<set> +extern "C" +int thd_deadlock_victim_preference(const MYSQL_THD thd1, const MYSQL_THD thd2); + /** Set of table_id */ typedef std::set<table_id_t> table_id_set; |