You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Rick Hillegas (JIRA)" <ji...@apache.org> on 2013/09/16 21:42:52 UTC

[jira] [Created] (DERBY-6346) NPE in left join whose inner table has a generated column

Rick Hillegas created DERBY-6346:
------------------------------------

             Summary: NPE in left join whose inner table has a generated column
                 Key: DERBY-6346
                 URL: https://issues.apache.org/jira/browse/DERBY-6346
             Project: Derby
          Issue Type: Bug
          Components: SQL
    Affects Versions: 10.5.1.1
            Reporter: Rick Hillegas


Derby trips over an NPE while processing a left join whose inner table has a generated column. The NPE is not printed to derby.log, indicating another problem. The bug goes as far back as 10.5.1.1, the release which introduced generated columns. The NPE does NOT crash the connection. The application can continue issuing statements on the connection.

The following script shows this problem:

connect 'jdbc:derby:memory:db;create=true';

create table t1( c1 int, c2 int generated always as ( -c1 ) );
create table t2( c1 int );

insert into t1( c1 ) values ( 2 ), ( 20 );
insert into t2( c1 ) values ( 2 ), ( 200 );

-- raises a SQLException wrapping an NPE
select * from t2 left join t1 on t1.c1 = t2.c1;


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira