Description:
In the function btr_page_reorganize_low(innobase):
```
data_size2 = page_get_data_size(page);
max_ins_size2 = page_get_max_insert_size_after_reorganize(page, 1);
if (data_size1 != data_size2 || max_ins_size1 != max_ins_size2) {
ib::error(ER_IB_MSG_30)
<< "Page old data size " << data_size1 << " new data size "
<< data_size2 << ", page old max ins size " << max_ins_size1
<< " new max ins size " << max_ins_size2;
ib::error(ER_IB_MSG_31) << BUG_REPORT_MSG;
ut_d(ut_error);
} else {
success = true;
}
/* Restore the cursor position. */
if (pos > 0) {
cursor->rec = page_rec_get_nth(page, pos);
} else {
ut_ad(cursor->rec == page_get_infimum_rec(page));
}
```
if the data size before and after the page reorganization does not match(page corruption or bugs), the Release version of MySQL will tolerate the error but will not generate the MLOG_PAGE_REORGANIZE log(The MLOG_PAGE_REORGANIZE log will not be generated when the variable success is false).
If a crash occurs before the rebuilt dirty page is flushed to disk, MySQL will fail to recover from the crash due to the missing MLOG_PAGE_REORGANIZE log before MLOG_REC_INSERT.
How to repeat:
Source code suggestion.
Suggested fix:
Generate the MLOG_PAGE_REORGANIZE log if MySQL tolerates the data size error.
Description: In the function btr_page_reorganize_low(innobase): ``` data_size2 = page_get_data_size(page); max_ins_size2 = page_get_max_insert_size_after_reorganize(page, 1); if (data_size1 != data_size2 || max_ins_size1 != max_ins_size2) { ib::error(ER_IB_MSG_30) << "Page old data size " << data_size1 << " new data size " << data_size2 << ", page old max ins size " << max_ins_size1 << " new max ins size " << max_ins_size2; ib::error(ER_IB_MSG_31) << BUG_REPORT_MSG; ut_d(ut_error); } else { success = true; } /* Restore the cursor position. */ if (pos > 0) { cursor->rec = page_rec_get_nth(page, pos); } else { ut_ad(cursor->rec == page_get_infimum_rec(page)); } ``` if the data size before and after the page reorganization does not match(page corruption or bugs), the Release version of MySQL will tolerate the error but will not generate the MLOG_PAGE_REORGANIZE log(The MLOG_PAGE_REORGANIZE log will not be generated when the variable success is false). If a crash occurs before the rebuilt dirty page is flushed to disk, MySQL will fail to recover from the crash due to the missing MLOG_PAGE_REORGANIZE log before MLOG_REC_INSERT. How to repeat: Source code suggestion. Suggested fix: Generate the MLOG_PAGE_REORGANIZE log if MySQL tolerates the data size error.