[MCOL-960] LOAD DATA escaping characters causing field count violation Created: 2017-10-06  Updated: 2017-12-05  Resolved: 2017-11-27

Status: Closed
Project: MariaDB ColumnStore
Component/s: cpimport
Affects Version/s: 1.0.8
Fix Version/s: Icebox

Type: Bug Priority: Minor
Reporter: nathan aschoff Assignee: Andrew Hutchings (Inactive)
Resolution: Duplicate Votes: 0
Labels: None
Environment:

Debian GNU/Linux 8.7 (jessie)


Attachments: Text File load_data_test_results.txt    
Issue Links:
Duplicate
duplicates MCOL-877 Not all data escaped when inserting w... Closed
Epic Link: ColumnStore Compatibility Improvements

 Description   

A character delimited file (eg. tab or comma) containing a literal \ character and a \ escape character (ie. E\\) causes inconsistent behavior between
--Server version: 10.1.18-MariaDB-1~jessie mariadb.org binary distribution
--Server version: 10.1.22-MariaDB Columnstore 1.0.8-1
when using LOAD DATA.
 
The value in question: E\\ (the actual value is E\), causes the MCS loader to throw an exception, complaining about a field count violation.
 
In 10.1.18-MariaDB the load command without specifying a FIELDS clause works fine (defaults) the string E\ gets inserted.
In 10.1.22-MariaDB Columnstore 1.0.8-1 the load command without specifying a FIELDS clause causes a field count violation. However, adding the following -empty- FIELDS clause: ESCAPED BY '', works fine and inserts the E\ string.
 
PS. Also inserting the string NULL is inconsistent. Non MCS requires, as we all know, the [OPTIONALLY] ENCLOSED BY to not be empty to interpret the NULL string as a NULL value. For MCS this is not necessary.



 Comments   
Comment by Andrew Hutchings (Inactive) [ 2017-10-06 ]

Hi Nathan,

Can you please try with 1.0.11 or 1.1.0? We have fixed a lot of this handling since 1.0.8.

Comment by nathan aschoff [ 2017-10-07 ]

Will do mate.

Comment by Andrew Hutchings (Inactive) [ 2017-10-12 ]

My apologies, the patch which I think fixes it is in 1.0.12 (currently unreleased) and 1.1.0 beta.

Comment by nathan aschoff [ 2017-10-13 ]

No worries. I'll wait for the applicable release. Until than, I'll apply the workaround: ESCAPED BY ''.

Comment by Andrew Hutchings (Inactive) [ 2017-11-27 ]

Closed as duplicate of MCOL-877 which covers LDI and INSERT...SELECT for escapes.

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