db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sylvain Leroux (JIRA)" <j...@apache.org>
Subject [jira] Created: (DERBY-4559) Propagate update to generated columns on cursors even if they are not explicitly marked "for update"
Date Sat, 20 Feb 2010 19:20:34 GMT
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: Network Server
            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.


Mime
View raw message