diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2020-06-05 14:59:33 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2020-06-05 15:22:46 +0300 |
commit | efc70da5fd0459ff44153529d13651741cc32bc4 (patch) | |
tree | b8f5b8c270ed07793c8d562833f514af29965d99 /mysql-test/main/win.test | |
parent | 138c11cce59304ba67b9229d267eef1503a968fd (diff) | |
download | mariadb-git-efc70da5fd0459ff44153529d13651741cc32bc4.tar.gz |
MDEV-22769 Shutdown hang or crash due to XA breaking locks
The background drop table queue in InnoDB is a work-around for
cases where the SQL layer is requesting DDL on tables on which
transactional locks exist.
One such case are XA transactions. Our test case exploits the
fact that the recovery of XA PREPARE transactions will
only resurrect InnoDB table locks, but not MDL that should
block any concurrent DDL.
srv_shutdown_t: Introduce the srv_shutdown_state=SRV_SHUTDOWN_INITIATED
for the initial part of shutdown, to wait for the background drop
table queue to be emptied.
srv_shutdown_bg_undo_sources(): Assign
srv_shutdown_state=SRV_SHUTDOWN_INITIATED
before waiting for the background drop table queue to be emptied.
row_drop_tables_for_mysql_in_background(): On slow shutdown, if
no active transactions exist (excluding ones that are in
XA PREPARE state), skip any tables on which locks exist.
row_drop_table_for_mysql(): Do not unnecessarily attempt to
drop InnoDB persistent statistics for tables that have
already been added to the background drop table queue.
row_mysql_close(): Relax an assertion, and free all memory
even if innodb_force_recovery=2 would prevent the background
drop table queue from being emptied.
Diffstat (limited to 'mysql-test/main/win.test')
0 files changed, 0 insertions, 0 deletions