[MDEV-29838] SELECT without FOR SYSTEM_TIME is not the same as AS OF CURRENT_TIMESTAMP Created: 2022-10-20 Updated: 2022-10-24 Resolved: 2022-10-24 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Documentation, Versioned Tables |
| Affects Version/s: | N/A |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Elena Stepanova | Assignee: | Ian Gilfillan |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
System versioning documentation in the KB says:
It is not true. Select without FOR SYSTEM_TIME (and when system_versioning_asof=DEFAULT) shows records which have max timestamp in the row end field. It is not always the same as as of current_timestamp. In a normal situation, both only exclude records which have row end in the past.
So, here for system_time all naturally returns the record:
for system_time as of current_timestamp does too
but plain select does not:
According to serg, it should work as it does now, in which case documentation needs to be updated. I don't have any good suggestions for how it should be described. Explaining that row end should be from_unixtime(2147483647.999999) for the record to be shown by SELECT seems somewhat awkward for documentation. I'll leave it to professionals to invent something. |