Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 46440 invoked from network); 30 Oct 2006 06:35:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 30 Oct 2006 06:35:26 -0000 Received: (qmail 63688 invoked by uid 500); 30 Oct 2006 06:35:37 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 63518 invoked by uid 500); 30 Oct 2006 06:35:37 -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 63508 invoked by uid 99); 30 Oct 2006 06:35:37 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 29 Oct 2006 22:35:37 -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; Sun, 29 Oct 2006 22:35:24 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 9EBB77142F6 for ; Sun, 29 Oct 2006 22:34:17 -0800 (PST) Message-ID: <26681061.1162190057647.JavaMail.root@brutus> Date: Sun, 29 Oct 2006 22:34:17 -0800 (PST) From: "Yip Ng (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Commented: (DERBY-2002) Case expression allows NULL in all parts of In-Reply-To: <28562824.1161814456472.JavaMail.root@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-2002?page=comments#action_12445501 ] Yip Ng commented on DERBY-2002: ------------------------------- Christian wrote: >The statement > CREATE VIEW v1(c1) AS VALUES NULL; >produces a NullPointerException... I don't see any existing jira entry for this, so looks like you find a new bug. =) Yip wrote: >So the implementation is trying to process a conforming SQL language in a nonconforming manner, >so it should raise a syntax exception. Sorry for the confusion/contradiction here, I wrote this in a haste. What I was trying to convey is: The original intent of this jira is to not allow NULLs in *ALL* parts of in the case expression so that it conforms to the SQL:2003 spec, section 6.11 Syntax rule 3. And by processing this in a *conforming* manner, a syntax exception should be raised. > Case expression allows NULL in all parts of > ---------------------------------------------------- > > Key: DERBY-2002 > URL: http://issues.apache.org/jira/browse/DERBY-2002 > Project: Derby > Issue Type: Bug > Components: SQL > Affects Versions: 10.2.1.6, 10.3.0.0 > Environment: Any > Reporter: Yip Ng > > According to the SQL:2003 spec, section 6.11 Syntax Rule 3. At least one in a > shall specify a . Derby currently is violating this rule. e.g.: > ij> values case when 1=2 then NULL when 1=3 then NULL else NULL end; > 1 > ---- > NULL > 1 row selected > 6.11 Format section defines as the following: > ::= > > | NULL > The above statement should have thrown a SQLException instead of returning a result. > sysinfo: > ------------------ Java Information ------------------ > Java Version: 1.4.2_12 > Java Vendor: Sun Microsystems Inc. > Java home: C:\jdk142\jre > Java classpath: classes;. > OS name: Windows XP > OS architecture: x86 > OS version: 5.1 > Java user name: yip > Java user home: C:\Documents and Settings\Administrator > Java user dir: C:\derby\trunk > java.specification.name: Java Platform API Specification > java.specification.version: 1.4 > --------- Derby Information -------- > JRE - JDBC: J2SE 1.4.2 - JDBC 3.0 > [C:\derby\trunk\classes] 10.3.0.0 alpha - (1) > ------------------------------------------------------ > ----------------- Locale Information ----------------- > Current Locale : [English/United States [en_US]] > Found support for locale: [de_DE] > version: 10.3.0.0 alpha - (1) > Found support for locale: [es] > version: 10.3.0.0 alpha - (1) > Found support for locale: [fr] > version: 10.3.0.0 alpha - (1) > Found support for locale: [it] > version: 10.3.0.0 alpha - (1) > Found support for locale: [ja_JP] > version: 10.3.0.0 alpha - (1) > Found support for locale: [ko_KR] > version: 10.3.0.0 alpha - (1) > Found support for locale: [pt_BR] > version: 10.3.0.0 alpha - (1) > Found support for locale: [zh_CN] > version: 10.3.0.0 alpha - (1) > Found support for locale: [zh_TW] > version: 10.3.0.0 alpha - (1) > ------------------------------------------------------ -- 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