| 1736 | |
| 1737 | |
| 1738 | bool 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 | |
| 1765 | bool BTR_make_bounds(thread_db* tdbb, const IndexRetrieval* retrieval, |
no test coverage detected