[MDEV-33032] Live and dump upgrade from previous versions to the extended timestamp fails for system-versioned tables Created: 2023-12-14 Updated: 2023-12-19 Resolved: 2023-12-19 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Temporal Types, Versioned Tables |
| Affects Version/s: | N/A |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Critical |
| Reporter: | Elena Stepanova | Assignee: | Michael Widenius |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
If a system-versioned (timestamp-based) table is created on pre-11.4 server, its current records have the row_end within 2038-01. Also, if mysqldump --dump-history is run on the old version, it again contains 2038-01 for current records, so restoring this dump doesn't help either. If mysqldump is run without --dump-history, it works (for invisible columns at least), but then all versioning history will be lost. |
| Comments |
| Comment by Michael Widenius [ 2023-12-18 ] | ||||||||||||||||||||||
|
This is explained in the commit message: However for system versioned tables we currently store the 2038 year max | ||||||||||||||||||||||
| Comment by Elena Stepanova [ 2023-12-18 ] | ||||||||||||||||||||||
|
But it's not treated as max timestamp, that's the point. Sorry I should have added an example from the beginning, but here it goes now. On the old server (I was using the current 11.3):
So, the record is current and it is seen by normal select. Now, starting bb-11.3-timestamp on this datadir:
The record is still there, but it became historical and is only seen by select for system_time all:
My timezone is EET (taken from the system), in case it's important. | ||||||||||||||||||||||
| Comment by Michael Widenius [ 2023-12-18 ] | ||||||||||||||||||||||
|
It looks like the approach I envisioned will not work for upgrades. | ||||||||||||||||||||||
| Comment by Michael Widenius [ 2023-12-19 ] | ||||||||||||||||||||||
|
Fixed in bb-10.4-timestamp |