[MCOL-530] autoincrement not updating in catalog tables Created: 2017-01-23  Updated: 2019-11-21  Resolved: 2019-11-21

Status: Closed
Project: MariaDB ColumnStore
Component/s: MDB Plugin
Affects Version/s: None
Fix Version/s: Icebox

Type: Bug Priority: Minor
Reporter: David Thompson (Inactive) Assignee: Andrew Hutchings (Inactive)
Resolution: Won't Fix Votes: 0
Labels: None

Issue Links:
Relates
relates to MCOL-477 can't reset autoincrement values Closed
relates to MCOL-780 auto increment needs to use MariaDB's... Closed
Epic Link: ColumnStore Compatibility Improvements

 Description   

the autoincrement column in calpontsys.systables and information_schema.columnstore_tables does not appear to be updated after an insert (stays at 1) despite having 2 usages in script below:

CREATE TABLE `t1` (
i int(11) NOT NULL,
c char(3) DEFAULT NULL
) ENGINE=Columnstore DEFAULT CHARSET=latin1 COMMENT='autoincrement=i' ;
 
 
#  initial insert test
insert into t1 (c) values ('t11');
insert into t1 values (0, 't12');
insert into t1 values (50, 't13');
select * from t1;
+----+------+
| i  | c    |
+----+------+
|  1 | t11  |
|  2 | t12  |
| 50 | t13  |
+----+------+
 
select * from information_schema.columnstore_tables;
+--------------+------------+-----------+---------------+--------------+---------------+
| TABLE_SCHEMA | TABLE_NAME | OBJECT_ID | CREATION_DATE | COLUMN_COUNT | AUTOINCREMENT |
+--------------+------------+-----------+---------------+--------------+---------------+
| test         | t1         |      3003 | 2017-01-22    |            2 |             1 |
+--------------+------------+-----------+---------------+--------------+---------------+
 
select * from calpontsys.systable;
+-----------+--------+----------+------------+------------+------+------+-----------+-----------+-------------+---------------+
| tablename | schema | objectid | createdate | lastupdate | init | next | numofrows | avgrowlen | numofblocks | autoincrement |
+-----------+--------+----------+------------+------------+------+------+-----------+-----------+-------------+---------------+
| t1        | test   |     3003 | 2017-01-22 | NULL       | NULL | NULL |      NULL |      NULL |        NULL |             1 |
+-----------+--------+----------+------------+------------+------+------+-----------+-----------+-------------+---------------+



 Comments   
Comment by David Thompson (Inactive) [ 2017-01-23 ]

Should also test this works correctly after resetting the autoinc value (see related bug).

Comment by Andrew Hutchings (Inactive) [ 2019-11-21 ]

The fix for this should be wrapped up in MCOL-780

Generated at Thu Feb 08 02:21:46 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.