You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafodion.apache.org by "Alice Chen (JIRA)" <ji...@apache.org> on 2015/07/22 20:15:12 UTC

[jira] [Created] (TRAFODION-202) LP Bug: 1295879 - Aborted commit needs an error message

Alice Chen created TRAFODION-202:
------------------------------------

             Summary: LP Bug: 1295879 - Aborted commit needs an error message
                 Key: TRAFODION-202
                 URL: https://issues.apache.org/jira/browse/TRAFODION-202
             Project: Apache Trafodion
          Issue Type: Bug
          Components: dtm
            Reporter: Chris Tjepkema
            Priority: Blocker


We need to give an error when a commit fails (e.g. SQLCODE -8606 or -8839)
 MVCC algorithm aborts transactions which conflict rather than waiting for a lock to be released.  
Revision: 38496
In the example below, there appears to be an abort but the user is not given a notice:
I tried the following scenario. In the last commit below window B receives SQL operations complete.
He should get an error.
WindowA..
>>create table t1 ( i int);

--- SQL operation complete.
>>begin;
>>insert into t1 values(1);

--- 1 row(s) inserted.
>>commit;

--- SQL operation complete.                       Time T1

WindowB..
>>select * from t1;

--- 0 row(s) selected.
>>select * from t1;

--- 0 row(s) selected.
>>begin;

--- SQL operation complete.
>>select * from t1;

--- 0 row(s) selected.
>>select * from t1;

--- 0 row(s) selected.                  (before T1)
>>select * from t1;

I
-----------

          1

--- 1 row(s) selected.                 (After T1)        We see commit from Window A


>>update t1 set i=2;

--- 1 row(s) updated.
>>select * from t1;

I
-----------

          2

--- 1 row(s) selected.

                 Then Window A does AUTO COMMIT
>>update t1 set i=3;

--- 1 row(s) updated.
>>select * from t1;

I
-----------

          3

--- 1 row(s) selected.                        Time T2


Window B still sees previous value

>>select * from t1;

I
-----------

          2                                                                     after Time T2

--- 1 row(s) selected.
>>commit;                                              After B commits,    (He thinks he is buying a  gizmo for 2)

--- SQL operation complete.
>>select * from t1;

I
-----------

          3                                                  But He gets a bill for 3

--- 1 row(s) selected.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)