[jira] Commented: (DERBY-3427) setting transaction isolation level to read committed raise ERROR X0X03: Invalid transaction state - held cursor requires same isolation level
[ https://issues.apache.org/jira/browse/DERBY-3427?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12578186#action_12578186 ] Knut Anders Hatlen commented on DERBY-3427: --- I guess that if we find out that the cursor name does make any difference, it's a better solution to make sure the network server doesn't set a cursor name unless the client has done so, rather than reintroducing the asymmetry between CallableStatement and PreparedStatement. (Of course, the best solution is to fix the overhead of named cursors in the embedded driver, if such an overhead exists.) As to the question about setting 'existing application impact' flag, I'm leaning towards not setting it. Holdable cursors is the default, so the users must have made a deliberate choice that they want non-holdable cursors, and then they shouldn't expect the cursors to be holdable. > setting transaction isolation level to read committed raise ERROR X0X03: > Invalid transaction state - held cursor requires same isolation level > -- > > Key: DERBY-3427 > URL: https://issues.apache.org/jira/browse/DERBY-3427 > Project: Derby > Issue Type: Bug >Affects Versions: 10.3.1.4, 10.3.2.1 > Environment: windows XP Java version 1.6.0_03 >Reporter: Rene Levantinh >Assignee: Knut Anders Hatlen >Priority: Critical > Fix For: 10.3.2.2, 10.4.0.0 > > Attachments: d3427.diff, SimpleNetworkClientSample1.java, > SimpleNetworkServerSample.java, use-holdability.diff > > > setting transaction isolation level to read committed after reading a BLOG > record raise ERROR X0X03: Invalid transaction state - held cursor requires > same isolation level . > Using Derby client 10.2 either with Derby server 10.3 or 10.2 works > fine . > Using Derby Client 10.3 with Derby Server 10.2 also work fine. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (DERBY-3427) setting transaction isolation level to read committed raise ERROR X0X03: Invalid transaction state - held cursor requires same isolation level
[ https://issues.apache.org/jira/browse/DERBY-3427?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12575710#action_12575710 ] Dyre Tjeldvoll commented on DERBY-3427: --- Knut> should I create a follow-up patch which reverts to the old behaviour and skips setting the cursor name for CALLs? Your CALL (pun intended). I have a hard time seeing that it would make a huge difference, but without testing it you never know, I guess... Should we set 'Existing application impact' on this issue? Theoretically, someone could have come to expect that cursors are always holdable for CallableStatement when using the ClientDriver. > setting transaction isolation level to read committed raise ERROR X0X03: > Invalid transaction state - held cursor requires same isolation level > -- > > Key: DERBY-3427 > URL: https://issues.apache.org/jira/browse/DERBY-3427 > Project: Derby > Issue Type: Bug >Affects Versions: 10.3.1.4, 10.3.2.1 > Environment: windows XP Java version 1.6.0_03 >Reporter: Rene Levantinh >Assignee: Knut Anders Hatlen >Priority: Critical > Fix For: 10.4.0.0 > > Attachments: d3427.diff, SimpleNetworkClientSample1.java, > SimpleNetworkServerSample.java, use-holdability.diff > > > setting transaction isolation level to read committed after reading a BLOG > record raise ERROR X0X03: Invalid transaction state - held cursor requires > same isolation level . > Using Derby client 10.2 either with Derby server 10.3 or 10.2 works > fine . > Using Derby Client 10.3 with Derby Server 10.2 also work fine. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (DERBY-3427) setting transaction isolation level to read committed raise ERROR X0X03: Invalid transaction state - held cursor requires same isolation level
[ https://issues.apache.org/jira/browse/DERBY-3427?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12575640#action_12575640 ] Knut Anders Hatlen commented on DERBY-3427: --- > which in turn should reduce resource consumption The committed patch does however make all callable statements have a cursor name (before the patch, only prepared statements and statements had cursor names), which could increase the resource consumption. Is there any scenario where a CALL statement can make use of the cursor name, or should I create a follow-up patch which reverts to the old behaviour and skips setting the cursor name for CALLs? > setting transaction isolation level to read committed raise ERROR X0X03: > Invalid transaction state - held cursor requires same isolation level > -- > > Key: DERBY-3427 > URL: https://issues.apache.org/jira/browse/DERBY-3427 > Project: Derby > Issue Type: Bug >Affects Versions: 10.3.1.4, 10.3.2.1 > Environment: windows XP Java version 1.6.0_03 >Reporter: Rene Levantinh >Assignee: Knut Anders Hatlen >Priority: Critical > Fix For: 10.4.0.0 > > Attachments: d3427.diff, SimpleNetworkClientSample1.java, > SimpleNetworkServerSample.java, use-holdability.diff > > > setting transaction isolation level to read committed after reading a BLOG > record raise ERROR X0X03: Invalid transaction state - held cursor requires > same isolation level . > Using Derby client 10.2 either with Derby server 10.3 or 10.2 works > fine . > Using Derby Client 10.3 with Derby Server 10.2 also work fine. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (DERBY-3427) setting transaction isolation level to read committed raise ERROR X0X03: Invalid transaction state - held cursor requires same isolation level
[ https://issues.apache.org/jira/browse/DERBY-3427?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12575632#action_12575632 ] Dyre Tjeldvoll commented on DERBY-3427: --- The patch fixes a regression (always good), and will most likely reduce the number of holdable cursors used by the NetworkServer which in turn should reduce resource consumption. +1 > setting transaction isolation level to read committed raise ERROR X0X03: > Invalid transaction state - held cursor requires same isolation level > -- > > Key: DERBY-3427 > URL: https://issues.apache.org/jira/browse/DERBY-3427 > Project: Derby > Issue Type: Bug >Affects Versions: 10.3.1.4, 10.3.2.1 > Environment: windows XP Java version 1.6.0_03 >Reporter: Rene Levantinh >Assignee: Knut Anders Hatlen >Priority: Critical > Attachments: d3427.diff, SimpleNetworkClientSample1.java, > SimpleNetworkServerSample.java, use-holdability.diff > > > setting transaction isolation level to read committed after reading a BLOG > record raise ERROR X0X03: Invalid transaction state - held cursor requires > same isolation level . > Using Derby client 10.2 either with Derby server 10.3 or 10.2 works > fine . > Using Derby Client 10.3 with Derby Server 10.2 also work fine. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (DERBY-3427) setting transaction isolation level to read committed raise ERROR X0X03: Invalid transaction state - held cursor requires same isolation level
[ https://issues.apache.org/jira/browse/DERBY-3427?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12575324#action_12575324 ] Knut Anders Hatlen commented on DERBY-3427: --- I managed to expose the missing close() in embedded mode. See DERBY-3496. > setting transaction isolation level to read committed raise ERROR X0X03: > Invalid transaction state - held cursor requires same isolation level > -- > > Key: DERBY-3427 > URL: https://issues.apache.org/jira/browse/DERBY-3427 > Project: Derby > Issue Type: Bug >Affects Versions: 10.3.1.4, 10.3.2.1 > Environment: windows XP Java version 1.6.0_03 >Reporter: Rene Levantinh >Assignee: Knut Anders Hatlen >Priority: Critical > Attachments: SimpleNetworkClientSample1.java, > SimpleNetworkServerSample.java, use-holdability.diff > > > setting transaction isolation level to read committed after reading a BLOG > record raise ERROR X0X03: Invalid transaction state - held cursor requires > same isolation level . > Using Derby client 10.2 either with Derby server 10.3 or 10.2 works > fine . > Using Derby Client 10.3 with Derby Server 10.2 also work fine. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (DERBY-3427) setting transaction isolation level to read committed raise ERROR X0X03: Invalid transaction state - held cursor requires same isolation level
[ https://issues.apache.org/jira/browse/DERBY-3427?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12575277#action_12575277 ] Knut Anders Hatlen commented on DERBY-3427: --- By the way, I think the missing close() mentioned by Dyre may also be a bug, but it's probably a separate issue. (If it is a bug, it should be possible to expose it in embedded mode.) > setting transaction isolation level to read committed raise ERROR X0X03: > Invalid transaction state - held cursor requires same isolation level > -- > > Key: DERBY-3427 > URL: https://issues.apache.org/jira/browse/DERBY-3427 > Project: Derby > Issue Type: Bug >Affects Versions: 10.3.1.4, 10.3.2.1 > Environment: windows XP Java version 1.6.0_03 >Reporter: Rene Levantinh >Assignee: Knut Anders Hatlen >Priority: Critical > Attachments: SimpleNetworkClientSample1.java, > SimpleNetworkServerSample.java, use-holdability.diff > > > setting transaction isolation level to read committed after reading a BLOG > record raise ERROR X0X03: Invalid transaction state - held cursor requires > same isolation level . > Using Derby client 10.2 either with Derby server 10.3 or 10.2 works > fine . > Using Derby Client 10.3 with Derby Server 10.2 also work fine. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (DERBY-3427) setting transaction isolation level to read committed raise ERROR X0X03: Invalid transaction state - held cursor requires same isolation level
[
https://issues.apache.org/jira/browse/DERBY-3427?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12574998#action_12574998
]
Dyre Tjeldvoll commented on DERBY-3427:
---
A couple of observations about this.
1) The setting of the isolation level fails because the connection has an
activation with an open holdable resultset. The statement which created the
resultset is '? = CALL SYSIBM.BLOBGETBYTES(?, ?, ?)'
2) There appears to be something wrong with the transmission of holdability for
CallableStatements in the ClientDriver, because
'? = CALL SYSIBM.BLOBGETBYTES(?, ?, ?)' is clearly prepared with
ResultSet.CLOSE_CURSORS_AT_COMMIT:
blobGetBytesCall = connection.prepareCallX
("? = CALL SYSIBM.BLOBGETBYTES(?, ?, ?)",
java.sql.ResultSet.TYPE_FORWARD_ONLY,
java.sql.ResultSet.CONCUR_READ_ONLY,
java.sql.ResultSet.CLOSE_CURSORS_AT_COMMIT);
but when I instrument EmbedCallableStatement I see that on the server the
holdability is different:
/* KLUDGE - ? = CALL ... returns a ResultSet(). We
* need executeUpdate to be false in that case.
*/
org.apache.derby.iapi.services.monitor.Monitor.logMessage("EmbedCallableStatement="+getSQLText()
+",
closeAtCommit:"+(getResultSetHoldability()==java.sql.ResultSet.CLOSE_CURSORS_AT_COMMIT));
prints the following to derby.log:
EmbedCallableStatement=? = CALL SYSIBM.BLOBGETLENGTH(?), closeAtCommit:false
and even
EmbedCallableStatement=call SYSIBM.SQLCAMESSAGE(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
, closeAtCommit:false
Seems a bit strange that sSQLCAMESSAGE should need to use a holdable cursor.
3) The repro runs fine if I modify EmbedCallableStatement.executeStatement(...)
so that it closes the resultset it uses to get the value of the out-parameter,
rather than simply setting the variable to null:
try
{
DataValueDescriptor returnValue =
pvs.getReturnValueForSet();
returnValue.setValueFromResultSet(results, 1, true);
} catch (StandardException e)
{
throw
EmbedResultSet.noStateChangeException(e);
}
finally {
org.apache.derby.iapi.services.monitor.Monitor.
logMessage("result:"+results);
results.close(); // <--- ADDED THIS
LINE
results = null;
}
// This is a form of ? = CALL which current is
not a procedure call.
// Thus there cannot be any user result sets,
so return false. execResult
// is set to true since a result set was
returned, for the return parameter.
execResult = false;
I have not run any other tests with this change, so I don't know if it has any
negative side-effects.
> setting transaction isolation level to read committed raise ERROR X0X03:
> Invalid transaction state - held cursor requires same isolation level
> --
>
> Key: DERBY-3427
> URL: https://issues.apache.org/jira/browse/DERBY-3427
> Project: Derby
> Issue Type: Bug
>Affects Versions: 10.3.1.4, 10.3.2.1
> Environment: windows XP Java version 1.6.0_03
>Reporter: Rene Levantinh
>Priority: Critical
> Attachments: SimpleNetworkClientSample1.java,
> SimpleNetworkServerSample.java
>
>
> setting transaction isolation level to read committed after reading a BLOG
> record raise ERROR X0X03: Invalid transaction state - held cursor requires
> same isolation level .
> Using Derby client 10.2 either with Derby server 10.3 or 10.2 works
> fine .
> Using Derby Client 10.3 with Derby Server 10.2 also work fine.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (DERBY-3427) setting transaction isolation level to read committed raise ERROR X0X03: Invalid transaction state - held cursor requires same isolation level
[ https://issues.apache.org/jira/browse/DERBY-3427?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12569891#action_12569891 ] Knut Anders Hatlen commented on DERBY-3427: --- The following commit introduced the problem: r542011 | kahatlen | 2007-05-27 19:56:32 +0200 (Sun, 27 May 2007) | 16 lines DERBY-2496: Implement Blob support for Locators The attached patch, enableblobloc.diff, contains the the necessary changes to enable the use of locators for Blob. The patch addresses the following issues: * Enable the use of locators. * Modification of tests that experience changed behavior with locators * If stored procedures reports that the given locator can not be found, it is assumed that this is because transaction has been terminated and an "Blob accessed after commit" error is reported. This makes the client driver and the embedded driver report the same error for this case. Contributed by Øystein Grøvlen. > setting transaction isolation level to read committed raise ERROR X0X03: > Invalid transaction state - held cursor requires same isolation level > -- > > Key: DERBY-3427 > URL: https://issues.apache.org/jira/browse/DERBY-3427 > Project: Derby > Issue Type: Bug >Affects Versions: 10.3.1.4, 10.3.2.1 > Environment: windows XP Java version 1.6.0_03 >Reporter: Rene Levantinh >Priority: Critical > Attachments: SimpleNetworkClientSample1.java, > SimpleNetworkServerSample.java > > > setting transaction isolation level to read committed after reading a BLOG > record raise ERROR X0X03: Invalid transaction state - held cursor requires > same isolation level . > Using Derby client 10.2 either with Derby server 10.3 or 10.2 works > fine . > Using Derby Client 10.3 with Derby Server 10.2 also work fine. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (DERBY-3427) setting transaction isolation level to read committed raise ERROR X0X03: Invalid transaction state - held cursor requires same isolation level
[ https://issues.apache.org/jira/browse/DERBY-3427?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12569877#action_12569877 ] Knut Anders Hatlen commented on DERBY-3427: --- Dyre, I managed to reproduce it with this ij script: connect 'jdbc:derby://localhost/d3427db;create=true'; create table t (b blob); insert into t values cast (x'' as blob); select * from t; set isolation rr; It works on 10.2.2.0 and fails with X0X03 on 10.3.1.4, so it seems like it is a regression. > setting transaction isolation level to read committed raise ERROR X0X03: > Invalid transaction state - held cursor requires same isolation level > -- > > Key: DERBY-3427 > URL: https://issues.apache.org/jira/browse/DERBY-3427 > Project: Derby > Issue Type: Bug >Affects Versions: 10.3.1.4, 10.3.2.1 > Environment: windows XP Java version 1.6.0_03 >Reporter: Rene Levantinh >Priority: Critical > Attachments: SimpleNetworkClientSample1.java, > SimpleNetworkServerSample.java > > > setting transaction isolation level to read committed after reading a BLOG > record raise ERROR X0X03: Invalid transaction state - held cursor requires > same isolation level . > Using Derby client 10.2 either with Derby server 10.3 or 10.2 works > fine . > Using Derby Client 10.3 with Derby Server 10.2 also work fine. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (DERBY-3427) setting transaction isolation level to read committed raise ERROR X0X03: Invalid transaction state - held cursor requires same isolation level
[ https://issues.apache.org/jira/browse/DERBY-3427?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12569856#action_12569856 ] Dyre Tjeldvoll commented on DERBY-3427: --- Are you saying that this is a regression from 10.2 to 10.3? Your example contains quite a bit of code. Could you pin-point where you're getting the error? Do you get the same errors with data types other than BLOB/CLOB? > setting transaction isolation level to read committed raise ERROR X0X03: > Invalid transaction state - held cursor requires same isolation level > -- > > Key: DERBY-3427 > URL: https://issues.apache.org/jira/browse/DERBY-3427 > Project: Derby > Issue Type: Bug >Affects Versions: 10.3.1.4, 10.3.2.1 > Environment: windows XP Java version 1.6.0_03 >Reporter: Rene Levantinh >Priority: Critical > Attachments: SimpleNetworkClientSample1.java, > SimpleNetworkServerSample.java > > > setting transaction isolation level to read committed after reading a BLOG > record raise ERROR X0X03: Invalid transaction state - held cursor requires > same isolation level . > Using Derby client 10.2 either with Derby server 10.3 or 10.2 works > fine . > Using Derby Client 10.3 with Derby Server 10.2 also work fine. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (DERBY-3427) setting transaction isolation level to read committed raise ERROR X0X03: Invalid transaction state - held cursor requires same isolation level
[ https://issues.apache.org/jira/browse/DERBY-3427?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12569855#action_12569855 ] Dyre Tjeldvoll commented on DERBY-3427: --- I assume that you mean BLOB (not BLOG)? Are you saying that this is a regression from 10.2 to 10.3? Your example contains quite a bit of code. Can you pinpoint where you're getting the error? Did you try the same query with other data types (not BLOB/CLOB)? > setting transaction isolation level to read committed raise ERROR X0X03: > Invalid transaction state - held cursor requires same isolation level > -- > > Key: DERBY-3427 > URL: https://issues.apache.org/jira/browse/DERBY-3427 > Project: Derby > Issue Type: Bug >Affects Versions: 10.3.1.4, 10.3.2.1 > Environment: windows XP Java version 1.6.0_03 >Reporter: Rene Levantinh >Priority: Critical > Attachments: SimpleNetworkClientSample1.java, > SimpleNetworkServerSample.java > > > setting transaction isolation level to read committed after reading a BLOG > record raise ERROR X0X03: Invalid transaction state - held cursor requires > same isolation level . > Using Derby client 10.2 either with Derby server 10.3 or 10.2 works > fine . > Using Derby Client 10.3 with Derby Server 10.2 also work fine. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
