Commit 2cb4f07d authored by unknown's avatar unknown

MDEV-4506: Parallel replication

Fix access of freed memory in debug builds. When deleting serial_rgi,
safe_mutex was trying to access current_thd, when that thd had just been
deleted (I hate all this current_thd and other magic thread local storage crap
used all over the code). Now delete the serial_rgi before the thd.
parent 7bc4918d
......@@ -4568,8 +4568,8 @@ log '%s' at position %s, relay log '%s' position: %s%s", RPL_LOG_NAME,
serial_rgi->thd= rli->sql_driver_thd= 0;
mysql_mutex_lock(&LOCK_thread_count);
THD_CHECK_SENTRY(thd);
delete thd;
delete serial_rgi;
delete thd;
mysql_mutex_unlock(&LOCK_thread_count);
/*
Note: the order of the broadcast and unlock calls below (first broadcast, then unlock)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment