Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 35643 invoked from network); 18 Jun 2010 09:15:49 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 18 Jun 2010 09:15:49 -0000 Received: (qmail 19901 invoked by uid 500); 18 Jun 2010 09:15:49 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 19696 invoked by uid 500); 18 Jun 2010 09:15:46 -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 19688 invoked by uid 99); 18 Jun 2010 09:15:45 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Jun 2010 09:15:45 +0000 X-ASF-Spam-Status: No, hits=-1529.6 required=10.0 tests=ALL_TRUSTED,AWL X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Jun 2010 09:15:45 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o5I9FO9A023550 for ; Fri, 18 Jun 2010 09:15:25 GMT Message-ID: <1615294.76201276852524603.JavaMail.jira@thor> Date: Fri, 18 Jun 2010 05:15:24 -0400 (EDT) From: "Knut Anders Hatlen (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Updated: (DERBY-4704) Incorrect nullability when casting non-nullable VARCHAR to BOOLEAN In-Reply-To: <20206798.76131276851941352.JavaMail.jira@thor> 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-4704?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Knut Anders Hatlen updated DERBY-4704: -------------------------------------- Bug behavior facts: [Wrong query result] Marking as "Wrong query result" since the client driver returns the wrong value for unknown (false instead of null) because of this. It also raises an error, but that's not until after it has returned the wrong value. ij> SELECT X, CAST(X AS BOOLEAN) FROM T; X |2 ---------------- true |true false |false unknown |false JAVA ERROR: java.lang.ArrayIndexOutOfBoundsException: 123 > Incorrect nullability when casting non-nullable VARCHAR to BOOLEAN > ------------------------------------------------------------------ > > Key: DERBY-4704 > URL: https://issues.apache.org/jira/browse/DERBY-4704 > Project: Derby > Issue Type: Bug > Components: SQL > Affects Versions: 10.7.0.0 > Reporter: Knut Anders Hatlen > > With the following table definition and query > CREATE TABLE T (X VARCHAR(10) NOT NULL); > INSERT INTO T VALUES 'true', 'false', 'unknown'; > SELECT CAST(X AS BOOLEAN) FROM T; > the meta-data for the returned result will say that the column is not nullable, although it will contain a NULL value in the third row. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.