MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / IDX_delete_index

Function IDX_delete_index

src/jrd/idx.cpp:1021–1053  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1019
1020
1021void IDX_delete_index(thread_db* tdbb, jrd_rel* relation, USHORT id)
1022{
1023/**************************************
1024 *
1025 * I D X _ d e l e t e _ i n d e x
1026 *
1027 **************************************
1028 *
1029 * Functional description
1030 * Delete a single index.
1031 *
1032 **************************************/
1033 SET_TDBB(tdbb);
1034
1035 signal_index_deletion(tdbb, relation, id);
1036
1037 WIN window(get_root_page(tdbb, relation));
1038 CCH_FETCH(tdbb, &window, LCK_write, pag_root);
1039
1040 const bool tree_exists = BTR_delete_index(tdbb, &window, id);
1041
1042 if ((relation->rel_flags & REL_temp_conn) && (relation->getPages(tdbb)->rel_instance_id != 0) &&
1043 tree_exists)
1044 {
1045 IndexLock* idx_lock = CMP_get_index_lock(tdbb, relation, id);
1046 if (idx_lock)
1047 {
1048 if (!--idx_lock->idl_count) {
1049 LCK_release(tdbb, idx_lock->idl_lock);
1050 }
1051 }
1052 }
1053}
1054
1055
1056void IDX_delete_indices(thread_db* tdbb, jrd_rel* relation, RelationPages* relPages)

Callers

nothing calls this directly

Calls 8

SET_TDBBFunction · 0.85
signal_index_deletionFunction · 0.85
get_root_pageFunction · 0.85
CCH_FETCHFunction · 0.85
BTR_delete_indexFunction · 0.85
CMP_get_index_lockFunction · 0.85
LCK_releaseFunction · 0.85
getPagesMethod · 0.45

Tested by

no test coverage detected