[
https://issues.apache.org/jira/browse/DERBY-4314?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12861181#action_12861181
]
Kathey Marsden commented on DERBY-4314:
---------------------------------------
I noticed, with the patch, if I add
Statement s = cs1.createStatement();
s.executeUpdate("create table foo (i int)");
just before
xar.end(xid, XAResource.TMSUCCESS);
I get on the subsequent cs1 = xaconn.getConnection();
$ java ReproIsoLost
2010-04-27 00:18:34.201 GMT : Apache Derby Network Server - 10.7.0.0 alpha - (93
8130:938140M) started and ready to accept connections on port 1597
Exception in thread "main" java.sql.SQLNonTransientConnectionException: An error
occurred during connect reset and the connection has been terminated. See chai
ned exceptions for details.
at org.apache.derby.client.am.SQLExceptionFactory40.getSQLException(SQLE
xceptionFactory40.java:70)
at org.apache.derby.client.am.SqlException.getSQLException(SqlException.
java:358)
at org.apache.derby.client.ClientPooledConnection.getConnection(ClientPo
oledConnection.java:259)
at org.apache.derby.client.ClientXAConnection.getConnection(ClientXAConn
ection.java:70)
at ReproIsoLost.main(ReproIsoLost.java:51)
Caused by: org.apache.derby.client.am.DisconnectException: An error occurred dur
ing connect reset and the connection has been terminated. See chained exception
s for details.
at org.apache.derby.client.am.Connection.reset(Connection.java:2175)
at org.apache.derby.client.ClientPooledConnection.getConnection(ClientPo
oledConnection.java:245)
... 2 more
In the derby.log I have:
, (SESSIONID = 3), (DATABASE = wombat), (DRDAID =
NF000001.GC36-867504605894726310{2}), Failed Statement is: SET CURRENT
ISOLATION = CS
ERROR X0Y77: Cannot issue set transaction isolation statement on a global
transaction that is in progress because it would have implicitly committed the
global transaction.
at
org.apache.derby.iapi.error.StandardException.newException(StandardException.java:276)
at
org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.setIsolationLevel(GenericLanguageConnectionContext.java:2650)
at
org.apache.derby.impl.sql.execute.SetTransactionIsolationConstantAction.executeConstantAction(SetTransactionIsolationConstantAction.java:86)
at
org.apache.derby.impl.sql.execute.MiscResultSet.open(MiscResultSet.java:61)
at
org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(GenericPreparedStatement.java:436)
at
org.apache.derby.impl.sql.GenericPreparedStatement.execute(GenericPreparedStatement.java:317)
at
org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1232)
at
org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:625)
at
org.apache.derby.impl.jdbc.EmbedStatement.executeUpdate(EmbedStatement.java:175)
at
org.apache.derby.iapi.jdbc.BrokeredStatement.executeUpdate(BrokeredStatement.java:113)
at
org.apache.derby.impl.drda.DRDAConnThread.parseEXCSQLIMM(DRDAConnThread.java:5133)
at
org.apache.derby.impl.drda.DRDAConnThread.processCommands(DRDAConnThread.java:755)
at
org.apache.derby.impl.drda.DRDAConnThread.run(DRDAConnThread.java:295)
Cleanup action completed
This passes with 10.5 and presumably without the patch.
> With derby client setTransactionIsolation executes and commits even if
> isolation has not changed
> -------------------------------------------------------------------------------------------------
>
> Key: DERBY-4314
> URL: https://issues.apache.org/jira/browse/DERBY-4314
> Project: Derby
> Issue Type: Improvement
> Components: JDBC, Network Client
> Affects Versions: 10.1.3.1, 10.2.2.0, 10.3.3.0, 10.4.2.0, 10.5.1.1,
> 10.6.1.0
> Reporter: Kathey Marsden
> Priority: Minor
> Attachments: DERBY-4314-2.diff, DERBY-4314-3.diff, DERBY-4314-5.diff,
> derby-4314-6a-initial_piggybacking.diff,
> derby-4314-6a-initial_piggybacking.stat,
> DERBY-4314-6b-combinepiggybacking.diff, DERBY-4314-6c-combineaftermerge.diff,
> DERBY-4314.diff, ReproIsoLost.java, TestConnReuse.java, utilXid.java
>
>
> With in EmbedConnection.setIsolation() we have a check to see if the
> isolation level is the same and if so just return without doing a commit:
> public void setTransactionIsolation(int level) throws SQLException {
> if (level == getTransactionIsolation())
> return;
> with org.apache.derby.client.am.Connection we have no such check. It would be
> good if the client driver acted like embedded.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.