[ODBC-97] Backslash at the end of string in one of statements in multistatement query leads to error Created: 2017-05-16  Updated: 2017-05-18  Resolved: 2017-05-18

Status: Closed
Project: MariaDB Connector/ODBC
Component/s: None
Affects Version/s: 3.0.0, 2.0.14
Fix Version/s: 3.0.1, 2.0.15

Type: Bug Priority: Major
Reporter: Lawrin Novitsky Assignee: Lawrin Novitsky
Resolution: Fixed Votes: 0
Labels: None


 Description   

To repeat
OK_SIMPLE_STMT(Stmt, "INSERT INTO odbc74 (val) VALUES('one\\\\');\
INSERT INTO odbc74 (val) VALUES(\"two\\\\\");");



 Comments   
Comment by Lawrin Novitsky [ 2017-05-16 ]

The fix and the testcase have been pushed to odbc-2.0 as commit 34d583b7481dd38b1f9bceb6ec2d21e93d3642ce
The problem was that parser would think of \ that it escapes closing quote, even if it was escaped in its turn(i.e. if it represented the character in the string.

Comment by Lawrin Novitsky [ 2017-05-16 ]

There is also need to care about NO_BACKSLASH_ESCAPES mode case, which will break parsing even this fix.

Comment by Lawrin Novitsky [ 2017-05-18 ]

The fix is now revision 6a1619befbe800e3e7e27ca7dd8c87f2da0d3393, and it has been pushed to odbc-2.0. It's now, as well as the testcase, takes care of the NO_BACKSLASH_ESCAPES case.

Generated at Thu Feb 08 03:26:12 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.