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/09/18 17:59:59 UTC

[jira] Commented: (DERBY-1323) Detectability methods rowUpdated, rowInserted, rowDeleted can be called from illegal states in both clients

    [ http://issues.apache.org/jira/browse/DERBY-1323?page=comments#action_12435504 ] 
            
Dag H. Wanvik commented on DERBY-1323:
--------------------------------------

Release note for this issue:


PROBLEM

For a JDBC ResultSet with type TYPE_FORWARD_ONLY, the methods
rowUpdated, rowDeleted and rowInserted could previously be called
while not on a row, i.e. before positioning in the result set, while
on insertRow, after updateRow before new positioning, after deleteRow
before new positioning and when after last row. This is now
disallowed.

SYMPTOMS

Calls to any of these methods while not on a row will now throw
SQLException with SQLState 24000.

CAUSE

Derby now disallows these calls when not on a row.

SOLUTION

Change the application to not call these methods unless on a row. Note
that using them at all is rather meaningless for a ResultSet of type
TYPE_FORWARD_ONLY since the returned result will always be 'false'.
This is because once you modify a row, it can no longer be accessed,
you need to move to the next row, if there is one, to get a new
current row. Presently in Derby, these methods are only really
meaningfully useed for result sets of type TYPE_SCROLL_INSENSITIVE and
of concurrency CONCUR_UPDATABLE in which case updated and deleted rows
can be detected.

WORKAROUND

None.


> Detectability methods rowUpdated, rowInserted, rowDeleted can be called from illegal states in both clients
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-1323
>                 URL: http://issues.apache.org/jira/browse/DERBY-1323
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC, Network Client
>    Affects Versions: 10.2.1.0
>            Reporter: Dag H. Wanvik
>         Assigned To: Dag H. Wanvik
>            Priority: Minor
>             Fix For: 10.2.1.0
>
>         Attachments: DERBY-1323-1.diff, DERBY-1323-1.stat, DERBY-1323-2.diff, DERBY-1323-2.stat, Main.java
>
>
> Please see enclosed repro.
> These detectability methods fail to check that they can be called in
> some states. In the repro, calls are allowed while on insert row and
> when after last row. These should both fail. Both clients have the
> same problem. All three detectability methods have the same problem.
> (repro only shows it for a subset of the cases).

-- 
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