diff --git a/src/jrd/vio.cpp b/src/jrd/vio.cpp index 57bb71243e..e758f966bc 100644 --- a/src/jrd/vio.cpp +++ b/src/jrd/vio.cpp @@ -3794,13 +3794,12 @@ static THREAD_ENTRY_DECLARE garbage_collector(THREAD_ENTRY_PARAM arg) } ++relation->rel_sweep_count; - SLONG dp_sequence = -1; rpb.rpb_relation = relation; if (relation->rel_gc_bitmap) while (relation->rel_gc_bitmap->getFirst()) { - dp_sequence = relation->rel_gc_bitmap->current(); + ULONG dp_sequence = relation->rel_gc_bitmap->current(); if (!(dbb->dbb_flags & DBB_garbage_collector)) { --relation->rel_sweep_count; @@ -3827,7 +3826,7 @@ static THREAD_ENTRY_DECLARE garbage_collector(THREAD_ENTRY_PARAM arg) } found = flush = true; - rpb.rpb_number.setValue((dp_sequence * dbb->dbb_max_records) - 1); + rpb.rpb_number.setValue((SINT64(dp_sequence) * dbb->dbb_max_records) - 1); const RecordNumber last(rpb.rpb_number.getValue() + dbb->dbb_max_records); /* Attempt to garbage collect all records on the data page. */ @@ -3854,8 +3853,6 @@ static THREAD_ENTRY_DECLARE garbage_collector(THREAD_ENTRY_PARAM arg) } rel_exit: - dp_sequence = -1; - if (relation->rel_gc_bitmap) { if (!relation->rel_gc_bitmap->getFirst()) {