Details
-
Task
-
Status: Open (View Workflow)
-
Minor
-
Resolution: Unresolved
-
None
-
None
Description
The WITH SYSTEM VERSIONING column option is intended to enable system versioning on a column level.
With this column option, it is even possible use CREATE TABLE to create a system-versioned table that only provides system versioning for a single column:
MariaDB [test]> CREATE TABLE accounts_col ( |
-> id SERIAL PRIMARY KEY, |
-> name VARCHAR(255), |
-> amount INT WITH SYSTEM VERSIONING |
-> );
|
Query OK, 0 rows affected (0.021 sec) |
However, if you try to add the column option to a column in a non-system-versioned table, it raises an error message:
MariaDB [test]> ALTER TABLE accounts_col |
-> MODIFY name VARCHAR(255) WITH SYSTEM VERSIONING; |
ERROR 4124 (HY000): Table `accounts_col` is not system-versioned |
If this works for CREATE TABLE, shouldn't it also work for ALTER TABLE?
To reproduce:
CREATE TABLE accounts_col ( |
id SERIAL PRIMARY KEY, |
name VARCHAR(255), |
amount INT |
);
|
 |
ALTER TABLE accounts_col |
MODIFY name VARCHAR(255) WITH SYSTEM VERSIONING; |
Attachments
Issue Links
- is caused by
-
MDEV-12894 System-versioned tables
- Closed
- relates to
-
MDEV-26934 ADD SYSTEM VERSIONING and modify column WITHOUT SYSTEM VERSIONING in single ALTER TABLE command
- Open