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

Function BTR_lookup

src/jrd/btr.cpp:1738–1762  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1736
1737
1738bool BTR_lookup(thread_db* tdbb, jrd_rel* relation, USHORT id, index_desc* buffer,
1739 RelationPages* relPages)
1740{
1741/**************************************
1742 *
1743 * B T R _ l o o k u p
1744 *
1745 **************************************
1746 *
1747 * Functional description
1748 * Return a description of the specified index.
1749 *
1750 **************************************/
1751 SET_TDBB(tdbb);
1752 WIN window(relPages->rel_pg_space_id, -1);
1753
1754 index_root_page* const root = fetch_root(tdbb, &window, relation, relPages);
1755
1756 if (!root)
1757 return false;
1758
1759 const bool result = (id < root->irt_count && BTR_description(tdbb, relation, root, buffer, id));
1760 CCH_RELEASE(tdbb, &window);
1761 return result;
1762}
1763
1764
1765bool BTR_make_bounds(thread_db* tdbb, const IndexRetrieval* retrieval,

Callers 3

VIO_eraseFunction · 0.85
refresh_changed_fieldsFunction · 0.85
lookupRecordMethod · 0.85

Calls 4

SET_TDBBFunction · 0.85
fetch_rootFunction · 0.85
BTR_descriptionFunction · 0.85
CCH_RELEASEFunction · 0.85

Tested by

no test coverage detected