[MCOL-1018] Backslash (Escape character) as last character in a field breaks inserts into columnstore tables of the form INSERT INTO A SELECT * FROM B Created: 2017-11-07  Updated: 2017-11-07  Resolved: 2017-11-07

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

Type: Bug Priority: Major
Reporter: Toby Sear Assignee: Andrew Hutchings (Inactive)
Resolution: Duplicate Votes: 0
Labels: None
Environment:

Debian GNU/Linux 9, 4.9.0-3-amd64, MariaDB: 10.1.26-MariaDB - Columnstore 1.0.11-1
AWS EC2 m4.4xlarge - 3 PM / 3 UM


Attachments: File test.sql    
Issue Links:
Duplicate
duplicates MCOL-877 Not all data escaped when inserting w... Closed

 Description   

We noticed that some of the data in our Columnstore tables had incorrect values stored.
We use a MyISAM table as a backup for our columnstore tables, on comparison of our MyISAM tables to our Columnstore tables we saw that some rows had values in fields shifted to the left by 1 column.
On review it turned out that rows that contained a \ as the last character in a string field had all the subsequent fields shifted left.
Our system makes changes to our MyISAM table and then does a "INSERT INTO <Columnstore> SELECT * FROM <MyISAM>" we have narrowed it down to this SQL Query causing the issue.

I have attached some example sql files that demonstrate the problem.
After Importing the SQL running the query:
"INSERT INTO testing_backslash_cs SELECT * FROM testing_backslash"
will demonstrate the issue. Notice that row with id 2 has erroneous data in the name field and all subsequent fields are shifted to the left by 1.

The query only runs successfully when columns at the end of the table have default values set.



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

This is a duplicate of MCOL-877 which is fixed in 1.1.1 RC and the upcoming 1.0.12 release.

Comment by Toby Sear [ 2017-11-07 ]

OK Thanks Andrew, I tried searching for a related issue beforehand but only found a few issues that seemed to be unrelated. Glad to see its fixed in an upcoming release. We have a workaround for the time being.

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