| 82 | } |
| 83 | |
| 84 | bool BitmapTableScan::internalGetRecord(thread_db* tdbb) const |
| 85 | { |
| 86 | JRD_reschedule(tdbb); |
| 87 | |
| 88 | Request* const request = tdbb->getRequest(); |
| 89 | record_param* const rpb = &request->req_rpb[m_stream]; |
| 90 | Impure* const impure = request->getImpure<Impure>(m_impure); |
| 91 | |
| 92 | if (!(impure->irsb_flags & irsb_open)) |
| 93 | { |
| 94 | rpb->rpb_number.setValid(false); |
| 95 | return false; |
| 96 | } |
| 97 | |
| 98 | RecordBitmap** pbitmap = impure->irsb_bitmap; |
| 99 | RecordBitmap* bitmap; |
| 100 | |
| 101 | if (!pbitmap || !(bitmap = *pbitmap)) |
| 102 | { |
| 103 | rpb->rpb_number.setValid(false); |
| 104 | return false; |
| 105 | } |
| 106 | |
| 107 | if (rpb->rpb_number.isBof() ? bitmap->getFirst() : bitmap->getNext()) |
| 108 | { |
| 109 | do |
| 110 | { |
| 111 | rpb->rpb_number.setValue(bitmap->current()); |
| 112 | |
| 113 | if (VIO_get(tdbb, rpb, request->req_transaction, request->req_pool)) |
| 114 | { |
| 115 | rpb->rpb_number.setValid(true); |
| 116 | return true; |
| 117 | } |
| 118 | } while (bitmap->getNext()); |
| 119 | } |
| 120 | |
| 121 | rpb->rpb_number.setValid(false); |
| 122 | return false; |
| 123 | } |
| 124 | |
| 125 | void BitmapTableScan::getChildren(Array<const RecordSource*>& children) const |
| 126 | { |
nothing calls this directly
no test coverage detected