lesteryu / log4jdbc

Automatically exported from code.google.com/p/log4jdbc
0 stars 0 forks source link

Bug in "PreparedStatementSpy#dumpedSql()" #4

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
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 arthur.b...@gmail.com on 27 Feb 2009 at 2:45