1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-7145: Delayed slave.

Extend to work also for parallel replication.

Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
This commit is contained in:
Kristian Nielsen
2016-10-14 12:22:00 +02:00
parent 09136ec304
commit 3011060b2a
3 changed files with 14 additions and 3 deletions

View File

@ -2418,8 +2418,17 @@ rpl_parallel::do_event(rpl_group_info *serial_rgi, Log_event *ev,
!(unlikely(rli->gtid_skip_flag != GTID_SKIP_NOT) && is_group_event))
return -1;
/* ToDo: what to do with this lock?!? */
mysql_mutex_unlock(&rli->data_lock);
/* Note: rli->data_lock is released by sql_delay_event(). */
if (sql_delay_event(ev, rli->sql_driver_thd, serial_rgi))
{
/*
If sql_delay_event() returns non-zero, it means that the wait timed out
due to slave stop. We should not queue the event in this case, it must
not be applied yet.
*/
delete ev;
return 1;
}
if (unlikely(typ == FORMAT_DESCRIPTION_EVENT))
{