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

Function BTR_all

src/jrd/btr.cpp:808–842  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

806
807
808void BTR_all(thread_db* tdbb, jrd_rel* relation, IndexDescList& idxList, RelationPages* relPages)
809{
810/**************************************
811 *
812 * B T R _ a l l
813 *
814 **************************************
815 *
816 * Functional description
817 * Return descriptions of all indices for relation. If there isn't
818 * a known index root, assume we were called during optimization
819 * and return no indices.
820 *
821 **************************************/
822 SET_TDBB(tdbb);
823 const Database* dbb = tdbb->getDatabase();
824 CHECK_DBB(dbb);
825
826 WIN window(relPages->rel_pg_space_id, -1);
827
828 index_root_page* const root = fetch_root(tdbb, &window, relation, relPages);
829 if (!root)
830 return;
831
832 Cleanup release_root([&] {
833 CCH_RELEASE(tdbb, &window);
834 });
835
836 for (USHORT i = 0; i < root->irt_count; i++)
837 {
838 index_desc idx;
839 if (BTR_description(tdbb, relation, root, &idx, i))
840 idxList.add(idx);
841 }
842}
843
844
845void BTR_complement_key(temporary_key* key)

Callers 2

getPagesInternalMethod · 0.85
compileRelationMethod · 0.85

Calls 7

SET_TDBBFunction · 0.85
CHECK_DBBFunction · 0.85
fetch_rootFunction · 0.85
CCH_RELEASEFunction · 0.85
BTR_descriptionFunction · 0.85
getDatabaseMethod · 0.80
addMethod · 0.45

Tested by

no test coverage detected