[
https://issues.apache.org/jira/browse/DERBY-5121?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13011512#comment-13011512
]
Mamta A. Satoor commented on DERBY-5121:
----------------------------------------
I looked through the upgrade code and saw that we already mark all the SPS
invalid during soft and hard upgrade. This is great because at the time of
trigger execution, we check if the trigger is invalid, it is row level and it
has REFERENCING clause then we should regenerate the trigger action sql. So,
when a user with 10.7.1.1(the version where the triggers can cause data
corruption) upgrades to a release which has DERBY-1482 changes backed out (at
this moment, that would be 10.8 and next release of 10.7. I will work on
bumping the release number of 10,7), the buggy triggers will get fixed and will
not cause any data corruption.
Additionally, once we have the right fix for DERBY-1482 so that the resultset
received by the trigger during execution matches trigger's expectation of
column numbering, we can introduce column reading from trigger table to only
the columns that are really necessary rather than reading all the columns
(which is what we do right now after backing out DERBY-1482 changes).
I have created upgrade test for 10.8 which will test the behavior explained
above.
In other words, the users do not have to drop and recreate their triggers
anymore after upgrading to a release which has DERBY-1482 changes backed out.
If there are any questions, please let me know.
> Data corruption when executing an UPDATE trigger
> ------------------------------------------------
>
> Key: DERBY-5121
> URL: https://issues.apache.org/jira/browse/DERBY-5121
> Project: Derby
> Issue Type: Bug
> Components: SQL
> Affects Versions: 10.7.1.1, 10.8.0.0
> Reporter: Rick Hillegas
> Assignee: Mamta A. Satoor
> Labels: derby_triage10_8
> Attachments:
> DERBY_5121_backoutDerby1492_changes_patch3_trunk_diff.txt,
> DERBY_5121_patch2_trunk_diff.txt, DummyProc.java, Test_5121.java,
> derby-5121-01-aa-runTimeRemapping.diff, derby5121_patch1_diff.txt,
> triggerBug.sql, triggerBug.sql, triggeredBug2.sql, triggeredCorruption.sql
>
>
> When executing an UPDATE trigger, the following error is raised. I will
> attach a test case:
> ERROR XCL12: An attempt was made to put a data value of type
> 'org.apache.derby.impl.jdbc.EmbedClob' into a data value of type 'INTEGER'.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira