[MDEV-23281] Bitemporal tables - application time not working correctly Created: 2020-07-24 Updated: 2020-08-07 Resolved: 2020-08-07 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Versioned Tables |
| Affects Version/s: | 10.4.10 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Niklas Verhoeven | Assignee: | Unassigned |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Windows 10 |
||
| Description |
|
Hello, i tried to use the bitemporal table feature but it is not completely working correct i think. First my create table statement on which i want to use the bitemporal feature:
Next i inserted one row where a price of 100 is valid from 2020-01-01 to 9999-12-31 (valid to an infinite period):
Now i want to update this dataset with the "FOR PROTION OF" statement to set the price to 150 valid from 2019-01-01 to 9999-12-31 (infinite):
I've expected the result after the update to be one record with a price of 150 valid from 2019-01-01 to 9999-12-31 because it overrides the existing dataset because it overlaps the initial time period. But this is the result i get:
Something similar happens when i want to update the initial dataset to a price of 150 valid from 2019-01-01 to 2020-06-01 with this statement:
The second row i expected to be created is created correctly. But the first row (id = 1) again is not updated correctly i think. I expected the valid from date to be 2019-01-01 but it is 2020-01-01. Here the full result after the update:
So is this a bug or am i missing something? And when i am missing something....how to update the dataset to change the valid from date to 2019-01-01 in the correct way? Or have i to do this by myself? Greetings |
| Comments |
| Comment by Elena Stepanova [ 2020-08-05 ] |
|
The feature was implemented according to the SQL standard (not all of it has been implemented, but the part which has been should comply with the standard). |
| Comment by Niklas Verhoeven [ 2020-08-07 ] |
|
Thank you for your reply. I've took a look in ISO/IEC TR 19075-2:2015 and as you said my example works as described there. I think i misunderstood how it should work an expected an other result. Issue can be closed. |