diff options
author | Sergei Golubchik <serg@mariadb.org> | 2021-11-03 15:34:28 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2021-11-26 11:06:09 +0100 |
commit | a96b42826964b1dbb1eeee536c9f611e462719c0 (patch) | |
tree | 74988638432baaa349c0be67684b4e8792b48f9a /sql | |
parent | 4ba747855376d9b854dd2656ab8caf7b371ce13e (diff) | |
download | mariadb-git-a96b42826964b1dbb1eeee536c9f611e462719c0.tar.gz |
MDEV-26755 innodb.undo_truncate: ilink::assert_linked(): Assertion `prev != 0 && next != 0' failed
close_connections() in mysqld.cc sends a signal to all threads.
But InnoDB is too busy purging, doesn't react immediately.
close_connections() waits 20 seconds, which isn't enough in this
particular case, and then unlinks all threads from
the list and forcibly closes their vio connection.
InnoDB background threads have no vio connection to close, but
they're unlinked all the same. So when later they finally notice
the shutdown request and try to unlink themselves, they fail to
assert that they're still linked.
Fix: don't assert_linked, as another thread can unlink this THD anytime
Diffstat (limited to 'sql')
-rw-r--r-- | sql/sql_class.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/sql/sql_class.h b/sql/sql_class.h index 9fff422684e..3f0fba8fc10 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -4557,12 +4557,10 @@ inline void add_to_active_threads(THD *thd) /* This should be called when you want to delete a thd that was not running any queries. - This function will assert that the THD is linked. */ inline void unlink_not_visible_thd(THD *thd) { - thd->assert_linked(); mysql_mutex_lock(&LOCK_thread_count); thd->unlink(); mysql_mutex_unlock(&LOCK_thread_count); |