[MDEV-29721] Inconsistency upon inserting history with visible system versioning columns Created: 2022-10-06 Updated: 2022-10-26 Resolved: 2022-10-26 |
|
| 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 |
|
Filing as 10.11v1- critical as previously discussed, to make it show up on the list for consideration. Please feel free to downgrade or close as "won't fix". For a table with visible versioning columns, setting system_versioning_insert_history variable changes the behavior of inserting default values (restricts it).
Both INSERTs with system_versioning_insert_history=off work, with a values inserted according to the auto-increment or explicit values, s to the current time, and e to the max timestamp.
There seems to be no good reason for this. |
| Comments |
| Comment by Elena Stepanova [ 2022-10-16 ] | ||||||||||||||||||||||||
|
With the fix 623159a6, the following (still?) does not work:
With system_versioning_insert_history=off it works:
Again, there seems to be no logical reason why it shouldn't work with the variable set to ON. I think we should generally avoid (whenever possible) changes which make previously working statements fail, unless it's the purpose of the change. It makes various OM=>NS, rolling galera upgrade and such scenarios even more problematic than they already are. | ||||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2022-10-17 ] | ||||||||||||||||||||||||
|
made default and ignore work as expected, that is as if the column wasn't specified in the list at all | ||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2022-10-17 ] | ||||||||||||||||||||||||
|
Yet another thing (sorry they are not coming up all at once):
So, with system_versioning_insert_history=on NULL can be inserted into ROW START, but not into ROW END. With off, both work. | ||||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2022-10-18 ] | ||||||||||||||||||||||||
|
it's a standard behavior of all TIMESTAMP fields, on NULL they store the CURRENT_TIMESTAMP. Incidentally, this is what ROW START column would've got anyway. But you cannot have ROW END timestamp equal to the ROW START timestamp. |