[MCOL-4098] Auto increment no longer support in "load data infile" Created: 2020-06-24  Updated: 2021-01-14

Status: Open
Project: MariaDB ColumnStore
Component/s: DMLProc
Affects Version/s: 1.4.4, 1.5.2
Fix Version/s: Icebox

Type: Bug Priority: Major
Reporter: Daniel Lee (Inactive) Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None


 Description   

Build tested: 1.5.2-1 (community edition, hasty b33685)

Per ColumnStore's original design, auto increment column is supported as the following:

create table t1 (cidx int, c1 integer comment 'autoincrement', c2 date, c3 char(25)) engine=Columnstore;

With insert, or LDI, if the column value for c1 is 'NULL', the value for that column would take the next increment value.

It seems that after ColumnStore became an engine to the MariaDB server, 'NULL' is being rejected in 'load data infile" processing.

data file:

1|NULL|2020-06-23|HELLO|
1|NULL|2020-06-23|HELLO|

MariaDB [mytest]> load data infile '/tmp/t.tbl' into table t1 fields terminated by "|";
ERROR 1366 (22007): Incorrect integer value: 'NULL' for column `mytest`.`t1`.`c1` at row 1

The error occurred when columnstore_use_import_for_batchinsert is set to 1 or 0.

insert and cpimport are working correctly.
For cpimport, '-n 1' switch is needed for this to work.



 Comments   
Comment by David Hall (Inactive) [ 2020-06-29 ]

Try adding auto_increment to the column in the MariaDB expected syntax. This may cause a warning, but might let the LDI pass.

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