MCPcopy Create free account
hub / github.com/MariaDB/server / tdc_remove_referenced_share

Function tdc_remove_referenced_share

sql/table_cache.cc:1024–1036  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1022
1023
1024void tdc_remove_referenced_share(THD *thd, TABLE_SHARE *share)
1025{
1026 DBUG_ASSERT(thd->mdl_context.is_lock_owner(MDL_key::TABLE, share->db.str,
1027 share->table_name.str,
1028 MDL_EXCLUSIVE));
1029 share->tdc->flush_unused(true);
1030 mysql_mutex_lock(&share->tdc->LOCK_table_share);
1031 DEBUG_SYNC(thd, "before_wait_for_refs");
1032 share->tdc->wait_for_refs(1);
1033 DBUG_ASSERT(share->tdc->all_tables.is_empty());
1034 share->tdc->ref_count--;
1035 tdc_delete_share_from_hash(share->tdc);
1036}
1037
1038
1039/**

Callers 3

tdc_remove_tableFunction · 0.85
lock_tableMethod · 0.85
auto_repair_tableFunction · 0.85

Calls 5

is_lock_ownerMethod · 0.80
flush_unusedMethod · 0.80
wait_for_refsMethod · 0.80
is_emptyMethod · 0.45

Tested by

no test coverage detected