Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 96661 invoked from network); 18 Oct 2006 07:32:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 18 Oct 2006 07:32:31 -0000 Received: (qmail 6063 invoked by uid 500); 18 Oct 2006 07:32:31 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 5853 invoked by uid 500); 18 Oct 2006 07:32:30 -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 5844 invoked by uid 99); 18 Oct 2006 07:32:30 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Oct 2006 00:32:30 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Oct 2006 00:32:29 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 750D97142D8 for ; Wed, 18 Oct 2006 00:31:37 -0700 (PDT) Message-ID: <25426850.1161156697477.JavaMail.jira@brutus> Date: Wed, 18 Oct 2006 00:31:37 -0700 (PDT) From: "Yip Ng (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Commented: (DERBY-1967) UNION (ALL) contraint violation problem In-Reply-To: <26308970.1161083074900.JavaMail.jira@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 X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/DERBY-1967?page=comments#action_12443195 ] Yip Ng commented on DERBY-1967: ------------------------------- Thanks Army and Bryan for reviewing the patch. I also have backported this to 10.2 line and ran derbyall without any problems. > UNION (ALL) contraint violation problem > --------------------------------------- > > Key: DERBY-1967 > URL: http://issues.apache.org/jira/browse/DERBY-1967 > Project: Derby > Issue Type: Bug > Components: SQL > Affects Versions: 10.2.1.6, 10.1.3.1 > Environment: derby v10.1.3.1 and v10.2.1.6 on linux (FC5), jdk 1.5.0_06-b05 > and jdk 1.6.0-rc-b99. > Reporter: Radu Radutiu > Assigned To: Yip Ng > Fix For: 10.3.0.0 > > Attachments: derby1967-trunk-diff01.txt, derby1967-trunk-stat01.txt > > > The following simple test case gives an error: > create table a (f1 varchar(10)); > create table b (f2 varchar(10)); > insert into b values('test'); > select nullif('x','x') as f0, f1 from a > union all > select nullif('x','x') as f0, nullif('x','x') as f1 from b; > ERROR 23502: Column 'F0' cannot accept a NULL value. > SQLState(23502) vendor code(30000) > However the following works ok: > drop table a; > drop table b; > create table a (f1 int); > create table b (f2 int); > insert into b values(1); > select nullif('x','x') as f0, f1 from a > union all > select nullif('x','x') as f0, nullif(1,1) as f1 from b; > The test case is a simplification of a query generated by Hibernate > with the table per class inheritance strategy. Both queries work ok on > MSSQL and PostgreSQL. On Derby only the second query works, the first > one giving a contraint violation. -- 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