Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 80334 invoked from network); 7 Jun 2010 15:14:02 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 7 Jun 2010 15:14:02 -0000 Received: (qmail 21399 invoked by uid 500); 7 Jun 2010 15:14:02 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 21312 invoked by uid 500); 7 Jun 2010 15:14:02 -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 21305 invoked by uid 99); 7 Jun 2010 15:14:02 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Jun 2010 15:14:02 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED 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; Mon, 07 Jun 2010 15:14:00 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o57FDcQG013630 for ; Mon, 7 Jun 2010 15:13:38 GMT Message-ID: <24310920.2871275923618457.JavaMail.jira@thor> Date: Mon, 7 Jun 2010 11:13:38 -0400 (EDT) From: "Rick Hillegas (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Resolved: (DERBY-4692) Unions between BOOLEAN and non-BOOLEAN datatypes should be rejected In-Reply-To: <91646.183561275664258396.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DERBY-4692?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Rick Hillegas resolved DERBY-4692. ---------------------------------- Resolution: Fixed Committed patch at subversion revision 952263. > Unions between BOOLEAN and non-BOOLEAN datatypes should be rejected > ------------------------------------------------------------------- > > Key: DERBY-4692 > URL: https://issues.apache.org/jira/browse/DERBY-4692 > Project: Derby > Issue Type: Bug > Components: SQL > Affects Versions: 10.0.2.0, 10.0.2.1, 10.1.1.0, 10.1.2.1, 10.1.3.1, 10.2.1.6, 10.2.2.0, 10.3.1.4, 10.3.2.1, 10.3.3.0, 10.4.1.3, 10.4.2.0, 10.5.1.1, 10.5.2.0, 10.5.3.0, 10.6.1.0 > Reporter: Rick Hillegas > Attachments: derby-4692-01-aa-badUnions.diff > > > DERBY-4684 fixed problems in implicit casts to BOOLEAN. However, the query which created the implicit casts should raise an error for other reasons: > select isindex from sys.sysconglomerates where conglomeratename = 'foo' > union > values ( 'true' ) > This should fail because if either of the datatypes being UNIONed is BOOLEAN, then both should be BOOLEAN. Here is my reasoning, copied from the related discussion on DERBY: > 1) The rules for determining whether two datatypes are union compatible are stated in the SQL Standard in part 2, section 7.3 (), syntax rule 20.b.ii. > 2) That, in turn, refers the reader to section 9.3 (Result of data type combinations). > 3) Section 9.3, syntax rule 3.g says that if either of two values to be merged is BOOLEAN, then both must be BOOLEAN. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.