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

Mike Matrigali updated DERBY-4559:
----------------------------------

    Component/s: SQL

> Propagate update to generated columns on cursors even if they are not 
> explicitly marked "for update"
> ----------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-4559
>                 URL: https://issues.apache.org/jira/browse/DERBY-4559
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>            Reporter: Sylvain Leroux
>
> Currently, updating a cursor's column marked FOR UPDATE will fail if there is 
> a generated column based on it which is not marked FOR UPDATE.
>   ij> create table T(col1 int, col2 int, col3 generated always as 
> (col1+col2));
>   ij> insert into t(col1,col2) values (1,2),(3,4);
>   2 rows inserted/updated/deleted
>   ij> get cursor c as 'SELECT COL1 FROM T FOR UPDATE OF COL1';
>   ij> next c;
>   COL1      
>   -----------
>   1          
>   ij> update t set col1 = 5 where current of c;
>   ERROR 42X31: Column 'COL3' is not in the FOR UPDATE list of cursor 'C'. 
> See 
> http://old.nabble.com/Updatable-cursors-and-generated-columns-td27637931.html

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

Reply via email to