MDEV-38140 : InnoDB index corruption after UPDATE that affects virtual columns #4470
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
MDEV-38140: InnoDB index corruption after UPDATE affecting virtual
columns
Issue:
delete-marked.
Root Cause:
greater than the number of fields in the clustered index record, the
virtual column is incorrectly skipped while reading from the undo
record.
the secondary index record.
column when writing ordering columns at the end of the undo record.
Fix:
trx_undo_update_rec_get_update(): Skip a virtual column onlywhen v_pos == FIL_NULL, not when v_pos is greater than the number
of fields.
trx_undo_page_report_modify(): Ensure ordering columns arewritten based on the correct stored-column positions, without
confusing them with virtual-column positions.
Release Notes
Fixed a potential corruption issue for virtual index.
How can this PR be tested?
Modified
mysql-test/suite/innodb/t/innodb-virtual-columns.testandmysql-test/suite/innodb/r/innodb-virtual-columns.resultto cover the changes.Basing the PR against the correct MariaDB version
mainbranch.PR quality check