[MDEV-25467] DELETE HISTORY behavior for active rows is not documented Created: 2021-04-20 Updated: 2021-04-22 Resolved: 2021-04-22 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Documentation, Versioned Tables |
| Affects Version/s: | 10.3, 10.4, 10.5, 10.6 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Minor |
| Reporter: | Elena Stepanova | Assignee: | Ian Gilfillan |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
So far I couldn't find an answer in the KB to what DELETE HISTORY is meant to do if BEFORE SYSTEM_TIME specifies a value greater than ROW END of the active records.
It is not a trivial question, because unless it is defined by the standard (which I also can't find), there are different possible outcomes, each of which is logically justifiable:
Currently the server uses the last option, which seems the least obvious, although still explainable:
If it's intended, please document it. If it's not intended, please fix and then document the intended behavior. |
| Comments |
| Comment by Aleksey Midenkov [ 2021-04-21 ] |
|
1-st variant is the only one justfiable: DELETE HISTORY doesn't touch active rows at all, regardless the ROW END (because it only affects historical records, and active ones are not that). For deleting current rows there is DELETE command. To delete current rows AND history one must issue 2 commands: DELETE and DELETE HISTORY. serg Please approve. |
| Comment by Sergei Golubchik [ 2021-04-22 ] |
|
yes, I agree. DELETE HISTORY deletes history only. |