Bug #16921 '\\\\' parsing bug in PreparedStatement.ParseInfo constructor
Submitted: 30 Jan 2006 23:41 Modified: 31 Mar 2014 10:48
Reporter: Dumitru Daniliuc Email Updates:
Status: Can't repeat Impact on me:
Category:Connector / J Severity:S3 (Non-critical)
Version:3.1.10, 3.1.11, 3.1.12 OS:Linux (Linux)
Assigned to: Alexander Soklakov CPU Architecture:Any

[30 Jan 2006 23:41] Dumitru Daniliuc
The PrepatedStatement.ParseInfo constructor does not handle correctly the ESCAPE '\\\\' clause.

How to repeat:
take a look at the code and/or execute any query that uses ESCAPE '\\\\'.

Suggested fix:
In version 3.1.10, lines 202-203 in PreparedStatement.java are:

if ((((c == '\'') || (c = '"')) && c == quoteChar) && (pre1 == '\\') && (pre2 != '\\'))

You should replace (pre2 != '\\') with (pre2 == '\\').

Versions 3.1.11 and 3.1.12 have the same bug.
[1 Feb 2006 9:51] Valeriy Kravchuk
Thank you for a problem report. To get the bug (if any) fixed faster, please, procide a simple test case, describe the expected behaviour and show the results you got.
[2 Mar 2006 0:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[31 Mar 2014 10:48] Alexander Soklakov
I close this report as "Can't repeat" because there is no feedback for a long time and codebase is too old. Please, feel free to reopen it if the problem still exists in current driver.