diff --git a/src/jrd/vio.cpp b/src/jrd/vio.cpp index fd8d1ef494..0b6fd269ea 100644 --- a/src/jrd/vio.cpp +++ b/src/jrd/vio.cpp @@ -2090,6 +2090,8 @@ bool VIO_get_current(thread_db* tdbb, rec_tx_active = false; + bool counted = false; + while (true) { // If the record doesn't exist, no problem. @@ -2113,6 +2115,12 @@ bool VIO_get_current(thread_db* tdbb, else VIO_data(tdbb, rpb, pool); + if (!counted) + { + tdbb->bumpRelStats(RuntimeStatistics::RECORD_IDX_READS, rpb->rpb_relation->rel_id); + counted = true; + } + // If we deleted the record, everything's fine, otherwise // the record must be considered real.