Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 10581 invoked from network); 29 Oct 2006 19:57:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 29 Oct 2006 19:57:26 -0000 Received: (qmail 8310 invoked by uid 500); 29 Oct 2006 19:57:36 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 8281 invoked by uid 500); 29 Oct 2006 19:57:36 -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 8272 invoked by uid 99); 29 Oct 2006 19:57:36 -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 11:57:36 -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 11:57:24 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id C7DFD7142F7 for ; Sun, 29 Oct 2006 11:56:17 -0800 (PST) Message-ID: <17429047.1162151777815.JavaMail.root@brutus> Date: Sun, 29 Oct 2006 11:56:17 -0800 (PST) From: "Christian d'Heureuse (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_12445453 ] Christian d'Heureuse commented on DERBY-2002: --------------------------------------------- > The CASE expression is a conforming SQL language described in the SQL:2003 spec. > So the implementation is trying to process a conforming SQL language in a nonconforming > manner, ... I even don't agree with that. A CASE statement with all NULL values violates syntax rule 3. Therefore the expression case when 1=2 then NULL when 1=3 then NULL else NULL end; is syntactically not conforming, because it breaks a syntax rule. Therefore this CASE expression is non-conforming SQL. > 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