[MDEV-29738] REPLACE under system_versioning_insert_history allows to change existing historical records Created: 2022-10-07 Updated: 2022-12-27 Resolved: 2022-12-27 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Versioned Tables |
| Affects Version/s: | N/A |
| Fix Version/s: | 10.11.1 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Elena Stepanova | Assignee: | Sergei Golubchik |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||||||
| Description |
|
Contrary to specification that system_versioning_insert_history doesn't do anything that timestamp manipulation couldn't do, it allows to change existing historical records, not just insert new arbitrary ones like timestamp manipulation does. The possibility to change row_start is already known and indicated in the MTR test, although the comment there doesn't explain how it correlates with the specification. Anything similar to this does the trick:
A similar approach works for ROW END in tables where the versioning fields are defined explicitly:
|
| Comments |
| Comment by Elena Stepanova [ 2022-10-17 ] | ||||||||||||
|
Still can happen with the fix for
That is, it happens when row start of the existing record is in the future, so row end cannot be set to "now". | ||||||||||||
| Comment by Sergei Golubchik [ 2022-10-18 ] | ||||||||||||
|
REPLACE now ignores the value of system_versioning_insert_history, just like DELETE does. |