| 806 | |
| 807 | |
| 808 | void 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 | |
| 845 | void BTR_complement_key(temporary_key* key) |
no test coverage detected