mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
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
This commit is contained in:
@ -309,8 +309,7 @@ do_rename(THD *thd, TABLE_LIST *ren_table, const LEX_CSTRING *new_db,
|
||||
Shared table. Just drop the old .frm as it's not correct anymore
|
||||
Discovery will find the old table when it's accessed
|
||||
*/
|
||||
tdc_remove_table(thd, TDC_RT_REMOVE_ALL,
|
||||
ren_table->db.str, ren_table->table_name.str);
|
||||
tdc_remove_table(thd, ren_table->db.str, ren_table->table_name.str);
|
||||
quick_rm_table(thd, 0, &ren_table->db, &old_alias, FRM_ONLY, 0);
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
@ -329,8 +328,7 @@ do_rename(THD *thd, TABLE_LIST *ren_table, const LEX_CSTRING *new_db,
|
||||
DBUG_RETURN(1);
|
||||
#endif
|
||||
|
||||
tdc_remove_table(thd, TDC_RT_REMOVE_ALL,
|
||||
ren_table->db.str, ren_table->table_name.str);
|
||||
tdc_remove_table(thd, ren_table->db.str, ren_table->table_name.str);
|
||||
|
||||
if (hton != view_pseudo_hton)
|
||||
{
|
||||
|
Reference in New Issue
Block a user