mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +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:
@ -655,8 +655,7 @@ bool mysql_create_view(THD *thd, TABLE_LIST *views,
|
||||
*/
|
||||
|
||||
if (!res)
|
||||
tdc_remove_table(thd, TDC_RT_REMOVE_ALL, view->db.str,
|
||||
view->table_name.str);
|
||||
tdc_remove_table(thd, view->db.str, view->table_name.str);
|
||||
|
||||
if (!res && mysql_bin_log.is_open())
|
||||
{
|
||||
@ -1876,8 +1875,7 @@ bool mysql_drop_view(THD *thd, TABLE_LIST *views, enum_drop_mode drop_mode)
|
||||
For a view, there is a TABLE_SHARE object.
|
||||
Remove it from the table definition cache, in case the view was cached.
|
||||
*/
|
||||
tdc_remove_table(thd, TDC_RT_REMOVE_ALL, view->db.str,
|
||||
view->table_name.str);
|
||||
tdc_remove_table(thd, view->db.str, view->table_name.str);
|
||||
query_cache_invalidate3(thd, view, 0);
|
||||
sp_cache_invalidate();
|
||||
}
|
||||
|
Reference in New Issue
Block a user