[MDEV-19654] Table `sbtest1` is not system-versioned error with system versioned table while adding row start column Created: 2019-05-31  Updated: 2019-05-31  Resolved: 2019-05-31

Status: Closed
Project: MariaDB Server
Component/s: Versioned Tables
Affects Version/s: 10.4.6, 10.3, 10.4
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Shahriyar Rzayev (Inactive) Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: versioned-table

Issue Links:
Duplicate
is duplicated by MDEV-16130 wrong error message adding AS ROW STA... Closed

 Description   

Steps to reproduce:

MariaDB [sbtest]> show create table sbtest1\G
*************************** 1. row ***************************
       Table: sbtest1
Create Table: CREATE TABLE `sbtest1` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `k` int(11) NOT NULL DEFAULT 0,
  `c` char(120) NOT NULL DEFAULT '',
  `pad` char(60) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  KEY `k_1` (`k`)
) ENGINE=InnoDB AUTO_INCREMENT=220753785 DEFAULT CHARSET=latin1
1 row in set (0.001 sec)
 
MariaDB [sbtest]> alter table sbtest1 add system versioning;
Query OK, 114979 rows affected (29.251 sec)            
Records: 114979  Duplicates: 0  Warnings: 0

Trying to add column:

MariaDB [sbtest]> alter table sbtest1 add column row_start TIMESTAMP(6) AS ROW START INVISIBLE;
ERROR 4124 (HY000): Table `sbtest1` is not system-versioned

Not True as this table is already system-versioned.

Column description was grabbed from:
https://mariadb.com/kb/en/library/temporal-data-tables/#using-bitemporal-tables



 Comments   
Comment by Elena Stepanova [ 2019-05-31 ]

Importantly, system_versioning_alter_history should be set to KEEP. When it's not set, the ALTER is expectedly rejected, so at that point system versioning is recognized.

Comment by Elena Stepanova [ 2019-05-31 ]

Actually, it appears to be a duplicate of MDEV-16130 .

Generated at Thu Feb 08 08:53:20 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.