| 1022 | |
| 1023 | |
| 1024 | void 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 | /** |
no test coverage detected