You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Bernt M. Johnsen (JIRA)" <ji...@apache.org> on 2006/11/14 13:31:38 UTC
[jira] Created: (DERBY-2084) getTransactionIsolation() in network
client should not activate a transaction
getTransactionIsolation() in network client should not activate a transaction
-----------------------------------------------------------------------------
Key: DERBY-2084
URL: http://issues.apache.org/jira/browse/DERBY-2084
Project: Derby
Issue Type: Bug
Components: Network Client
Affects Versions: 10.2.1.6, 10.1.3.1, 10.3.0.0
Reporter: Bernt M. Johnsen
getTransactionIsolation() is implemented by means of
rs = getTransactionIsolationStmt.executeQuery("values current isolation");
This will activate a transaction. Thus the code snippet
Connection conn =
DriverManager.getConnection(url);
conn.setAutoCommit(false);
int tx = conn.getTransactionIsolation();
conn.close();
will fail with
java.sql.SQLException: Cannot close a connection while a transaction is still active.
at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(Unknown Source)
at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source)
at org.apache.derby.client.am.Connection.closeResourcesX(Unknown Source)
at org.apache.derby.client.am.Connection.closeX(Unknown Source)
at org.apache.derby.client.net.NetConnection.closeX(Unknown Source)
at org.apache.derby.client.am.Connection.close(Unknown Source)
at org.apache.derby.client.net.NetConnection.close(Unknown Source)
at GetTransactionIsolation.test(GetTransactionIsolation.java:12)
at GetTransactionIsolation.main(GetTransactionIsolation.java:22)
Caused by: org.apache.derby.client.am.SqlException: Cannot close a connection while a transaction is still active.
at org.apache.derby.client.am.Connection.checkForTransactionInProgress(Unknown Source)
... 7 more
--
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
[jira] Commented: (DERBY-2084) getTransactionIsolation() in network
client should not activate a transaction
Posted by "Bernt M. Johnsen (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-2084?page=comments#action_12450323 ]
Bernt M. Johnsen commented on DERBY-2084:
-----------------------------------------
Dan: It dosen't matter, since I was wrong.
Deepa: The current implementation is correct. You need to temporarily turn off autocommit because there may be open result-sets when getTransactionIsolation().
> getTransactionIsolation() in network client should not activate a transaction
> -----------------------------------------------------------------------------
>
> Key: DERBY-2084
> URL: http://issues.apache.org/jira/browse/DERBY-2084
> Project: Derby
> Issue Type: Bug
> Components: Network Client
> Affects Versions: 10.2.1.6, 10.1.3.1, 10.3.0.0
> Reporter: Bernt M. Johnsen
> Assigned To: Bernt M. Johnsen
> Attachments: DERBY-2084.diff
>
>
> getTransactionIsolation() is implemented by means of
> rs = getTransactionIsolationStmt.executeQuery("values current isolation");
> This will activate a transaction. Thus the code snippet
> Connection conn =
> DriverManager.getConnection(url);
> conn.setAutoCommit(false);
> int tx = conn.getTransactionIsolation();
> conn.close();
> will fail with
> java.sql.SQLException: Cannot close a connection while a transaction is still active.
> at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(Unknown Source)
> at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source)
> at org.apache.derby.client.am.Connection.closeResourcesX(Unknown Source)
> at org.apache.derby.client.am.Connection.closeX(Unknown Source)
> at org.apache.derby.client.net.NetConnection.closeX(Unknown Source)
> at org.apache.derby.client.am.Connection.close(Unknown Source)
> at org.apache.derby.client.net.NetConnection.close(Unknown Source)
> at GetTransactionIsolation.test(GetTransactionIsolation.java:12)
> at GetTransactionIsolation.main(GetTransactionIsolation.java:22)
> Caused by: org.apache.derby.client.am.SqlException: Cannot close a connection while a transaction is still active.
> at org.apache.derby.client.am.Connection.checkForTransactionInProgress(Unknown Source)
> ... 7 more
--
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
[jira] Resolved: (DERBY-2084) getTransactionIsolation() in network
client should not activate a transaction
Posted by "Bernt M. Johnsen (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-2084?page=all ]
Bernt M. Johnsen resolved DERBY-2084.
-------------------------------------
Fix Version/s: 10.1.3.2
Resolution: Fixed
Derby Info: [Regression] (was: [Patch Available, Regression])
Moerged from trunk to 10.1.
Committed revision 476119.
> getTransactionIsolation() in network client should not activate a transaction
> -----------------------------------------------------------------------------
>
> Key: DERBY-2084
> URL: http://issues.apache.org/jira/browse/DERBY-2084
> Project: Derby
> Issue Type: Bug
> Components: Network Client
> Affects Versions: 10.2.1.6, 10.1.3.1, 10.3.0.0
> Reporter: Bernt M. Johnsen
> Assigned To: Bernt M. Johnsen
> Fix For: 10.1.3.2, 10.2.1.8, 10.3.0.0
>
> Attachments: DERBY-2084.diff
>
>
> getTransactionIsolation() is implemented by means of
> rs = getTransactionIsolationStmt.executeQuery("values current isolation");
> This will activate a transaction. Thus the code snippet
> Connection conn =
> DriverManager.getConnection(url);
> conn.setAutoCommit(false);
> int tx = conn.getTransactionIsolation();
> conn.close();
> will fail with
> java.sql.SQLException: Cannot close a connection while a transaction is still active.
> at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(Unknown Source)
> at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source)
> at org.apache.derby.client.am.Connection.closeResourcesX(Unknown Source)
> at org.apache.derby.client.am.Connection.closeX(Unknown Source)
> at org.apache.derby.client.net.NetConnection.closeX(Unknown Source)
> at org.apache.derby.client.am.Connection.close(Unknown Source)
> at org.apache.derby.client.net.NetConnection.close(Unknown Source)
> at GetTransactionIsolation.test(GetTransactionIsolation.java:12)
> at GetTransactionIsolation.main(GetTransactionIsolation.java:22)
> Caused by: org.apache.derby.client.am.SqlException: Cannot close a connection while a transaction is still active.
> at org.apache.derby.client.am.Connection.checkForTransactionInProgress(Unknown Source)
> ... 7 more
--
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
[jira] Closed: (DERBY-2084) getTransactionIsolation() in network
client should not activate a transaction
Posted by "Bernt M. Johnsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-2084?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bernt M. Johnsen closed DERBY-2084.
-----------------------------------
> getTransactionIsolation() in network client should not activate a transaction
> -----------------------------------------------------------------------------
>
> Key: DERBY-2084
> URL: https://issues.apache.org/jira/browse/DERBY-2084
> Project: Derby
> Issue Type: Bug
> Components: Network Client
> Affects Versions: 10.1.3.1, 10.2.1.6, 10.3.0.0
> Reporter: Bernt M. Johnsen
> Assigned To: Bernt M. Johnsen
> Fix For: 10.1.3.2, 10.2.2.0, 10.3.0.0
>
> Attachments: DERBY-2084.diff
>
>
> getTransactionIsolation() is implemented by means of
> rs = getTransactionIsolationStmt.executeQuery("values current isolation");
> This will activate a transaction. Thus the code snippet
> Connection conn =
> DriverManager.getConnection(url);
> conn.setAutoCommit(false);
> int tx = conn.getTransactionIsolation();
> conn.close();
> will fail with
> java.sql.SQLException: Cannot close a connection while a transaction is still active.
> at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(Unknown Source)
> at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source)
> at org.apache.derby.client.am.Connection.closeResourcesX(Unknown Source)
> at org.apache.derby.client.am.Connection.closeX(Unknown Source)
> at org.apache.derby.client.net.NetConnection.closeX(Unknown Source)
> at org.apache.derby.client.am.Connection.close(Unknown Source)
> at org.apache.derby.client.net.NetConnection.close(Unknown Source)
> at GetTransactionIsolation.test(GetTransactionIsolation.java:12)
> at GetTransactionIsolation.main(GetTransactionIsolation.java:22)
> Caused by: org.apache.derby.client.am.SqlException: Cannot close a connection while a transaction is still active.
> at org.apache.derby.client.am.Connection.checkForTransactionInProgress(Unknown Source)
> ... 7 more
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (DERBY-2084) getTransactionIsolation() in network
client should not activate a transaction
Posted by "Daniel John Debrunner (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-2084?page=comments#action_12450085 ]
Daniel John Debrunner commented on DERBY-2084:
----------------------------------------------
Bernt, sorry but I don't understand what your last comment is trying to say. "No difference" to whar?
> getTransactionIsolation() in network client should not activate a transaction
> -----------------------------------------------------------------------------
>
> Key: DERBY-2084
> URL: http://issues.apache.org/jira/browse/DERBY-2084
> Project: Derby
> Issue Type: Bug
> Components: Network Client
> Affects Versions: 10.2.1.6, 10.3.0.0, 10.1.3.1
> Reporter: Bernt M. Johnsen
> Assigned To: Bernt M. Johnsen
> Attachments: DERBY-2084.diff
>
>
> getTransactionIsolation() is implemented by means of
> rs = getTransactionIsolationStmt.executeQuery("values current isolation");
> This will activate a transaction. Thus the code snippet
> Connection conn =
> DriverManager.getConnection(url);
> conn.setAutoCommit(false);
> int tx = conn.getTransactionIsolation();
> conn.close();
> will fail with
> java.sql.SQLException: Cannot close a connection while a transaction is still active.
> at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(Unknown Source)
> at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source)
> at org.apache.derby.client.am.Connection.closeResourcesX(Unknown Source)
> at org.apache.derby.client.am.Connection.closeX(Unknown Source)
> at org.apache.derby.client.net.NetConnection.closeX(Unknown Source)
> at org.apache.derby.client.am.Connection.close(Unknown Source)
> at org.apache.derby.client.net.NetConnection.close(Unknown Source)
> at GetTransactionIsolation.test(GetTransactionIsolation.java:12)
> at GetTransactionIsolation.main(GetTransactionIsolation.java:22)
> Caused by: org.apache.derby.client.am.SqlException: Cannot close a connection while a transaction is still active.
> at org.apache.derby.client.am.Connection.checkForTransactionInProgress(Unknown Source)
> ... 7 more
--
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
[jira] Assigned: (DERBY-2084) getTransactionIsolation() in network
client should not activate a transaction
Posted by "Bernt M. Johnsen (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-2084?page=all ]
Bernt M. Johnsen reassigned DERBY-2084:
---------------------------------------
Assignee: Bernt M. Johnsen
> getTransactionIsolation() in network client should not activate a transaction
> -----------------------------------------------------------------------------
>
> Key: DERBY-2084
> URL: http://issues.apache.org/jira/browse/DERBY-2084
> Project: Derby
> Issue Type: Bug
> Components: Network Client
> Affects Versions: 10.2.1.6, 10.3.0.0, 10.1.3.1
> Reporter: Bernt M. Johnsen
> Assigned To: Bernt M. Johnsen
> Attachments: DERBY-2084.diff
>
>
> getTransactionIsolation() is implemented by means of
> rs = getTransactionIsolationStmt.executeQuery("values current isolation");
> This will activate a transaction. Thus the code snippet
> Connection conn =
> DriverManager.getConnection(url);
> conn.setAutoCommit(false);
> int tx = conn.getTransactionIsolation();
> conn.close();
> will fail with
> java.sql.SQLException: Cannot close a connection while a transaction is still active.
> at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(Unknown Source)
> at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source)
> at org.apache.derby.client.am.Connection.closeResourcesX(Unknown Source)
> at org.apache.derby.client.am.Connection.closeX(Unknown Source)
> at org.apache.derby.client.net.NetConnection.closeX(Unknown Source)
> at org.apache.derby.client.am.Connection.close(Unknown Source)
> at org.apache.derby.client.net.NetConnection.close(Unknown Source)
> at GetTransactionIsolation.test(GetTransactionIsolation.java:12)
> at GetTransactionIsolation.main(GetTransactionIsolation.java:22)
> Caused by: org.apache.derby.client.am.SqlException: Cannot close a connection while a transaction is still active.
> at org.apache.derby.client.am.Connection.checkForTransactionInProgress(Unknown Source)
> ... 7 more
--
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
[jira] Commented: (DERBY-2084) getTransactionIsolation() in network
client should not activate a transaction
Posted by "Bernt M. Johnsen (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-2084?page=comments#action_12449657 ]
Bernt M. Johnsen commented on DERBY-2084:
-----------------------------------------
Only when autoc commit is false.
> getTransactionIsolation() in network client should not activate a transaction
> -----------------------------------------------------------------------------
>
> Key: DERBY-2084
> URL: http://issues.apache.org/jira/browse/DERBY-2084
> Project: Derby
> Issue Type: Bug
> Components: Network Client
> Affects Versions: 10.2.1.6, 10.3.0.0, 10.1.3.1
> Reporter: Bernt M. Johnsen
>
> getTransactionIsolation() is implemented by means of
> rs = getTransactionIsolationStmt.executeQuery("values current isolation");
> This will activate a transaction. Thus the code snippet
> Connection conn =
> DriverManager.getConnection(url);
> conn.setAutoCommit(false);
> int tx = conn.getTransactionIsolation();
> conn.close();
> will fail with
> java.sql.SQLException: Cannot close a connection while a transaction is still active.
> at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(Unknown Source)
> at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source)
> at org.apache.derby.client.am.Connection.closeResourcesX(Unknown Source)
> at org.apache.derby.client.am.Connection.closeX(Unknown Source)
> at org.apache.derby.client.net.NetConnection.closeX(Unknown Source)
> at org.apache.derby.client.am.Connection.close(Unknown Source)
> at org.apache.derby.client.net.NetConnection.close(Unknown Source)
> at GetTransactionIsolation.test(GetTransactionIsolation.java:12)
> at GetTransactionIsolation.main(GetTransactionIsolation.java:22)
> Caused by: org.apache.derby.client.am.SqlException: Cannot close a connection while a transaction is still active.
> at org.apache.derby.client.am.Connection.checkForTransactionInProgress(Unknown Source)
> ... 7 more
--
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
[jira] Updated: (DERBY-2084) getTransactionIsolation() in network
client should not activate a transaction
Posted by "Bernt M. Johnsen (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-2084?page=all ]
Bernt M. Johnsen updated DERBY-2084:
------------------------------------
Derby Info: [Regression]
This is a regression from 10.1.2.1 to 10.1.3.1 caused by the fix for DERBY-1148
> getTransactionIsolation() in network client should not activate a transaction
> -----------------------------------------------------------------------------
>
> Key: DERBY-2084
> URL: http://issues.apache.org/jira/browse/DERBY-2084
> Project: Derby
> Issue Type: Bug
> Components: Network Client
> Affects Versions: 10.2.1.6, 10.3.0.0, 10.1.3.1
> Reporter: Bernt M. Johnsen
> Assigned To: Bernt M. Johnsen
> Attachments: DERBY-2084.diff
>
>
> getTransactionIsolation() is implemented by means of
> rs = getTransactionIsolationStmt.executeQuery("values current isolation");
> This will activate a transaction. Thus the code snippet
> Connection conn =
> DriverManager.getConnection(url);
> conn.setAutoCommit(false);
> int tx = conn.getTransactionIsolation();
> conn.close();
> will fail with
> java.sql.SQLException: Cannot close a connection while a transaction is still active.
> at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(Unknown Source)
> at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source)
> at org.apache.derby.client.am.Connection.closeResourcesX(Unknown Source)
> at org.apache.derby.client.am.Connection.closeX(Unknown Source)
> at org.apache.derby.client.net.NetConnection.closeX(Unknown Source)
> at org.apache.derby.client.am.Connection.close(Unknown Source)
> at org.apache.derby.client.net.NetConnection.close(Unknown Source)
> at GetTransactionIsolation.test(GetTransactionIsolation.java:12)
> at GetTransactionIsolation.main(GetTransactionIsolation.java:22)
> Caused by: org.apache.derby.client.am.SqlException: Cannot close a connection while a transaction is still active.
> at org.apache.derby.client.am.Connection.checkForTransactionInProgress(Unknown Source)
> ... 7 more
--
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
[jira] Resolved: (DERBY-2084) getTransactionIsolation() in network
client should not activate a transaction
Posted by "Bernt M. Johnsen (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-2084?page=all ]
Bernt M. Johnsen resolved DERBY-2084.
-------------------------------------
Fix Version/s: 10.2.1.8
Resolution: Fixed
Committed revision 476088.
> getTransactionIsolation() in network client should not activate a transaction
> -----------------------------------------------------------------------------
>
> Key: DERBY-2084
> URL: http://issues.apache.org/jira/browse/DERBY-2084
> Project: Derby
> Issue Type: Bug
> Components: Network Client
> Affects Versions: 10.2.1.6, 10.1.3.1, 10.3.0.0
> Reporter: Bernt M. Johnsen
> Assigned To: Bernt M. Johnsen
> Fix For: 10.2.1.8, 10.3.0.0
>
> Attachments: DERBY-2084.diff
>
>
> getTransactionIsolation() is implemented by means of
> rs = getTransactionIsolationStmt.executeQuery("values current isolation");
> This will activate a transaction. Thus the code snippet
> Connection conn =
> DriverManager.getConnection(url);
> conn.setAutoCommit(false);
> int tx = conn.getTransactionIsolation();
> conn.close();
> will fail with
> java.sql.SQLException: Cannot close a connection while a transaction is still active.
> at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(Unknown Source)
> at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source)
> at org.apache.derby.client.am.Connection.closeResourcesX(Unknown Source)
> at org.apache.derby.client.am.Connection.closeX(Unknown Source)
> at org.apache.derby.client.net.NetConnection.closeX(Unknown Source)
> at org.apache.derby.client.am.Connection.close(Unknown Source)
> at org.apache.derby.client.net.NetConnection.close(Unknown Source)
> at GetTransactionIsolation.test(GetTransactionIsolation.java:12)
> at GetTransactionIsolation.main(GetTransactionIsolation.java:22)
> Caused by: org.apache.derby.client.am.SqlException: Cannot close a connection while a transaction is still active.
> at org.apache.derby.client.am.Connection.checkForTransactionInProgress(Unknown Source)
> ... 7 more
--
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
[jira] Updated: (DERBY-2084) getTransactionIsolation() in network
client should not activate a transaction
Posted by "Bernt M. Johnsen (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-2084?page=all ]
Bernt M. Johnsen updated DERBY-2084:
------------------------------------
Attachment: DERBY-2084.diff
Simple patch uploaded.
> getTransactionIsolation() in network client should not activate a transaction
> -----------------------------------------------------------------------------
>
> Key: DERBY-2084
> URL: http://issues.apache.org/jira/browse/DERBY-2084
> Project: Derby
> Issue Type: Bug
> Components: Network Client
> Affects Versions: 10.2.1.6, 10.3.0.0, 10.1.3.1
> Reporter: Bernt M. Johnsen
> Assigned To: Bernt M. Johnsen
> Attachments: DERBY-2084.diff
>
>
> getTransactionIsolation() is implemented by means of
> rs = getTransactionIsolationStmt.executeQuery("values current isolation");
> This will activate a transaction. Thus the code snippet
> Connection conn =
> DriverManager.getConnection(url);
> conn.setAutoCommit(false);
> int tx = conn.getTransactionIsolation();
> conn.close();
> will fail with
> java.sql.SQLException: Cannot close a connection while a transaction is still active.
> at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(Unknown Source)
> at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source)
> at org.apache.derby.client.am.Connection.closeResourcesX(Unknown Source)
> at org.apache.derby.client.am.Connection.closeX(Unknown Source)
> at org.apache.derby.client.net.NetConnection.closeX(Unknown Source)
> at org.apache.derby.client.am.Connection.close(Unknown Source)
> at org.apache.derby.client.net.NetConnection.close(Unknown Source)
> at GetTransactionIsolation.test(GetTransactionIsolation.java:12)
> at GetTransactionIsolation.main(GetTransactionIsolation.java:22)
> Caused by: org.apache.derby.client.am.SqlException: Cannot close a connection while a transaction is still active.
> at org.apache.derby.client.am.Connection.checkForTransactionInProgress(Unknown Source)
> ... 7 more
--
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
[jira] Reopened: (DERBY-2084) getTransactionIsolation() in network
client should not activate a transaction
Posted by "Bernt M. Johnsen (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-2084?page=all ]
Bernt M. Johnsen reopened DERBY-2084:
-------------------------------------
Merge to 10.1
> getTransactionIsolation() in network client should not activate a transaction
> -----------------------------------------------------------------------------
>
> Key: DERBY-2084
> URL: http://issues.apache.org/jira/browse/DERBY-2084
> Project: Derby
> Issue Type: Bug
> Components: Network Client
> Affects Versions: 10.2.1.6, 10.1.3.1, 10.3.0.0
> Reporter: Bernt M. Johnsen
> Assigned To: Bernt M. Johnsen
> Fix For: 10.3.0.0, 10.2.1.8
>
> Attachments: DERBY-2084.diff
>
>
> getTransactionIsolation() is implemented by means of
> rs = getTransactionIsolationStmt.executeQuery("values current isolation");
> This will activate a transaction. Thus the code snippet
> Connection conn =
> DriverManager.getConnection(url);
> conn.setAutoCommit(false);
> int tx = conn.getTransactionIsolation();
> conn.close();
> will fail with
> java.sql.SQLException: Cannot close a connection while a transaction is still active.
> at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(Unknown Source)
> at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source)
> at org.apache.derby.client.am.Connection.closeResourcesX(Unknown Source)
> at org.apache.derby.client.am.Connection.closeX(Unknown Source)
> at org.apache.derby.client.net.NetConnection.closeX(Unknown Source)
> at org.apache.derby.client.am.Connection.close(Unknown Source)
> at org.apache.derby.client.net.NetConnection.close(Unknown Source)
> at GetTransactionIsolation.test(GetTransactionIsolation.java:12)
> at GetTransactionIsolation.main(GetTransactionIsolation.java:22)
> Caused by: org.apache.derby.client.am.SqlException: Cannot close a connection while a transaction is still active.
> at org.apache.derby.client.am.Connection.checkForTransactionInProgress(Unknown Source)
> ... 7 more
--
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
[jira] Reopened: (DERBY-2084) getTransactionIsolation() in network
client should not activate a transaction
Posted by "Bernt M. Johnsen (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-2084?page=all ]
Bernt M. Johnsen reopened DERBY-2084:
-------------------------------------
Merge to 10.2
> getTransactionIsolation() in network client should not activate a transaction
> -----------------------------------------------------------------------------
>
> Key: DERBY-2084
> URL: http://issues.apache.org/jira/browse/DERBY-2084
> Project: Derby
> Issue Type: Bug
> Components: Network Client
> Affects Versions: 10.2.1.6, 10.1.3.1, 10.3.0.0
> Reporter: Bernt M. Johnsen
> Assigned To: Bernt M. Johnsen
> Fix For: 10.3.0.0
>
> Attachments: DERBY-2084.diff
>
>
> getTransactionIsolation() is implemented by means of
> rs = getTransactionIsolationStmt.executeQuery("values current isolation");
> This will activate a transaction. Thus the code snippet
> Connection conn =
> DriverManager.getConnection(url);
> conn.setAutoCommit(false);
> int tx = conn.getTransactionIsolation();
> conn.close();
> will fail with
> java.sql.SQLException: Cannot close a connection while a transaction is still active.
> at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(Unknown Source)
> at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source)
> at org.apache.derby.client.am.Connection.closeResourcesX(Unknown Source)
> at org.apache.derby.client.am.Connection.closeX(Unknown Source)
> at org.apache.derby.client.net.NetConnection.closeX(Unknown Source)
> at org.apache.derby.client.am.Connection.close(Unknown Source)
> at org.apache.derby.client.net.NetConnection.close(Unknown Source)
> at GetTransactionIsolation.test(GetTransactionIsolation.java:12)
> at GetTransactionIsolation.main(GetTransactionIsolation.java:22)
> Caused by: org.apache.derby.client.am.SqlException: Cannot close a connection while a transaction is still active.
> at org.apache.derby.client.am.Connection.checkForTransactionInProgress(Unknown Source)
> ... 7 more
--
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
[jira] Commented: (DERBY-2084) getTransactionIsolation() in network
client should not activate a transaction
Posted by "Bernt M. Johnsen (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-2084?page=comments#action_12450009 ]
Bernt M. Johnsen commented on DERBY-2084:
-----------------------------------------
Semantically, it should make no difference if getTransactionIsolation() commited when autocommit==true, but I think the way it is now is working ok too.
> getTransactionIsolation() in network client should not activate a transaction
> -----------------------------------------------------------------------------
>
> Key: DERBY-2084
> URL: http://issues.apache.org/jira/browse/DERBY-2084
> Project: Derby
> Issue Type: Bug
> Components: Network Client
> Affects Versions: 10.2.1.6, 10.3.0.0, 10.1.3.1
> Reporter: Bernt M. Johnsen
> Assigned To: Bernt M. Johnsen
> Attachments: DERBY-2084.diff
>
>
> getTransactionIsolation() is implemented by means of
> rs = getTransactionIsolationStmt.executeQuery("values current isolation");
> This will activate a transaction. Thus the code snippet
> Connection conn =
> DriverManager.getConnection(url);
> conn.setAutoCommit(false);
> int tx = conn.getTransactionIsolation();
> conn.close();
> will fail with
> java.sql.SQLException: Cannot close a connection while a transaction is still active.
> at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(Unknown Source)
> at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source)
> at org.apache.derby.client.am.Connection.closeResourcesX(Unknown Source)
> at org.apache.derby.client.am.Connection.closeX(Unknown Source)
> at org.apache.derby.client.net.NetConnection.closeX(Unknown Source)
> at org.apache.derby.client.am.Connection.close(Unknown Source)
> at org.apache.derby.client.net.NetConnection.close(Unknown Source)
> at GetTransactionIsolation.test(GetTransactionIsolation.java:12)
> at GetTransactionIsolation.main(GetTransactionIsolation.java:22)
> Caused by: org.apache.derby.client.am.SqlException: Cannot close a connection while a transaction is still active.
> at org.apache.derby.client.am.Connection.checkForTransactionInProgress(Unknown Source)
> ... 7 more
--
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
[jira] Resolved: (DERBY-2084) getTransactionIsolation() in network
client should not activate a transaction
Posted by "Bernt M. Johnsen (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-2084?page=all ]
Bernt M. Johnsen resolved DERBY-2084.
-------------------------------------
Fix Version/s: 10.3.0.0
Resolution: Fixed
Derby Info: [Patch Available, Regression] (was: [Regression])
Committed revision 476087.
> getTransactionIsolation() in network client should not activate a transaction
> -----------------------------------------------------------------------------
>
> Key: DERBY-2084
> URL: http://issues.apache.org/jira/browse/DERBY-2084
> Project: Derby
> Issue Type: Bug
> Components: Network Client
> Affects Versions: 10.2.1.6, 10.1.3.1, 10.3.0.0
> Reporter: Bernt M. Johnsen
> Assigned To: Bernt M. Johnsen
> Fix For: 10.3.0.0
>
> Attachments: DERBY-2084.diff
>
>
> getTransactionIsolation() is implemented by means of
> rs = getTransactionIsolationStmt.executeQuery("values current isolation");
> This will activate a transaction. Thus the code snippet
> Connection conn =
> DriverManager.getConnection(url);
> conn.setAutoCommit(false);
> int tx = conn.getTransactionIsolation();
> conn.close();
> will fail with
> java.sql.SQLException: Cannot close a connection while a transaction is still active.
> at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(Unknown Source)
> at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source)
> at org.apache.derby.client.am.Connection.closeResourcesX(Unknown Source)
> at org.apache.derby.client.am.Connection.closeX(Unknown Source)
> at org.apache.derby.client.net.NetConnection.closeX(Unknown Source)
> at org.apache.derby.client.am.Connection.close(Unknown Source)
> at org.apache.derby.client.net.NetConnection.close(Unknown Source)
> at GetTransactionIsolation.test(GetTransactionIsolation.java:12)
> at GetTransactionIsolation.main(GetTransactionIsolation.java:22)
> Caused by: org.apache.derby.client.am.SqlException: Cannot close a connection while a transaction is still active.
> at org.apache.derby.client.am.Connection.checkForTransactionInProgress(Unknown Source)
> ... 7 more
--
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
[jira] Commented: (DERBY-2084) getTransactionIsolation() in network
client should not activate a transaction
Posted by "Deepa Remesh (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-2084?page=comments#action_12449717 ]
Deepa Remesh commented on DERBY-2084:
-------------------------------------
Bernt, I verified that your patch fixes the problem reported. I hadn't realized that the fix for DERBY-1148 would lead to this bug.
As an aside, I relooked at my patch for DERBY-1148. And I am wondering if the storing and saving of autocommit value is needed. I am checking if the below statement (and related statements) serve any purpose:
// Store the current auto-commit value and use it to restore
// at the end of this method.
boolean currentAutoCommit = autoCommit_;
I did some quick checks with and without these statements and seem to get same results. Any thoughts on this?
> getTransactionIsolation() in network client should not activate a transaction
> -----------------------------------------------------------------------------
>
> Key: DERBY-2084
> URL: http://issues.apache.org/jira/browse/DERBY-2084
> Project: Derby
> Issue Type: Bug
> Components: Network Client
> Affects Versions: 10.2.1.6, 10.3.0.0, 10.1.3.1
> Reporter: Bernt M. Johnsen
> Assigned To: Bernt M. Johnsen
> Attachments: DERBY-2084.diff
>
>
> getTransactionIsolation() is implemented by means of
> rs = getTransactionIsolationStmt.executeQuery("values current isolation");
> This will activate a transaction. Thus the code snippet
> Connection conn =
> DriverManager.getConnection(url);
> conn.setAutoCommit(false);
> int tx = conn.getTransactionIsolation();
> conn.close();
> will fail with
> java.sql.SQLException: Cannot close a connection while a transaction is still active.
> at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(Unknown Source)
> at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source)
> at org.apache.derby.client.am.Connection.closeResourcesX(Unknown Source)
> at org.apache.derby.client.am.Connection.closeX(Unknown Source)
> at org.apache.derby.client.net.NetConnection.closeX(Unknown Source)
> at org.apache.derby.client.am.Connection.close(Unknown Source)
> at org.apache.derby.client.net.NetConnection.close(Unknown Source)
> at GetTransactionIsolation.test(GetTransactionIsolation.java:12)
> at GetTransactionIsolation.main(GetTransactionIsolation.java:22)
> Caused by: org.apache.derby.client.am.SqlException: Cannot close a connection while a transaction is still active.
> at org.apache.derby.client.am.Connection.checkForTransactionInProgress(Unknown Source)
> ... 7 more
--
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