Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.3, 10.4
-
None
Description
Background
The initial work has been done in MDEV-15408 by bringing the comprehensive error reports:
create or replace table t1 ( |
a int, |
row_start bigint as row start, |
row_end bigint as row end, |
period for system_time (row_start, row_end) |
) engine=innodb with system versioning; |
ERROR HY000: `row_start` must be of type BIGINT(20) UNSIGNED for system-versioned table `t1` |
Here, it is guessed that the data type is meant BIGINT(20) , not TIMESTAMP(6). It is only possible for engines that support trx_id (i.e. native) versioning.
create or replace table t1 ( |
a int, |
row_start bigint as row start, |
row_end bigint as row end, |
period for system_time (row_start, row_end) |
) engine=myisam with system versioning; |
ERROR HY000: `row_start` must be of type TIMESTAMP(6) for system-versioned table `t1` |
The bug
It is not handled for partitions correctly
create or replace table t1 ( |
a int, |
row_start bigint as row start, |
row_end bigint as row end, |
period for system_time (row_start, row_end) |
) engine=myisam with system versioning |
partition by hash(a); |
ERROR HY000: `row_start` must be of type BIGINT(20) UNSIGNED for system-versioned table `t1` |
This is because native flag is determined from the handlerton. Instead, the partitioning structure should be taken in mind. The correct determination of nativeness was done in MDEV-15951, but it probably needs some revisiting, e.g. move the check in Create_info/Alter_info layer