Menu

#1 Bug in "PreparedStatementSpy#dumpedSql()"

open
nobody
None
5
2008-03-27
2008-03-27
Anonymous
No

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.

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.