mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Yet less TDC hash lookups
Let auto repair table and truncate table routines flush TABLE_SHARE directly. Part of MDEV-17882 - Cleanup refresh version
This commit is contained in:
@ -336,7 +336,10 @@ bool Sql_cmd_truncate_table::lock_table(THD *thd, TABLE_LIST *table_ref,
|
||||
}
|
||||
#endif
|
||||
|
||||
tdc_release_share(share);
|
||||
if (!versioned)
|
||||
tdc_remove_referenced_share(thd, share);
|
||||
else
|
||||
tdc_release_share(share);
|
||||
|
||||
if (hton == view_pseudo_hton)
|
||||
{
|
||||
@ -372,12 +375,6 @@ bool Sql_cmd_truncate_table::lock_table(THD *thd, TABLE_LIST *table_ref,
|
||||
if (*hton_can_recreate)
|
||||
close_all_tables_for_name(thd, table->s, HA_EXTRA_NOT_USED, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Table is already locked exclusively. Remove cached instances. */
|
||||
tdc_remove_table(thd, table_ref->db.str, table_ref->table_name.str);
|
||||
}
|
||||
|
||||
DBUG_RETURN(FALSE);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user