From 7188d1cdb5e0c9d342689845ae2dcdb367fca4a3 Mon Sep 17 00:00:00 2001 From: hopebo Date: Mon, 8 Nov 2021 20:32:22 +0800 Subject: [PATCH] [Refactor] Don't drop AHI and remove cache for partitions not involved in DDL --- storage/innobase/handler/handler0alter.cc | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/storage/innobase/handler/handler0alter.cc b/storage/innobase/handler/handler0alter.cc index d049e084b0d..cc8d63b7a61 100644 --- a/storage/innobase/handler/handler0alter.cc +++ b/storage/innobase/handler/handler0alter.cc @@ -8594,29 +8594,6 @@ class alter_part_normal : public alter_part { return (0); } - - /** Try to commit - @param[in] table Table definition before the ALTER - @param[in,out] altered_table Table definition after the ALTER - @param[in] old_part the stored old partition or nullptr - if no corresponding one exists - @param[in,out] new_part the stored new partition or nullptr - if no corresponding one exists - @return 0 or error number */ - int try_commit(const TABLE *table, TABLE *altered_table, - const dd::Partition *old_part, - dd::Partition *new_part) override { - ut_ad(m_old != nullptr); - - btr_drop_ahi_for_table(*m_old); - - dict_sys_mutex_enter(); - dd_table_close(*m_old, nullptr, nullptr, true); - dict_table_remove_from_cache(*m_old); - *m_old = nullptr; - dict_sys_mutex_exit(); - return (0); - } }; /** Class which handles the partition of the state PART_TO_BE_ADDED. -- 2.19.1.3.ge56e4f7