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 "Dag H. Wanvik (JIRA)" <de...@db.apache.org> on 2006/05/12 15:06:08 UTC
[jira] Created: (DERBY-1322) Missing resets of isOnInsertRow state
in net client when navigating away via other than ResultSet#next
Missing resets of isOnInsertRow state in net client when navigating away via other than ResultSet#next
------------------------------------------------------------------------------------------------------
Key: DERBY-1322
URL: http://issues.apache.org/jira/browse/DERBY-1322
Project: Derby
Type: Bug
Components: JDBC, Network Client
Versions: 10.2.0.0
Reporter: Dag H. Wanvik
Priority: Minor
Fix For: 10.2.0.0
Please see the enclosed repro program.
When attempting the deleteRow, it will fail with SQL state 24000 "no
current row", since the first() call doesn't properly reset the
IsOnInsertRow_ state. By inspection of ../am/ResultSet.java I found
the other positioning calls beside next and moveToCurrentRow to suffer
the same problem.
--
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-1322) Missing resets of isOnInsertRow state
in net client when navigating away via other than ResultSet#next
Posted by "Dag H. Wanvik (JIRA)" <de...@db.apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-1322?page=all ]
Dag H. Wanvik updated DERBY-1322:
---------------------------------
Attachment: Repro.java
> Missing resets of isOnInsertRow state in net client when navigating away via other than ResultSet#next
> ------------------------------------------------------------------------------------------------------
>
> Key: DERBY-1322
> URL: http://issues.apache.org/jira/browse/DERBY-1322
> Project: Derby
> Type: Bug
> Components: JDBC, Network Client
> Versions: 10.2.0.0
> Reporter: Dag H. Wanvik
> Priority: Minor
> Fix For: 10.2.0.0
> Attachments: Repro.java
>
> Please see the enclosed repro program.
> When attempting the deleteRow, it will fail with SQL state 24000 "no
> current row", since the first() call doesn't properly reset the
> IsOnInsertRow_ state. By inspection of ../am/ResultSet.java I found
> the other positioning calls beside next and moveToCurrentRow to suffer
> the same problem.
--
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-1322) Missing resets of isOnInsertRow
state in net client when navigating away via other than ResultSet#next
Posted by "Dag H. Wanvik (JIRA)" <de...@db.apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-1322?page=comments#action_12413030 ]
Dag H. Wanvik commented on DERBY-1322:
--------------------------------------
Thanks for addressing my comments! I think it is ready to go.
> Missing resets of isOnInsertRow state in net client when navigating away via other than ResultSet#next
> ------------------------------------------------------------------------------------------------------
>
> Key: DERBY-1322
> URL: http://issues.apache.org/jira/browse/DERBY-1322
> Project: Derby
> Type: Bug
> Components: JDBC, Network Client
> Versions: 10.2.0.0
> Reporter: Dag H. Wanvik
> Assignee: Fernanda Pizzorno
> Priority: Minor
> Fix For: 10.2.0.0
> Attachments: Repro.java, derby-1322.diff, derby-1322.stat, derby-1322v2.diff, derby-1322v2.stat
>
> Please see the enclosed repro program.
> When attempting the deleteRow, it will fail with SQL state 24000 "no
> current row", since the first() call doesn't properly reset the
> IsOnInsertRow_ state. By inspection of ../am/ResultSet.java I found
> the other positioning calls beside next and moveToCurrentRow to suffer
> the same problem.
--
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-1322) Missing resets of isOnInsertRow state
in net client when navigating away via other than ResultSet#next
Posted by "Bernt M. Johnsen (JIRA)" <de...@db.apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-1322?page=all ]
Bernt M. Johnsen resolved DERBY-1322:
-------------------------------------
Resolution: Fixed
Committed revision 409170.
> Missing resets of isOnInsertRow state in net client when navigating away via other than ResultSet#next
> ------------------------------------------------------------------------------------------------------
>
> Key: DERBY-1322
> URL: http://issues.apache.org/jira/browse/DERBY-1322
> Project: Derby
> Type: Bug
> Components: JDBC, Network Client
> Versions: 10.2.0.0
> Reporter: Dag H. Wanvik
> Assignee: Fernanda Pizzorno
> Priority: Minor
> Fix For: 10.2.0.0
> Attachments: Repro.java, derby-1322.diff, derby-1322.stat, derby-1322v2.diff, derby-1322v2.stat
>
> Please see the enclosed repro program.
> When attempting the deleteRow, it will fail with SQL state 24000 "no
> current row", since the first() call doesn't properly reset the
> IsOnInsertRow_ state. By inspection of ../am/ResultSet.java I found
> the other positioning calls beside next and moveToCurrentRow to suffer
> the same problem.
--
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-1322) Missing resets of isOnInsertRow state
in net client when navigating away via other than ResultSet#next
Posted by "Fernanda Pizzorno (JIRA)" <de...@db.apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-1322?page=all ]
Fernanda Pizzorno reassigned DERBY-1322:
----------------------------------------
Assign To: Fernanda Pizzorno
> Missing resets of isOnInsertRow state in net client when navigating away via other than ResultSet#next
> ------------------------------------------------------------------------------------------------------
>
> Key: DERBY-1322
> URL: http://issues.apache.org/jira/browse/DERBY-1322
> Project: Derby
> Type: Bug
> Components: JDBC, Network Client
> Versions: 10.2.0.0
> Reporter: Dag H. Wanvik
> Assignee: Fernanda Pizzorno
> Priority: Minor
> Fix For: 10.2.0.0
> Attachments: Repro.java
>
> Please see the enclosed repro program.
> When attempting the deleteRow, it will fail with SQL state 24000 "no
> current row", since the first() call doesn't properly reset the
> IsOnInsertRow_ state. By inspection of ../am/ResultSet.java I found
> the other positioning calls beside next and moveToCurrentRow to suffer
> the same problem.
--
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-1322) Missing resets of isOnInsertRow state
in net client when navigating away via other than ResultSet#next
Posted by "Fernanda Pizzorno (JIRA)" <de...@db.apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-1322?page=all ]
Fernanda Pizzorno updated DERBY-1322:
-------------------------------------
Attachment: derby-1322.diff
derby-1322.stat
Changes in patch derby-1322.diff:
java/client/org/apache/derby/client/am/ResultSet.java
Moved part of the method moveToCurrentRow() into a new method moveToCurrentRowX() and added a call to moveToCurrentRowX() from all positioning methods.
java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/SURTest.java
Added a test case.
I have run derbyall, two tests failed but it did not seem to be related to this patch. Can someone please review this patch?
Thank you in advance!
> Missing resets of isOnInsertRow state in net client when navigating away via other than ResultSet#next
> ------------------------------------------------------------------------------------------------------
>
> Key: DERBY-1322
> URL: http://issues.apache.org/jira/browse/DERBY-1322
> Project: Derby
> Type: Bug
> Components: JDBC, Network Client
> Versions: 10.2.0.0
> Reporter: Dag H. Wanvik
> Assignee: Fernanda Pizzorno
> Priority: Minor
> Fix For: 10.2.0.0
> Attachments: Repro.java, derby-1322.diff, derby-1322.stat
>
> Please see the enclosed repro program.
> When attempting the deleteRow, it will fail with SQL state 24000 "no
> current row", since the first() call doesn't properly reset the
> IsOnInsertRow_ state. By inspection of ../am/ResultSet.java I found
> the other positioning calls beside next and moveToCurrentRow to suffer
> the same problem.
--
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-1322) Missing resets of isOnInsertRow
state in net client when navigating away via other than ResultSet#next
Posted by "Dag H. Wanvik (JIRA)" <de...@db.apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-1322?page=comments#action_12412454 ]
Dag H. Wanvik commented on DERBY-1322:
--------------------------------------
The patch looks good. I verified that the changed SURTest.java exposes the problem
when run without the rest of the patch, and is OK after code changes.
Just a few comments:
*ResultSet.java
- relativeX
if (isOnInsertRow_) {
moveToCurrentRowX();
}
:
// this method may not be called when the cursor on the insert row
if (isOnInsertRow_) {
throw new SqlException(agent_.logWriter_,
new ClientMessageId(SQLState.CURSOR_INVALID_OPERATION_AT_CURRENT_POSITION));
}
The latter "if" can now be removed.
- Since the method moveToCurrentRowX checks against isOnInsertRow_, I think
you could remove the (redundant) tests in the <position>X methods, e.g.
here in nextX:
if (isOnInsertRow_) {
moveToCurrentRowX();
}
->
moveToCurrentRowX();
- typo in comment in moveToCurrentRowX: // no affect
It should be "effect", but I would omit this comment, as it's
obvious.
* SURTest.java
- testInsertRowWithScrollCursor:
Statement s should be closed at end.
> s.setCursorName(getNextCursorName());
I don't believe this is necessary; I suspect in SURTest.java, the
cursor was named explicitly due to DERBY-787, but this has been
fixed now.
> Missing resets of isOnInsertRow state in net client when navigating away via other than ResultSet#next
> ------------------------------------------------------------------------------------------------------
>
> Key: DERBY-1322
> URL: http://issues.apache.org/jira/browse/DERBY-1322
> Project: Derby
> Type: Bug
> Components: JDBC, Network Client
> Versions: 10.2.0.0
> Reporter: Dag H. Wanvik
> Assignee: Fernanda Pizzorno
> Priority: Minor
> Fix For: 10.2.0.0
> Attachments: Repro.java, derby-1322.diff, derby-1322.stat
>
> Please see the enclosed repro program.
> When attempting the deleteRow, it will fail with SQL state 24000 "no
> current row", since the first() call doesn't properly reset the
> IsOnInsertRow_ state. By inspection of ../am/ResultSet.java I found
> the other positioning calls beside next and moveToCurrentRow to suffer
> the same problem.
--
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-1322) Missing resets of isOnInsertRow state
in net client when navigating away via other than ResultSet#next
Posted by "Dag H. Wanvik (JIRA)" <de...@db.apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-1322?page=all ]
Dag H. Wanvik closed DERBY-1322.
--------------------------------
> Missing resets of isOnInsertRow state in net client when navigating away via other than ResultSet#next
> ------------------------------------------------------------------------------------------------------
>
> Key: DERBY-1322
> URL: http://issues.apache.org/jira/browse/DERBY-1322
> Project: Derby
> Issue Type: Bug
> Components: JDBC, Network Client
> Affects Versions: 10.2.1.6
> Reporter: Dag H. Wanvik
> Assigned To: Fernanda Pizzorno
> Priority: Minor
> Fix For: 10.2.1.6
>
> Attachments: derby-1322.diff, derby-1322.stat, derby-1322v2.diff, derby-1322v2.stat, Repro.java
>
>
> Please see the enclosed repro program.
> When attempting the deleteRow, it will fail with SQL state 24000 "no
> current row", since the first() call doesn't properly reset the
> IsOnInsertRow_ state. By inspection of ../am/ResultSet.java I found
> the other positioning calls beside next and moveToCurrentRow to suffer
> the same problem.
--
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-1322) Missing resets of isOnInsertRow state
in net client when navigating away via other than ResultSet#next
Posted by "Fernanda Pizzorno (JIRA)" <de...@db.apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-1322?page=all ]
Fernanda Pizzorno updated DERBY-1322:
-------------------------------------
Attachment: derby-1322v2.diff
derby-1322v2.stat
The attached patch (derby-1322v2.diff) addresses the comments of Dag's review.
In SURTest.java, I agree that s.setCursorName(..) is not necessesary anymore, but it has been used in all of the other tests in SURTest.java. I think it is ok keep the same pattern as used previously when adding new tests cases to an existing test. That's the reason why I have chosen not to remove it.
Derbyall ran successfully.
> Missing resets of isOnInsertRow state in net client when navigating away via other than ResultSet#next
> ------------------------------------------------------------------------------------------------------
>
> Key: DERBY-1322
> URL: http://issues.apache.org/jira/browse/DERBY-1322
> Project: Derby
> Type: Bug
> Components: JDBC, Network Client
> Versions: 10.2.0.0
> Reporter: Dag H. Wanvik
> Assignee: Fernanda Pizzorno
> Priority: Minor
> Fix For: 10.2.0.0
> Attachments: Repro.java, derby-1322.diff, derby-1322.stat, derby-1322v2.diff, derby-1322v2.stat
>
> Please see the enclosed repro program.
> When attempting the deleteRow, it will fail with SQL state 24000 "no
> current row", since the first() call doesn't properly reset the
> IsOnInsertRow_ state. By inspection of ../am/ResultSet.java I found
> the other positioning calls beside next and moveToCurrentRow to suffer
> the same problem.
--
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