You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Dyre Tjeldvoll (JIRA)" <de...@db.apache.org> on 2006/04/20 13:06:07 UTC
[jira] Updated: (DERBY-1231) LIKE does not match empty strings when
used with a prepared statement
[ http://issues.apache.org/jira/browse/DERBY-1231?page=all ]
Dyre Tjeldvoll updated DERBY-1231:
----------------------------------
Attachment: vti.java
Attaching vti.java which is a simple repro for the problem (the name vti is not meaningful).
> LIKE does not match empty strings when used with a prepared statement
> ---------------------------------------------------------------------
>
> Key: DERBY-1231
> URL: http://issues.apache.org/jira/browse/DERBY-1231
> Project: Derby
> Type: Bug
> Components: JDBC, SQL
> Versions: 10.2.0.0, 10.1.2.0, 10.1.3.0, 10.3.0.0
> Reporter: Dyre Tjeldvoll
> Fix For: 10.2.0.0
> Attachments: vti.java
>
> LIKE should give true for two 0-length strings. See SQL 2003 Ch. 8.5
> General Rules 3)c)i)
> The query SELECT * FROM t WHERE v like ''
> appears to give me all rows where v is an empty
> string, as expected.
> But a prepared statement
> SELECT * FROM t WHERE v like ?, with setString(1, "")
> always returns an empty result set. See attached repro for the full example.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira