| 734 | } |
| 735 | |
| 736 | bool IndexTableScan::setupBitmaps(thread_db* tdbb, Impure* impure) const |
| 737 | { |
| 738 | // Start a bitmap which tells us we have already visited |
| 739 | // this record; this is to handle the case where there is more |
| 740 | // than one leaf node reference to the same record number; the |
| 741 | // bitmap allows us to filter out the multiple references. |
| 742 | RecordBitmap::reset(impure->irsb_nav_records_visited); |
| 743 | impure->irsb_flags |= irsb_mustread; |
| 744 | |
| 745 | // the first time we open the stream, compute a bitmap |
| 746 | // for the inversion tree -- this may cause problems for |
| 747 | // read-committed transactions since they will get one |
| 748 | // view of the database when the stream is opened |
| 749 | if (m_inversion) |
| 750 | { |
| 751 | if (!m_condition || !m_condition->execute(tdbb, tdbb->getRequest())) |
| 752 | { |
| 753 | impure->irsb_flags &= ~irsb_mustread; |
| 754 | // There is no need to reset or release the bitmap, it is |
| 755 | // done in EVL_bitmap() |
| 756 | impure->irsb_nav_bitmap = EVL_bitmap(tdbb, m_inversion, NULL); |
| 757 | return (*impure->irsb_nav_bitmap != NULL); |
| 758 | } |
| 759 | } |
| 760 | |
| 761 | return true; |
| 762 | } |
nothing calls this directly
no test coverage detected