Bug #111975 still need make two checkpoints during an undo tablespace truncate operation
Submitted: 4 Aug 2023 13:00 Modified: 7 Aug 2023 12:07
Reporter: jie xu Email Updates:
Status: Unsupported Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:8.0.13 OS:Any
Assigned to: CPU Architecture:Any
Tags: undo truncate

[4 Aug 2023 13:00] jie xu
Description:
In the latest code of MySQL 8.0.13, Instead of doing two checkpoints during the process of undo tablespace truncation, just flush the dirty pages for that file from disk.

However, if only the pages of that space are flushed to disk without make a checkpoint; a crash occurs immediately after completing an undo truncate, it is highly likely that during crash recovery, there will be redo operations that need to be applied to undo pages that have already been truncated.

How to repeat:
This situation may occur when running the test case "innodb_undo.truncate_recover" multiple times.

This situation is more likely to occur if do not make checkpoints while running this test case.

Suggested fix:
still doing two checkpoints during the process of undo tablespace truncation.
[4 Aug 2023 13:08] jie xu
This situation is not likely to occur in MySQL 8.0.14 because it uses "fil_replace_tablespace" to complete the undo truncate. When a new space_id is used, during crash recovery, the old redo related to the previous undo tablespace will be skipped.
[4 Aug 2023 13:11] MySQL Verification Team
HI Mr xu,

Thank you for your bug report.

However, you are using a totally outdated release of 8.0. Please, try 8.0.34 and let us know if you can repeat the problem.

If you manage to repeat the problem, please provide the fully repeatable test case. It should be made in the form of the set of SQL commands that would always lead to the problem that you are reporting.

Unsupported.
[7 Aug 2023 12:07] jie xu
this bug only in 8.0.13, other release versions don't have this bug.
[7 Aug 2023 13:13] MySQL Verification Team
Hi,

All releases are patch-fix releases. Hence, old releases are not fixed. Instead we publish new releases.

Hence, please upgrade to 8.0.34.