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

Knut Anders Hatlen updated DERBY-534:
-------------------------------------

    Attachment: derby-534-02-a-refactor.diff

Attaching derby-534-02-a-refactor.diff which performs a small refactoring of 
the trigger execution logic. It moves some common logic from 
StatementTriggerExecutor and RowTriggerExecutor to GenericTriggerExecutor so 
that it is not duplicated.

The refactoring also fixes two problems with the original logic:

- the before and after result sets were left open if the WHEN clause of a 
statement trigger returned false
- a row trigger that fired multiple times in a single statement would create a 
new PreparedStatement for the WHEN clause each time instead of reusing it

All the regression tests ran cleanly.
                
> Support use of the WHEN clause in CREATE TRIGGER statements
> -----------------------------------------------------------
>
>                 Key: DERBY-534
>                 URL: https://issues.apache.org/jira/browse/DERBY-534
>             Project: Derby
>          Issue Type: Improvement
>          Components: SQL
>            Reporter: Kristian Waagan
>            Assignee: Knut Anders Hatlen
>            Priority: Minor
>              Labels: derby_triage10_11
>         Attachments: derby-534-01-a-syntax.diff, 
> derby-534-02-a-refactor.diff, parser.diff, WhenClause.html, WhenClause.html
>
>
> Support use of the WHEN clause in CREATE TRIGGER statements. The clause is 
> described in the SQL standard (2003) in chapter "11.39 <trigger definition>" 
> under "<triggered action>".
> There are traces in the code that suggests some work has been done on this 
> earlier. If anyone knows something about this, please add a comment to this 
> issue.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to