db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Myrna van Lunteren (JIRA)" <j...@apache.org>
Subject [jira] Updated: (DERBY-3950) You should get an error if you try to override a generated column via an INSERT driven by an inner ResultSet
Date Mon, 13 Apr 2009 23:20:14 GMT

     [ https://issues.apache.org/jira/browse/DERBY-3950?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Myrna van Lunteren updated DERBY-3950:
--------------------------------------

    Fix Version/s: 10.5.0.0

> You should get an error if you try to override a generated column via an INSERT driven
by an inner ResultSet
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-3950
>                 URL: https://issues.apache.org/jira/browse/DERBY-3950
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.5.0.0
>            Reporter: Rick Hillegas
>            Assignee: Rick Hillegas
>             Fix For: 10.5.0.0
>
>         Attachments: derby-3950-01-aa-forbidOverrides.diff
>
>
> On DERBY-481 Dag points out the following bug:
> drop table t1;
> drop table t2;
> create table t1( a int, b int generated always as ( -a ) );
> create table t2( a int, b int );
> insert into t2( a, b ) values ( 1, 100 );
> -- should fail to compile. instead, it compiles but at run time the generation clause
> -- overrides the value coming from the select
> insert into t1 select * from t2;
> -- should fail to compile. instead, it compiles but at run time the generation clause
> -- overrides the value coming from the select
> insert into t1 select a, 0 from t2;
> -- should also fail to compile. instead, it compiles but at run time the generation clause
> -- overrides the value coming from the list of literals
> insert into t1 values( 2, 200 );
> select * from t1;

-- 
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