jdbcapi/xaSimplePositive fails with 10.1 derbyTesting.jar and 10.1 client with
10.2 server.
-------------------------------------------------------------------------------------------
Key: DERBY-1083
URL: http://issues.apache.org/jira/browse/DERBY-1083
Project: Derby
Type: Bug
Components: Regression Test Failure
Versions: 10.2.0.0
Environment: windows/jdk15, 10.1 client with 10.2 server.
Reporter: Sunitha Kambhampati
This new failure was noticed in the nightly testrun with jdk15. Looks like
some xa changes have gone in to 10.2 Is this related to those changes, if so -
is this diff ok ? Please comment. Thanks.
********* Diff file
derbynetclientmats/DerbyNetClient/derbynetclientmats/xaSimplePositive.diff
*** Start: xaSimplePositive jdk1.5.0_02 DerbyNetClient
derbynetclientmats:derbynetclientmats 2006-03-07 10:15:03 ***
15 del
< A
15a15,33
> ERROR XJ05C: Cannot set holdability ResultSet.HOLD_CURSORS_OVER_COMMIT for a
> global transaction.
> ij(XA)> run resource
> '/org/apache/derbyTesting/functionTests/tests/store/global_xactTable.view';
> ij(XA)> create view global_xactTable as
> select
> cast(global_xid as char(2)) as gxid,
> status,
> case when first_instant is NULL then 'NULL' else 'false' end as readOnly,
> cast (username as char(10)) as username,
> type
> from new org.apache.derby.diag.TransactionTable() t;
> 0 rows inserted/updated/deleted
> ij(XA)> select * from global_xactTable where gxid is not null order by gxid;
> ERROR XJ05C: Cannot set holdability ResultSet.HOLD_CURSORS_OVER_COMMIT for a
> global transaction.
> ij(XA)> xa_end xa_success 0;
> ij(XA)> xa_commit xa_1phase 0;
> ij(XA)> xa_datasource 'wombat' shutdown;
> ERROR 08006: DERBY SQL error: SQLCODE: -1, SQLSTATE: 08006, SQLERRMC:
> Database 'wombat' shutdown.
> ij(XA)> ---------------------------------------------
> ----- two interleaving connections and prepare/commit prepare/rollback
17 del
< 0
18 del
< ij(XA)> run resource
'/org/apache/derbyTesting/functionTests/tests/store/global_xactTable.view';
19 del
< ij(XA)> create view global_xactTable as
20,38d34
< select
< cast(global_xid as char(2)) as gxid,
< status,
< case when first_instant is NULL then 'NULL' else 'false' end as readOnly,
< cast (username as char(10)) as username,
< type
< from new org.apache.derby.diag.TransactionTable() t;
< 0 rows inserted/updated/deleted
< ij(XA)> select * from global_xactTable where gxid is not null order by gxid;
< GXID |STATUS |READ& |USERNAME |TYPE
< -----
< (0 |ACTIVE |false |APP |UserTransaction
< ij(XA)> xa_end xa_success 0;
< ij(XA)> xa_commit xa_1phase 0;
< ij(XA)> xa_datasource 'wombat' shutdown;
< ERROR 08006: DERBY SQL error: SQLCODE: -1, SQLSTATE: 08006, SQLERRMC:
Database 'wombat' shutdown.
< ij(XA)> ---------------------------------------------
< ----- two interleaving connections and prepare/commit prepare/rollback
< -----
57a54,66
> ERROR XJ05C: Cannot set holdability ResultSet.HOLD_CURSORS_OVER_COMMIT for a
> global transaction.
> ij(XA)> -- this prepare won't work since transaction 1 has been suspended -
> XA_PROTO
> xa_prepare 1;
> IJ ERROR: XAER_PROTO
> ij(XA)> select * from APP.global_xactTable where gxid is not null order by
> gxid;
> ERROR XJ05C: Cannot set holdability ResultSet.HOLD_CURSORS_OVER_COMMIT for a
> global transaction.
> ij(XA)> xa_end xa_success 2;
> ij(XA)> -- this assumes a resume
> xa_end xa_success 1;
> ij(XA)> xa_prepare 1;
> ij(XA)> xa_prepare 2;
> ij(XA)> -- both transactions should be prepared
> select * from APP.global_xactTable where gxid is not null order by gxid;
60,78d68
< (1 |ACTIVE |false |SKU |UserTransaction
< (2 |ACTIVE |false |SKU |UserTransaction
< ij(XA)> -- this prepare won't work since transaction 1 has been suspended -
XA_PROTO
< xa_prepare 1;
< IJ ERROR: XAER_PROTO
< ij(XA)> select * from APP.global_xactTable where gxid is not null order by
gxid;
< GXID |STATUS |READ& |USERNAME |TYPE
< -----
< (1 |ACTIVE |false |SKU |UserTransaction
< (2 |ACTIVE |false |SKU |UserTransaction
< ij(XA)> xa_end xa_success 2;
< ij(XA)> -- this assumes a resume
< xa_end xa_success 1;
< ij(XA)> xa_prepare 1;
< ij(XA)> xa_prepare 2;
< ij(XA)> -- both transactions should be prepared
< select * from APP.global_xactTable where gxid is not null order by gxid;
< GXID |STATUS |READ& |USERNAME |TYPE
< -----
106 del
< GXID |STATUS |READ& |USERNAME |TYPE
106a96,106
> ERROR XJ05C: Cannot set holdability ResultSet.HOLD_CURSORS_OVER_COMMIT for a
> global transaction.
> ij(XA)> select * from APP.foo;
> ERROR XJ05C: Cannot set holdability ResultSet.HOLD_CURSORS_OVER_COMMIT for a
> global transaction.
> ij(XA)> xa_end xa_success 3;
> ij(XA)> xa_prepare 3;
> ij(XA)> -- should fail with XA_NOTA because we prepared a read only
> transaction
> xa_commit xa_1Phase 3;
> IJ ERROR: XAER_NOTA
> ij(XA)> disconnect;
> ij> ---------------------------------------------
> ----- 3 interleaving xa connections and a local connection
108,123d107
< (3 |IDLE |NULL |SKU |UserTransaction
< ij(XA)> select * from APP.foo;
< A
< -----
< 0
< 1
< 3
< ij(XA)> xa_end xa_success 3;
< ij(XA)> xa_prepare 3;
< ij(XA)> -- should fail with XA_NOTA because we prepared a read only
transaction
< xa_commit xa_1Phase 3;
< IJ ERROR: XAER_NOTA
< ij(XA)> disconnect;
< ij> ---------------------------------------------
< ----- 3 interleaving xa connections and a local connection
< -----
162 del
< GXID |STATUS |READ& |USERNAME |TYPE
162a146,164
> ERROR XJ05C: Cannot set holdability ResultSet.HOLD_CURSORS_OVER_COMMIT for a
> global transaction.
> ij(XA)> xa_commit xa_1Phase 4;
> ij(XA)> insert into APP.foo values (6);
> 1 row inserted/updated/deleted
> ij(XA)> select * from APP.global_xactTable where gxid is not null order by
> gxid;
> ERROR XJ05C: Cannot set holdability ResultSet.HOLD_CURSORS_OVER_COMMIT for a
> global transaction.
> ij(XA)> xa_end xa_fail 6;
> IJ ERROR: XA_RBROLLBACK
> ij(XA)> xa_rollback 6;
> ij(XA)> xa_start xa_join 5;
> ij(XA)> select * from APP.global_xactTable where gxid is not null order by
> gxid;
> ERROR XJ05C: Cannot set holdability ResultSet.HOLD_CURSORS_OVER_COMMIT for a
> global transaction.
> ij(XA)> select * from APP.foo;
> ERROR XJ05C: Cannot set holdability ResultSet.HOLD_CURSORS_OVER_COMMIT for a
> global transaction.
> ij(XA)> xa_end xa_success 5;
> ij(XA)> xa_prepare 5;
> ij(XA)> xa_commit xa_2Phase 5;
> ij(XA)> ---------------------------------------------
> ----- Test procedure with server-side JDBC
164 del
< (4 |ACTIVE |false |SKU |UserTransaction
165 del
< (5 |ACTIVE |false |SKU |UserTransaction
166 del
< (6 |ACTIVE |false |SKU |UserTransaction
167 del
< ij(XA)> xa_commit xa_1Phase 4;
168 del
< ij(XA)> insert into APP.foo values (6);
169 del
< 1 row inserted/updated/deleted
170 del
< ij(XA)> select * from APP.global_xactTable where gxid is not null order by
gxid;
171 del
< GXID |STATUS |READ& |USERNAME |TYPE
171a166,174
> ----- local transaction
> create table t1(i int not null primary key, b char(15));
> 0 rows inserted/updated/deleted
> ij(XA)> insert into t1 values (1,'one'), (2, 'two'), (3,'three');
> 3 rows inserted/updated/deleted
> ij(XA)> create procedure DRS(p1 int) parameter style JAVA READS SQL DATA
> dynamic result sets 1 language java external name
> 'org.apache.derbyTesting.functionTests.util.ProcedureTest.selectRows';
> 0 rows inserted/updated/deleted
> ij(XA)> call DRS(1);
> I |B
173 del
< (5 |ACTIVE |false |SKU |UserTransaction
174 del
< (6 |ACTIVE |false |SKU |UserTransaction
175 del
< ij(XA)> xa_end xa_fail 6;
176 del
< IJ ERROR: XA_RBROLLBACK
177 del
< ij(XA)> xa_rollback 6;
178 del
< ij(XA)> xa_start xa_join 5;
179 del
< ij(XA)> select * from APP.global_xactTable where gxid is not null order by
gxid;
180 del
< GXID |STATUS |READ& |USERNAME |TYPE
180a176,191
> 1 |one
> ij(XA)> drop table t1;
> 0 rows inserted/updated/deleted
> ij(XA)> drop procedure DRS;
> 0 rows inserted/updated/deleted
> ij(XA)> commit;
> ij(XA)> --- global transaction
> xa_start xa_noflags 6;
> ij(XA)> create table t1(i int not null primary key, b char(15));
> 0 rows inserted/updated/deleted
> ij(XA)> insert into t1 values (1,'one'), (2, 'two'), (3,'three');
> 3 rows inserted/updated/deleted
> ij(XA)> create procedure DRS(p1 int) parameter style JAVA READS SQL DATA
> dynamic result sets 1 language java external name
> 'org.apache.derbyTesting.functionTests.util.ProcedureTest.selectRows';
> 0 rows inserted/updated/deleted
> ij(XA)> call DRS(1);
> I |B
182 del
< (5 |ACTIVE |false |SKU |UserTransaction
183 del
< ij(XA)> select * from APP.foo;
184 del
< A
185 del
< -----
186 del
< 0
187 del
< 1
188 del
< 3
189,207d192
< 4
< 77
< 5
< ij(XA)> xa_end xa_success 5;
< ij(XA)> xa_prepare 5;
< ij(XA)> xa_commit xa_2Phase 5;
< ij(XA)> ---------------------------------------------
< ----- Test procedure with server-side JDBC
< -----
< ----- local transaction
< create table t1(i int not null primary key, b char(15));
< 0 rows inserted/updated/deleted
< ij(XA)> insert into t1 values (1,'one'), (2, 'two'), (3,'three');
< 3 rows inserted/updated/deleted
< ij(XA)> create procedure DRS(p1 int) parameter style JAVA READS SQL DATA
dynamic result sets 1 language java external name
'org.apache.derbyTesting.functionTests.util.ProcedureTest.selectRows';
< 0 rows inserted/updated/deleted
< ij(XA)> call DRS(1);
< I |B
< -----
209,225d193
< ij(XA)> drop table t1;
< 0 rows inserted/updated/deleted
< ij(XA)> drop procedure DRS;
< 0 rows inserted/updated/deleted
< ij(XA)> commit;
< ij(XA)> --- global transaction
< xa_start xa_noflags 6;
< ij(XA)> create table t1(i int not null primary key, b char(15));
< 0 rows inserted/updated/deleted
< ij(XA)> insert into t1 values (1,'one'), (2, 'two'), (3,'three');
< 3 rows inserted/updated/deleted
< ij(XA)> create procedure DRS(p1 int) parameter style JAVA READS SQL DATA
dynamic result sets 1 language java external name
'org.apache.derbyTesting.functionTests.util.ProcedureTest.selectRows';
< 0 rows inserted/updated/deleted
< ij(XA)> call DRS(1);
< I |B
< -----
< 1 |one
Test Failed
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira