diff options
author | Thirunarayanan Balathandayuthapani <thiru@mariadb.com> | 2020-01-30 17:54:49 +0530 |
---|---|---|
committer | Thirunarayanan Balathandayuthapani <thiru@mariadb.com> | 2020-01-30 17:54:49 +0530 |
commit | afe9caa82d9f02eba17efc96baeb62330cfe927b (patch) | |
tree | ea64a80bf7a3732da42c137d1da5b6207690a58a | |
parent | d89bb8867459c058997f0e315cef76d95b56fb2b (diff) | |
download | mariadb-git-afe9caa82d9f02eba17efc96baeb62330cfe927b.tar.gz |
MDEV-21564 Assert in trx_purge_add_update_undo_to_history during shutdown
- dict_table_try_drop_aborted() can generate undo logs. So it should
be avoided after shutdown of background threads.
-rw-r--r-- | storage/innobase/dict/dict0dict.cc | 7 | ||||
-rw-r--r-- | storage/xtradb/dict/dict0dict.cc | 7 |
2 files changed, 10 insertions, 4 deletions
diff --git a/storage/innobase/dict/dict0dict.cc b/storage/innobase/dict/dict0dict.cc index 6bd5de85b08..faa804220d3 100644 --- a/storage/innobase/dict/dict0dict.cc +++ b/storage/innobase/dict/dict0dict.cc @@ -2,7 +2,7 @@ Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2012, Facebook Inc. -Copyright (c) 2013, 2019, MariaDB Corporation. +Copyright (c) 2013, 2020, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -604,7 +604,10 @@ dict_table_close( mutex_exit(&dict_sys->mutex); - if (drop_aborted) { + /* dict_table_try_drop_aborted() can generate undo logs. + So it should be avoided after shutdown of background + threads */ + if (drop_aborted && !srv_undo_sources) { dict_table_try_drop_aborted(NULL, table_id, 0); } } diff --git a/storage/xtradb/dict/dict0dict.cc b/storage/xtradb/dict/dict0dict.cc index 2bea154749f..6d0500589b1 100644 --- a/storage/xtradb/dict/dict0dict.cc +++ b/storage/xtradb/dict/dict0dict.cc @@ -2,7 +2,7 @@ Copyright (c) 1996, 2017, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2012, Facebook Inc. -Copyright (c) 2013, 2019, MariaDB Corporation. +Copyright (c) 2013, 2020, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -604,7 +604,10 @@ dict_table_close( mutex_exit(&dict_sys->mutex); - if (drop_aborted) { + /* dict_table_try_drop_aborted() can generate undo logs. + So it should be avoided after shutdown of background + threads */ + if (drop_aborted && srv_undo_sources) { dict_table_try_drop_aborted(NULL, table_id, 0); } } |