[
https://issues.apache.org/jira/browse/DERBY-6666?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14080032#comment-14080032
]
Dag H. Wanvik edited comment on DERBY-6666 at 7/30/14 10:00 PM:
----------------------------------------------------------------
Uploading version b of this patch; the XA test blew up with the first one since
I had used the wrong parameter to set up the statement context (atomic): this
caused the XA rollback to fail.
NOTE: Dyre, I also saw the hang you referred to in DERBY-6665 when trying to
tear down the XA test - I had the wrong XA error for a while there. I didn't
persue it, but it might be interesting to do so.
This patch also adds a new test, derby6666 to ConstraintCharacteristicsTest
which fails without the fix in this patch (equivalent to repro).
Running regressions.
was (Author: dagw):
Uploading version b of this patch; the XA test blew up with the first one since
I had used the wrong parameter to set up the statement context (atomic): this
caused the XA rollback to fail.
NOTE: Dyre, I also saw the hang you referred to in DERBY-6665 when trying to
tear down the XA test - I had the wrong XA error for a while there, but I
didn't persue it, but it might be interesting to do so.
This patch also adds a new test, derby6666 to ConstraintCharacteristcsTest
which fails without the fix in this patch (equivalent to repro).
Running regressions.
> Deferred constraint validation fails with "dead statement" when query plan
> logging is enabled
> ---------------------------------------------------------------------------------------------
>
> Key: DERBY-6666
> URL: https://issues.apache.org/jira/browse/DERBY-6666
> Project: Derby
> Issue Type: Bug
> Components: SQL
> Affects Versions: 10.11.0.0
> Reporter: Knut Anders Hatlen
> Assignee: Dag H. Wanvik
> Attachments: derby-6666.diff, derby-6666b.diff
>
>
> Run the following script with the {{derby.language.logQueryPlan}} system
> property set to {{true}}:
> {code:sql}
> connect 'jdbc:derby:memory:db;create=true';
> create table t1(x int primary key);
> create table t2(y int, constraint c check(y > 0) initially deferred,
> constraint fk foreign key(y) references t1 initially deferred);
> autocommit off;
> insert into t1 values -1, 1;
> insert into t2 values 1;
> update t2 set y = -1;
> delete from t1 where x = -1;
> commit;
> {code}
> The commit statement will fail with the following error message: "ERROR
> 40XC0: Dead statement. This may be caused by catching a transaction severity
> error inside this statement."
> If you run the script without setting the {{derby.language.logQueryPlan}}
> system property, it will fail (correctly) with this error message: "ERROR
> 23514: The transaction was aborted because of a deferred constraint
> violation: Check constraint identified by 'C' defined on "APP"."T2" as '(y >
> 0)'."
--
This message was sent by Atlassian JIRA
(v6.2#6252)