Return-Path: X-Original-To: apmail-db-derby-dev-archive@www.apache.org Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E4A209CCD for ; Fri, 24 Feb 2012 11:40:09 +0000 (UTC) Received: (qmail 67223 invoked by uid 500); 24 Feb 2012 11:40:09 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 67177 invoked by uid 500); 24 Feb 2012 11:40:09 -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 67169 invoked by uid 99); 24 Feb 2012 11:40:09 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Feb 2012 11:40:09 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Feb 2012 11:40:08 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id A18493388FE for ; Fri, 24 Feb 2012 11:39:48 +0000 (UTC) Date: Fri, 24 Feb 2012 11:39:48 +0000 (UTC) From: "Kristian Waagan (Commented) (JIRA)" To: derby-dev@db.apache.org Message-ID: <883271594.14880.1330083588662.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <2006249720.13765.1330058989773.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (DERBY-5629) Queries with guarded null Parameter fail MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DERBY-5629?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13215558#comment-13215558 ] Kristian Waagan commented on DERBY-5629: ---------------------------------------- I see that "values NULL IS NULL" fails [1]. Isn't that supposed to be supported? It also fails to parse when put in other places, for instance in a WHERE clause [2]. [1] ij> values NULL IS NULL; ERROR 42X01: Syntax error: Encountered "IS" at line 1, column 13. [2] ij> select 1 from sys.systables where NULL IS NULL; ERROR 42X01: Syntax error: Encountered "NULL" at line 1, column 35. > Queries with guarded null Parameter fail > ---------------------------------------- > > Key: DERBY-5629 > URL: https://issues.apache.org/jira/browse/DERBY-5629 > Project: Derby > Issue Type: Bug > Components: JDBC > Affects Versions: 10.8.2.2 > Environment: java version "1.6.0_30" > Java(TM) SE Runtime Environment (build 1.6.0_30-b12) > Java HotSpot(TM) Client VM (build 20.5-b03, mixed mode, sharing) > Reporter: Bernard > Attachments: NullParameterHibernateDerbyMaven.zip > > > Some test cases in the attached Maven project fail where a null parameter is passed in or a null value is coded in the query. > In the context of this issue, a recently closed issue appears to be relevant: > "Add support for setObject(, null)" > https://issues.apache.org/jira/browse/DERBY-1938 > Some test cases in the attached project are Hibernate JPQL cases where Hibernate takes care of generating the SQL queries. > I thought it was appropriate to make a few cases not only one so that the issue gets a little more test coverage. > I also assume that issue DERBY-1938 aims to fix what we can see in these cases. > This has become a major issue because it causes failure of a minimalistic JPQL query as shown at > http://en.wikipedia.org/wiki/Java_Persistence_Query_Language#Examples > that shows a JPQL query: > SELECT a FROM Author a WHERE :lastName IS NULL OR LOWER(a.lastName) = :lastName -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira