[MCOL-877] Not all data escaped when inserting with select statement from innodb table into columnstore Created: 2017-08-16  Updated: 2017-11-27  Resolved: 2017-10-25

Status: Closed
Project: MariaDB ColumnStore
Component/s: cpimport, DMLProc
Affects Version/s: 1.0.9, 1.0.10
Fix Version/s: 1.0.12, 1.1.1

Type: Bug Priority: Major
Reporter: Matthew Minix Assignee: Daniel Lee (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Environment:

Centos 7


Issue Links:
Duplicate
duplicates MCOL-578 LOAD DATA INFILE doesn't support esca... Closed
is duplicated by MCOL-960 LOAD DATA escaping characters causing... Closed
is duplicated by MCOL-1018 Backslash (Escape character) as last ... Closed
Sprint: 2017-18, 2017-19, 2017-20, 2017-21

 Description   

It seems that however cpimport imports data from a select insert is having trouble when the table has at least 2 fields with more than one backslash (and ending with a backslash). The error can be reproduced with the SQL below:

CREATE TABLE IF NOT EXISTS data.example_columnstore_table (  
      `Blah` VARCHAR(255) NOT NULL      
) ENGINE=columnstore;
 
CREATE TABLE IF NOT EXISTS data.example_innodb_table (  
      `Blah` VARCHAR(255) NOT NULL      
) ENGINE=INNODB;
 
INSERT INTO data.example_innodb_table (`Blah`) VALUES ("test \ ing \\");
INSERT INTO data.example_innodb_table (`Blah`) VALUES ("foo");
INSERT INTO data.example_innodb_table (`Blah`) VALUES ("test \ ing \\");
INSERT INTO data.example_columnstore_table (`Blah`) SELECT `Blah` FROM data.example_innodb_table;

It looks like the last value isn't properly escaped and so expects more data to be inserted, but that may be a misunderstanding of what it's doing on my part. Either way, it fails and locks the table.



 Comments   
Comment by Matthew Minix [ 2017-08-16 ]

I think this is similar to MCOL-501, but not exactly because it's coming from an insert from a select, rather than a csv import

Comment by Andrew Hutchings (Inactive) [ 2017-08-16 ]

Hi Matthew,

Thanks for the report. It is similar but not the same. It is more likely to be breaking in the row processor in our plugin before the data is sent to cpimport.

Comment by Andrew Hutchings (Inactive) [ 2017-09-15 ]

Pull request for 1.0 and 1.1. Don't merge 1.1 until after 1.1.0.

For QA: see description (need to create database data first)

Comment by Daniel Lee (Inactive) [ 2017-10-25 ]

Build verified: Github source for 1.1.1-1

/root/columnstore/mariadb-columnstore-server
commit f6cd94ea167789970db7b5b501569a6549495d10
Merge: 3d846d3 91b2553
Author: David.Hall <david.hall@mariadb.com>
Date: Tue Oct 24 09:15:58 2017 -0500

Merge pull request #72 from mariadb-corporation/MCOL-982

MCOL-982 Merge MariaDB 10.2.9

/root/columnstore/mariadb-columnstore-server/mariadb-columnstore-engine
commit 751f9fbd2f26026983915a0677d6d600be273073
Author: david hill <david.hill@mariadb.com>
Date: Tue Oct 24 14:05:48 2017 -0500

removed duplicaue entries

Build verified: Github source for 1.0.12-1

/root/columnstore/mariadb-columnstore-server
commit a42eb6d1e74e44c9e8fd9bb8290e6ce7dbf909f5
Merge: 2965fc8 6a14ced
Author: David.Hall <david.hall@mariadb.com>
Date: Tue Oct 3 10:12:33 2017 -0500

Merge pull request #69 from mariadb-corporation/MCOL-940

MCOL-940

/root/columnstore/mariadb-columnstore-server/mariadb-columnstore-engine
commit 22f5c04f854d8571fa81ac33a26edc256d3acd48
Merge: 2f19dc2 c132f1b
Author: David.Hall <david.hall@mariadb.com>
Date: Tue Oct 24 17:39:45 2017 -0500

Merge pull request #300 from mariadb-corporation/MCOL-973-1.0

MCOL-973 remove reference to TEXT in the 1.0 code

Repeated test case in ticket description

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