From 7a947614fbf8b925ae3df70ec8df80c745eafd4c Mon Sep 17 00:00:00 2001 From: Sergey Vojtovich Date: Tue, 17 Dec 2019 16:25:15 +0400 Subject: Split tdc_remove_table() TDC_RT_REMOVE_ALL -> tdc_remove_table(). Some occurrences replaced with TDC_element::flush() (whenver TABLE_SHARE is available). TDC_RT_REMOVE_NOT_OWN[_KEEP_SHARE] -> TDC_element::flush(). These modes assume that current thread owns TABLE_SHARE reference, which means we can avoid hash lookup and flush unused TABLE instances directly. TDC_RT_REMOVE_UNUSED -> TDC_element::flush_unused(). Only [ab]used by mysql_admin_table() currently. Should be removed eventually. Part of MDEV-17882 - Cleanup refresh version --- sql/sql_truncate.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'sql/sql_truncate.cc') diff --git a/sql/sql_truncate.cc b/sql/sql_truncate.cc index a47822e43ca..1d2ec66eae6 100644 --- a/sql/sql_truncate.cc +++ b/sql/sql_truncate.cc @@ -375,8 +375,7 @@ bool Sql_cmd_truncate_table::lock_table(THD *thd, TABLE_LIST *table_ref, else { /* Table is already locked exclusively. Remove cached instances. */ - tdc_remove_table(thd, TDC_RT_REMOVE_ALL, table_ref->db.str, - table_ref->table_name.str); + tdc_remove_table(thd, table_ref->db.str, table_ref->table_name.str); } DBUG_RETURN(FALSE); -- cgit v1.2.1