db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bryan Pendleton (JIRA)" <derby-...@db.apache.org>
Subject [jira] Updated: (DERBY-1967) UNION (ALL) contraint violation problem
Date Wed, 18 Oct 2006 01:46:36 GMT
     [ http://issues.apache.org/jira/browse/DERBY-1967?page=all ]

Bryan Pendleton updated DERBY-1967:
-----------------------------------

    Fix Version/s: 10.3.0.0
       Derby Info: [Regression]  (was: [Patch Available, Regression])

Thanks Yip for the patch and thanks Army for the review. The patch looks good to me, too,
and
my build and tests were successful, so I committed it to the trunk as subversion
revision 465122.

Should this patch be merged back to previous branch(es)?

I cleared patch available since the patch is now committed to the trunk, but didn't resolve
the issue in case we want to merge it to a release branch first.

> 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

        

Mime
View raw message