MDEV-7588 Add thd_wait_begin/end to notify threadpool of binlog waits
This commit is contained in:
parent
4008a3e55b
commit
dd90dae3c0
@ -7739,11 +7739,13 @@ int MYSQL_BIN_LOG::wait_for_update_bin_log(THD* thd,
|
|||||||
int ret= 0;
|
int ret= 0;
|
||||||
DBUG_ENTER("wait_for_update_bin_log");
|
DBUG_ENTER("wait_for_update_bin_log");
|
||||||
|
|
||||||
|
thd_wait_begin(thd, THD_WAIT_BINLOG);
|
||||||
if (!timeout)
|
if (!timeout)
|
||||||
mysql_cond_wait(&update_cond, &LOCK_log);
|
mysql_cond_wait(&update_cond, &LOCK_log);
|
||||||
else
|
else
|
||||||
ret= mysql_cond_timedwait(&update_cond, &LOCK_log,
|
ret= mysql_cond_timedwait(&update_cond, &LOCK_log,
|
||||||
const_cast<struct timespec *>(timeout));
|
const_cast<struct timespec *>(timeout));
|
||||||
|
thd_wait_end(thd);
|
||||||
DBUG_RETURN(ret);
|
DBUG_RETURN(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user