Thanks for the bug report and the patch. I am testing your patch and will apply it, with modifications:
- log_online_purge_changed_page_bitmaps() called with LSN 0 or LSN_MAX is used by RESET BITMAPS that should delete everything. Since the fix means that the last bitmap file in the range will never be deleted if it's the last bitmap file in the directory (as it may contain LSN data up to infinity), it had to be special-cased or RESET BITMAPS would leave that last file.
- There is an off-by-one error in start_lsn >= lsn comparison. I.e. if you have ib_modified_log_1_0.xdb, ib_modified_log_2_100.xdb and issue PURGE BEFORE 100, it would leave the 1st file although it may be safely deleted.
- Added an MTR testcase.
Andrew -
Thanks for the bug report and the patch. I am testing your patch and will apply it, with modifications:
- log_online_ purge_changed_ page_bitmaps( ) called with LSN 0 or LSN_MAX is used by RESET BITMAPS that should delete everything. Since the fix means that the last bitmap file in the range will never be deleted if it's the last bitmap file in the directory (as it may contain LSN data up to infinity), it had to be special-cased or RESET BITMAPS would leave that last file. log_1_0. xdb, ib_modified_ log_2_100. xdb and issue PURGE BEFORE 100, it would leave the 1st file although it may be safely deleted.
- There is an off-by-one error in start_lsn >= lsn comparison. I.e. if you have ib_modified_
- Added an MTR testcase.