[MDEV-26778] row_start is not updated in current row for InnoDB Created: 2021-10-06 Updated: 2022-10-26 Resolved: 2022-01-13 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Versioned Tables |
| Affects Version/s: | 10.6.4, 10.3, 10.4, 10.5, 10.6 |
| Fix Version/s: | 10.3.33, 10.4.23, 10.5.14, 10.6.6, 10.7.2, 10.8.1 |
| Type: | Bug | Priority: | Major |
| Reporter: | Sridhar Sadasivam | Assignee: | Aleksey Midenkov |
| Resolution: | Fixed | Votes: | 2 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||||||
| Description |
|
After upgrading to MariaDB 10.6.4, we noticed an issue with system versioned tables where it inserts a new row for update commands that don't change anything. Previous versions such as 10.5.5 would ignore such dummy updates and not change the SVT history. Small test case to illustrate:
With MariaDB 10.5.5, the above prints: With MariaDB 10.6.4:
The above will print 2 records (with same start_time but different end_time) for MariaDB 10.6.4 and only 1 record for MariaDB 10.5.5 Looks like the 10.6 version stores dummy updates which don't make any real change to the data. While that's okay, shouldn't the start time stamp also be updated for the new row? The current behavior is problematic because queries such as "SELECT * FROM t FOR SYSTEM_TIME AS OF ..." will print 2 records for certain timestamps which doesn't make sense. |
| Comments |
| Comment by Alice Sherepa [ 2021-10-07 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Thank you for the report!
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Alice Sherepa [ 2021-10-07 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
test case from
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Aleksey Midenkov [ 2021-12-27 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Please review bb-10.3-midenok | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Nikita Malyavin [ 2022-01-13 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
The commit 5a70165ab8a97 is approved. sridhu88 row_start was remaining outdated in one corner case, this will be fixed with the commit above. However, missing history row problem wasn't found during validation by alice. Currently, we suppose a correct behavior to always insert a history row, even if the data wasn't modified (i don't remember whether the standard controls it). So one can report it separately, if they will experience it. |