diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2021-02-16 14:56:59 +0100 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2021-02-16 14:56:59 +0100 |
commit | e0072fadcb00edae74e748aee3148075b9cddae2 (patch) | |
tree | 625d5c0869cfbb322a2b4cdaab453e17fd5d31bf /sql/sql_insert.cc | |
parent | 1146e98b3af3e2b15df0598a860f4571663a98d0 (diff) | |
parent | ae7989ca2059869f81c837509e5ff554f7f63562 (diff) | |
download | mariadb-git-10.6-halfmerge.tar.gz |
Merge branch 'bb-10.5-release' into bb-10.6-release10.6-halfmerge
Diffstat (limited to 'sql/sql_insert.cc')
-rw-r--r-- | sql/sql_insert.cc | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index eb3e1ec7493..f0b84ab126f 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -2936,23 +2936,7 @@ void kill_delayed_threads(void) mysql_mutex_lock(&di->thd.LOCK_thd_kill); if (di->thd.killed < KILL_CONNECTION) di->thd.set_killed_no_mutex(KILL_CONNECTION); - if (di->thd.mysys_var) - { - mysql_mutex_lock(&di->thd.mysys_var->mutex); - if (di->thd.mysys_var->current_cond) - { - /* - We need the following test because the main mutex may be locked - in handle_delayed_insert() - */ - if (&di->mutex != di->thd.mysys_var->current_mutex) - mysql_mutex_lock(di->thd.mysys_var->current_mutex); - mysql_cond_broadcast(di->thd.mysys_var->current_cond); - if (&di->mutex != di->thd.mysys_var->current_mutex) - mysql_mutex_unlock(di->thd.mysys_var->current_mutex); - } - mysql_mutex_unlock(&di->thd.mysys_var->mutex); - } + di->thd.abort_current_cond_wait(false); mysql_mutex_unlock(&di->thd.LOCK_thd_kill); } mysql_mutex_unlock(&LOCK_delayed_insert); // For unlink from list |