Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Fixed
-
N/A
-
None
Description
If I attempt to change s system versioning column on a non-empty table, I get this:
create or replace table t1 (i int, vers_start TIMESTAMP(6) GENERATED ALWAYS AS ROW START, vers_end TIMESTAMP(6) GENERATED ALWAYS AS ROW END, PERIOD FOR SYSTEM_TIME(vers_start,vers_end)) engine=MyISAM with system versioning; |
insert into t1 values (1); |
set versioning_alter_history=KEEP; |
alter table t1 CHANGE COLUMN `vers_start` `sys_trx_start` TIMESTAMP(6) GENERATED ALWAYS AS ROW START; |
ERROR 4140 (HY000): Can not modify column `vers_start` to GENERATED ALWAYS AS ROW START/END for non-empty table |
But if I do the same on an empty table, I still get an error:
create or replace table t1 (i int, vers_start TIMESTAMP(6) GENERATED ALWAYS AS ROW START, vers_end TIMESTAMP(6) GENERATED ALWAYS AS ROW END, PERIOD FOR SYSTEM_TIME(vers_start,vers_end)) engine=MyISAM with system versioning; |
set versioning_alter_history=KEEP; |
alter table t1 CHANGE COLUMN `vers_start` `sys_trx_start` TIMESTAMP(6) GENERATED ALWAYS AS ROW START; |
ERROR 4137 (HY000): Can not change system versioning field `vers_start` |
So, the first error appears to be meaningless.