1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-5363: Make parallel replication waits killable

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).
This commit is contained in:
unknown
2014-01-06 16:05:52 +01:00
parent c4e76b20a4
commit cee9251851
5 changed files with 332 additions and 2 deletions

View File

@@ -5789,6 +5789,7 @@ wait_for_commit::wait_for_prior_commit2(THD *thd)
wait_for_commit *loc_waitee;
mysql_mutex_lock(&LOCK_wait_commit);
DEBUG_SYNC(thd, "wait_for_prior_commit_waiting");
old_msg= thd->enter_cond(&COND_wait_commit, &LOCK_wait_commit,
"Waiting for prior transaction to commit");
while (waiting_for_commit && !thd->check_killed())
@@ -5821,6 +5822,7 @@ wait_for_commit::wait_for_prior_commit2(THD *thd)
remove_from_list(&loc_waitee->subsequent_commits_list);
mysql_mutex_unlock(&loc_waitee->LOCK_wait_commit);
DEBUG_SYNC(thd, "wait_for_prior_commit_killed");
wakeup_error= thd->killed_errno();
if (!wakeup_error)
wakeup_error= ER_QUERY_INTERRUPTED;