[MCOL-1518] Escaped Single Quote and Hash cause error in strings Created: 2018-06-29  Updated: 2022-11-05  Resolved: 2022-11-05

Status: Closed
Project: MariaDB ColumnStore
Component/s: MariaDB Server
Affects Version/s: 1.1.2
Fix Version/s: Icebox

Type: Bug Priority: Major
Reporter: Toby Sear Assignee: Unassigned
Resolution: Won't Do Votes: 0
Labels: None


 Description   

An SQL Query that does not touch ColumnStore tables running on a MariaDB ColumnStore
version "10.2.10-MariaDB-log - Columnstore 1.1.2-1" fails when the same query run against MariaDB version "10.1.26-MariaDB-0+deb9u1 - Debian 9.1" executes successfully when a hash (#) follows an escaped single quote (\').
Below queries do not need any tables to be set up beforehand.
Example Query:

SELECT `test_col`
FROM `test_table`
WHERE test_table.test_col =  '\' #'

Expected Result:

#1146 - Table '<database>.test_table' doesn't exist

Result on "10.2.10-MariaDB-log - Columnstore 1.1.2-1":
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''\'' at line 1

Result on "10.1.26-MariaDB-0+deb9u1 - Debian 9.1"
#1146 - Table '<database>.test_table' doesn't exist

Unfortunately I do not currently have a newer version of MariaDB Columnstore to test against.



 Comments   
Comment by Toby Sear [ 2018-06-29 ]

Note: having the actual tables defined does not resolve the issue, the query appears to fail at the query validation stage before it even checks for the existence of tables/columns

Comment by Andrew Hutchings (Inactive) [ 2018-06-29 ]

Confirmed with latest build. This is a vtable parser issue. The workaround would be to execute this first:

set infinidb_vtable_mode=0;

But then performance of the query will suffer significantly.

Comment by Toby Sear [ 2018-06-29 ]

Hi Andrew,
Thanks for the workaround, I will check if we can live with the performance reductions or if we can alter the data loading process to remove one of the characters from the string before its used in the query.

Comment by Todd Stoffel (Inactive) [ 2022-11-05 ]

This item is being closed because it was well passed the expiration date with no activity. If you suspect this was done in error please create a new ticket.

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