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

Piotr Zygielo updated DERBY-7037:
---------------------------------
    Description: 
AFTER UPDATE trigger fails when the column of source table is autogenerated.

Bisected issue to fat commit 
[a826375a|https://github.com/apache/derby/commit/a826375a5482ff797e90b93a83b12173964fd181]
 (DERBY-6414). After that change NPEx is observed and update statement is 
forcibly prevented with current connection being closed.

Logs from example executions: [at 
Travis|https://travis-ci.org/pzrep/derby_npex_trigger/builds/505226771], with 
simple SQLs available on GitHub.

Edit: as checked on [more complex 
case|https://travis-ci.org/pzrep/derby_npex_trigger/builds/505297229], 
reordering columns is not enough.

  was:
AFTER UPDATE trigger fails when the last column of source table is 
autogenerated.

Bisected issue to fat commit 
[a826375a|https://github.com/apache/derby/commit/a826375a5482ff797e90b93a83b12173964fd181]
 (DERBY-6414). After that change NPEx is observed and update statement is 
forcibly prevented with current connection being closed.

Logs from example executions: [at 
Travis|https://travis-ci.org/pzrep/derby_npex_trigger/builds/505226771], with 
simple SQLs available on GitHub.

Not 100% sure about workaround (as I didn't analyse code, only checked some 
outcomes), but it seems that reordering columns helps (see [logs for almost the 
same SQLs as 
above|https://travis-ci.org/pzrep/derby_npex_trigger/builds/505233514]). But 
for large production datasets it might not always be feasible to do such 
migration. 


> NPEx at InternalTriggerExecutionContext.updateAICounters
> --------------------------------------------------------
>
>                 Key: DERBY-7037
>                 URL: https://issues.apache.org/jira/browse/DERBY-7037
>             Project: Derby
>          Issue Type: Bug
>    Affects Versions: 10.12.1.1, 10.13.1.1, 10.14.2.0, 10.15.1.3
>         Environment: Linux, openjdk 8 & 9
>            Reporter: Piotr Zygielo
>            Priority: Major
>
> AFTER UPDATE trigger fails when the column of source table is autogenerated.
> Bisected issue to fat commit 
> [a826375a|https://github.com/apache/derby/commit/a826375a5482ff797e90b93a83b12173964fd181]
>  (DERBY-6414). After that change NPEx is observed and update statement is 
> forcibly prevented with current connection being closed.
> Logs from example executions: [at 
> Travis|https://travis-ci.org/pzrep/derby_npex_trigger/builds/505226771], with 
> simple SQLs available on GitHub.
> Edit: as checked on [more complex 
> case|https://travis-ci.org/pzrep/derby_npex_trigger/builds/505297229], 
> reordering columns is not enough.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to