[MDEV-27059] page_zip_dir_insert() may corrupt ROW_FORMAT=COMPRESSED tables Created: 2021-11-16 Updated: 2021-11-26 Resolved: 2021-11-16 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - InnoDB |
| Affects Version/s: | 10.5, 10.6, 10.7 |
| Fix Version/s: | 10.5.14, 10.6.6, 10.7.2 |
| Type: | Bug | Priority: | Major |
| Reporter: | Marko Mäkelä | Assignee: | Marko Mäkelä |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | corruption, race, regression-10.5, rr-profile-analyzed | ||
| Issue Links: |
|
||||||||||||
| Description |
|
A data corruption bug that affects ROW_FORMAT=COMPRESSED tables was found by RQG testing:
The cause turned out to be corruption that had been introduced in page_zip_dir_insert() before the server had been killed and restarted. After the following fix had been applied, this assertion was not seen again:
It turns out that btr_cur_pessimistic_update() may invoke this function on a delete-marked record. The scenario involved ROLLBACK. I did not examine it deeper, but I suspect that a purgeable delete-marked record had been "resurrected" by an insert that was executed as delete-unmarking the record. Either the test deleted and later inserted the same record, or it updated a PRIMARY KEY value back and forth. We failed to create a test case for this. |
| Comments |
| Comment by Marko Mäkelä [ 2021-11-16 ] | |||||||||||||||||||||||||||
|
After some deeper analysis, I came to the conclusion that this bug should only affect 10.5 and later releases. Before
|