db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mamta A. Satoor (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (DERBY-5121) Data corruption when executing an UPDATE trigger
Date Tue, 29 Mar 2011 23:40:05 GMT

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

Mamta A. Satoor updated DERBY-5121:

    Attachment: DERBY_5121_NotReadForCommit_patch3_trunk_diff.txt

Hi Rick, I found the problem behind the failure. This happened because DERBY-1482 wasn't completely
backed out. We have backed out the code for the triggers so that now that look for the columns
in their actual column positions at execution time. But DERBY-1482 also made changes to UPDATE
code to read only the colunms needed by it and the triggers that it is going to fire. We need
to backout the changes to UPDATE code to make sure that it reads all the columns from the
trigger table and not do selective column reading.

In the attached patch(based on trunk), I have made that change and run the test you provided
and it now runs with no exception. I haven't done any other testing on it. Please feel free
to use this patch for testing with the problem database that you are working with.

I would like to work on following
1)spend little more time on the DERBY-1482 changes to make sure that I am backing out everything
2)run existing junit and derbyall tests once I have accomplished 1)
3)Add an upgrade test case for the latest example you provided.

The reason we didn't see this failure with your last test case was that UPDATE sql was coincidentally
reading all the columns upto the highest column position required by the trigger and hence
all the columns were available in their right positions even though not all the columns may
have been read from the trigger table.

Please let me know if you have any questions. I would also appreciate if you would post on
the list how your testing goes with my patch if you find time to do any testing.

> 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:,
>            Reporter: Rick Hillegas
>            Assignee: Mamta A. Satoor
>              Labels: derby_triage10_8
>         Attachments: 5121_create.sql, 5121_upgrade.sql, DERBY_5121_NotReadForCommit_patch3_trunk_diff.txt,
DERBY_5121_backoutDerby1492_changes_patch3_trunk_diff.txt, DERBY_5121_patch2_trunk_diff.txt,
DummyProc.java, Proc_5121.java, Test_5121.java, derby-5121-01-aa-runTimeRemapping.diff, derby5121_patch1_diff.txt,
releaseNote.html, triggerBug.sql, triggerBug.sql, triggeredBug2.sql, triggeredCorruption.sql
> When executing an UPDATE trigger, the following error is raised. I will attach a test
> 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

View raw message