[MCOL-3933] Backslash in text column breaks INSERT INTO Columnstore SELECT * FROM InnoDB Created: 2020-04-09  Updated: 2023-10-25  Resolved: 2023-10-25

Status: Closed
Project: MariaDB ColumnStore
Component/s: DMLProc
Affects Version/s: 1.2.5
Fix Version/s: Icebox

Type: Bug Priority: Minor
Reporter: Sasha V Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Environment:

mariadb-community-columnstore-docker



 Description   

To reproduce:

 
$ docker pull mariadb/columnstore
$ docker run -d -p 3306:3306 --name mcs_container mariadb/columnstore
$ docker exec -it mcs_container bash
 
. /etc/profile.d/columnstoreAlias.sh
mcsmysql
 
CREATE DATABASE test;
USE test;
 
CREATE TABLE `backslash_innodb` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `uint1` int(10) unsigned NOT NULL,
  `uint2` int(10) unsigned NOT NULL,
  `text_with_backslash` text NOT NULL,
  `created` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated` timestamp NULL DEFAULT NULL,
  `text2` text DEFAULT NULL,
  `vchar` varchar(255) NOT NULL DEFAULT 'default',
  PRIMARY KEY (`id`)
);
 
CREATE TABLE `backslash_columnstore` (
  `id` int(10) unsigned NOT NULL,
  `uint1` int(10) unsigned NOT NULL,
  `uint2` int(10) unsigned NOT NULL,
  `text_with_backslash` text NOT NULL,
  `created` datetime NOT NULL,
  `updated` datetime NULL DEFAULT NULL,
  `text2` text DEFAULT NULL,
  `vchar` varchar(255) NOT NULL DEFAULT 'default'
) ENGINE=Columnstore;
 
insert into backslash_innodb (uint1,uint2,text_with_backslash) values (2,3,"
\\");
 
insert into backslash_columnstore select * from  backslash_innodb;
 
ERROR 1815 (HY000): Internal error: PM1 : Bulkload Read (thread 0) Failed for Table test.backslash_columnstore.  Terminating this job.

This creates two files in /usr/local/mariadb/columnstore/mysql/db

-rw-rw---- 1 mysql mysql       82 Apr  9 00:27 backslash_columnstore.tbl.Job_3070_15234.err_1
-rw-rw---- 1 mysql mysql       46 Apr  9 00:27 backslash_columnstore.tbl.Job_3070_15234.bad_1
 
cat backslash_columnstore.tbl.Job_3070_15234.err_1
Line number 1;  Error: Data violates NOT NULL constraint with no default; field 5
 
cat backslash_columnstore.tbl.Job_3070_15234.bad_1
123
\2020-04-09 00:27:36default

It appears that the field count is broken by the backslash character.


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