db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dag H. Wanvik (JIRA)" <j...@apache.org>
Subject [jira] Issue Comment Edited: (DERBY-4451) ArrayIndexOutOfBoundsException or ASSERT FAILED when inserting generated columns out of order
Date Sun, 22 Nov 2009 23:43:39 GMT

    [ https://issues.apache.org/jira/browse/DERBY-4451?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12781084#action_12781084
] 

Dag H. Wanvik edited comment on DERBY-4451 at 11/22/09 11:42 PM:
-----------------------------------------------------------------

Uploading a fix for this, which also solves DERBY-4448 which has the same underlying cause;
the checking and pruning of explictly given generated columns (only default is allowed), fails
to visit all rows in a multi-row VALUES clause. The fix moves the source result set part of
INSERT logic in DMLModStatementNode#forbidGenerationOverrides down to the relevant result
sets, and adds tests for DERBY-4448 as well as this issue to GeneratedColumnsTest. Running
regressions.



      was (Author: dagw):
    Uploading a fix for this, which also solves DERBY-4448 which has the same underlying cause;
the checking and pruning of explictly given generated columns (only default is allowed), fails
to visit all rows in a multi-row VALUES clause. The fix moves the source result set part of
INSERT logic in DMLModStatementNode down to the relevant result sets, and adds tests for DERBY-4448
as well as this issue to GeneratedColumnsTest. Running regressions.


  
> ArrayIndexOutOfBoundsException or ASSERT FAILED when inserting generated columns out
of order
> ---------------------------------------------------------------------------------------------
>
>                 Key: DERBY-4451
>                 URL: https://issues.apache.org/jira/browse/DERBY-4451
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.5.3.0, 10.6.0.0
>            Reporter: Knut Anders Hatlen
>            Assignee: Dag H. Wanvik
>         Attachments: derby-4451.diff, derby-4451.stat
>
>
> I see this error when I specify the columns in a different order than in the table definition.
It only fails if a multi-row table constructor is used.
> ij> create table t(a int, b generated always as (-a));
> 0 rows inserted/updated/deleted
> ij> insert into t(b,a) values (default,1);
> 1 row inserted/updated/deleted
> ij> insert into t(b,a) values (default,1), (default, 2);
> ERROR XJ001: Java exception: '1 >= 1: java.lang.ArrayIndexOutOfBoundsException'.
> And in a sane build:
> ij> insert into t(b,a) values (default,1),(default,2);
> ERROR XJ001: Java exception: 'ASSERT FAILED More columns in result column list than in
base table: org.apache.derby.shared.common.sanity.AssertFailure'.
> This bug may be similar to DERBY-4448, but the stack trace is different, and DERBY-4448
does not raise an ASSERT FAILED in sane builds.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message