Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 76432 invoked from network); 5 Dec 2006 07:51:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 Dec 2006 07:51:45 -0000 Received: (qmail 76842 invoked by uid 500); 5 Dec 2006 07:51:53 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 76807 invoked by uid 500); 5 Dec 2006 07:51:53 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 76798 invoked by uid 99); 5 Dec 2006 07:51:53 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Dec 2006 23:51:53 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Dec 2006 23:51:44 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 998697142EC for ; Mon, 4 Dec 2006 23:51:24 -0800 (PST) Message-ID: <14605616.1165305084626.JavaMail.jira@brutus> Date: Mon, 4 Dec 2006 23:51:24 -0800 (PST) From: "Bernt M. Johnsen (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Updated: (DERBY-1231) LIKE does not match empty strings when used with a prepared statement In-Reply-To: <18309720.1145530985821.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ http://issues.apache.org/jira/browse/DERBY-1231?page=all ] Bernt M. Johnsen updated DERBY-1231: ------------------------------------ Derby Info: [Patch Available] > 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 > Issue Type: Bug > Components: JDBC, SQL > Affects Versions: 10.2.1.6, 10.1.2.1, 10.3.0.0, 10.1.3.1 > Reporter: Dyre Tjeldvoll > Assigned To: Bernt M. Johnsen > Fix For: 10.2.2.0 > > Attachments: DERBY-1231.diff, 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