Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.3(EOL)
-
None
Description
MariaDB [test]> select *, row_start, row_end from t3 for system_time all; |
+------+----------------------------+----------------------------+ |
| a | row_start | row_end |
|
+------+----------------------------+----------------------------+ |
| 1 | 2018-04-22 02:21:24.283521 | 2018-04-22 02:21:27.809661 |
|
| 2 | 2018-04-22 02:21:24.283521 | 2038-01-19 05:14:07.999999 |
|
+------+----------------------------+----------------------------+ |
2 rows in set (0.00 sec) |
|
MariaDB [test]> truncate table t3; |
Query OK, 0 rows affected (0.20 sec) |
|
MariaDB [test]> select *, row_start, row_end from t3 for system_time all; |
Empty set (0.00 sec) |
TRUNCATE TABLE on a versioned table removes all table contents, including historical records. I can only assume it's expected behavior, I can't find it documented anywhere in the KB, and there is no MTR test for TRUNCATE – I found only one test which uses the command, partition.test, but it does not check the result of truncation, it only executes the statement as a regression test for a crash.
If it works as designed, please add a test and have it documented. If not, then please fix.
Attachments
Issue Links
- causes
-
MDEV-28439 Inconsistencies of TRUNCATE on SYSTEM VERSIONED tables
-
- Open
-
Activity
Field | Original Value | New Value |
---|---|---|
Assignee | Elena Stepanova [ elenst ] | Alexander Krizhanovsky [ krizhanovsky ] |
Assignee | Alexander Krizhanovsky [ krizhanovsky ] | Eugene Kosov [ kevg ] |
Assignee | Eugene Kosov [ kevg ] | Ian Gilfillan [ greenman ] |
Component/s | Documentation [ 10903 ] |
Fix Version/s | N/A [ 14700 ] | |
Fix Version/s | 10.3 [ 22126 ] |
Assignee | Ian Gilfillan [ greenman ] |
Assignee | Eugene Kosov [ kevg ] |
Fix Version/s | 10.3 [ 22126 ] | |
Fix Version/s | N/A [ 14700 ] |
Status | Open [ 1 ] | Confirmed [ 10101 ] |
Assignee | Eugene Kosov [ kevg ] | Nikita Malyavin [ nikitamalyavin ] |
Status | Confirmed [ 10101 ] | In Progress [ 3 ] |
Assignee | Nikita Malyavin [ nikitamalyavin ] | Sergei Golubchik [ serg ] |
Status | In Progress [ 3 ] | In Review [ 10002 ] |
Fix Version/s | 10.4 [ 22408 ] |
Status | In Review [ 10002 ] | Stalled [ 10000 ] |
Fix Version/s | 10.4.5 [ 23311 ] | |
Fix Version/s | 10.3 [ 22126 ] | |
Fix Version/s | 10.4 [ 22408 ] | |
Resolution | Fixed [ 1 ] | |
Status | Stalled [ 10000 ] | Closed [ 6 ] |
Workflow | MariaDB v3 [ 86705 ] | MariaDB v4 [ 154215 ] |
Link | This issue causes MDEV-28439 [ MDEV-28439 ] |
TRUNCATE is DDL, it's defined as DROP+CREATE, and it requires DROP privilege.
Naturally, DROP+CREATE does not preserve history.