Details
-
Task
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
-
None
Description
MariaDB [test]> CREATE OR REPLACE TABLE t ( |
-> id INT UNSIGNED NOT NULL AUTO_INCREMENT, |
-> label VARCHAR(50) NOT NULL WITHOUT SYSTEM VERSIONING, |
->
|
-> valid_from TIMESTAMP(6) |
-> GENERATED ALWAYS AS ROW START, |
-> valid_to TIMESTAMP(6) |
-> GENERATED ALWAYS AS ROW END, |
-> PERIOD FOR SYSTEM_TIME (valid_from, valid_to), |
->
|
-> PRIMARY KEY (id) |
-> )
|
-> WITH SYSTEM VERSIONING, |
-> ENGINE InnoDB
|
-> ;
|
Query OK, 0 rows affected (0.009 sec) |
 |
MariaDB [test]> ALTER TABLE label label VARCHAR(100) NOT NULL WITHOUT SYSTEM VERSIONING; |
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'VARCHAR(100) NOT NULL WITHOUT SYSTEM VERSIONING' at line 1 |
Note that `label` is defined as `WITHOUT SYSTEM VERSIONING`. While this doesn't mean that the column is not versioned (an UPDATE which modifies both id and label is indeed versioned), excluding a column from system versioning would be more useful if it will allow ALTERing the column. The cost is intuitive (inaccurate history. But I can't imagine a situation where this is a problem, if the user defined the column as `WITHOUT SYSTEM VERSIONING`.