log4jdbc icon indicating copy to clipboard operation
log4jdbc copied to clipboard

Bug in "PreparedStatementSpy#dumpedSql()"

Open GoogleCodeExporter opened this issue 9 years ago • 0 comments

A PreparedStatement like the following won't be processed properly in
"PreparedStatementSpy#dumpedSql()":
"SELECT count(*) FROM users WHERE lastname NOT IN ('?') AND firstname=?"

Expected Result:
"SELECT count(*) FROM users WHERE lastname NOT IN ('?') AND firstname=1"

Actual Result:
"SELECT count(*) FROM users WHERE lastname NOT IN ('1') AND firstname=?"

Note: 
the question mark is inside a string literal and therefore it must not be
taken as an argument for the query.

Note:  This bug was originall entered by an anonymous user when the project 
was hosted on sourceforge.


Original issue reported on code.google.com by [email protected] on 27 Feb 2009 at 2:45

GoogleCodeExporter avatar Mar 30 '15 12:03 GoogleCodeExporter