Issue Details (XML | Word | Printable)

Key: DERBY-1295
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Fernanda Pizzorno
Reporter: Dag H. Wanvik
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Derby

Result sets of type TYPE_SCROLL_INSENSITIVE should not implicitly close due to positioning in autocommit mode

Created: 05/May/06 09:37 PM   Updated: 30/Jun/09 04:12 PM
Return to search "STDCXX Sun C++ issues"
Component/s: JDBC
Affects Version/s: 10.2.1.6
Fix Version/s: 10.2.1.6

Time Tracking:
Issue & Sub-Tasks
Issue Only
Not Specified

File Attachments:
  Size
File Licensed for inclusion in ASF works derby-1295.diff 2006-06-02 03:39 PM Fernanda Pizzorno 10 kB
File Licensed for inclusion in ASF works derby-1295.stat 2006-06-02 03:39 PM Fernanda Pizzorno 0.6 kB
File Licensed for inclusion in ASF works derby-1295v2.diff 2006-06-08 04:40 PM Fernanda Pizzorno 10 kB
File Licensed for inclusion in ASF works derby-1295v2.stat 2006-06-08 04:40 PM Fernanda Pizzorno 0.6 kB
File Licensed for inclusion in ASF works derby-1295v3.diff 2006-06-08 07:30 PM Andreas Korneliussen 10 kB
File Licensed for inclusion in ASF works derby-1295v3.stat 2006-06-08 07:30 PM Andreas Korneliussen 0.6 kB
Java Source File Licensed for inclusion in ASF works Main.java 2006-05-05 11:06 PM Dag H. Wanvik 7 kB

Issue & fix info: Release Note Needed
Resolution Date: 09/Jun/06 01:34 AM

Sub-Tasks  All   Open   
No sub-tasks match this view.

 Description  « Hide
The new JDBC 4 specification allows implementations to automatically
close result sets of type FORWARD_ONLY when ResultSet#next returns
false:

(quote from JDBC preliminary spec):

> 16.2.5 Closing a ResultSet Object
> :
> NOTE: Some JDBC driver implementations may also implicitly close the
> ResultSet when the ResultSet type is TYPE_FORWARD_ONLY and the next
> method of ResultSet returns false.

This implies that other result set type are not free to do this.

Currently, Derby will also implicitly close result sets of type
TYPE_SCROLL_INSENSITIVE, if autocommit is enabled.

Quote from Derby Developer's Guide, subsection "Using autocommit":
 
> Using auto-commit
>
> A new connection to a Derby database is in auto-commit mode by
> default, as specified by the JDBC standard. Auto-commit mode means
> that when a statement is completed, the method commit is called on
> that statement automatically. Auto-commit in effect makes every SQL
> statement a transaction. The commit occurs when the statement
> completes or the next statement is executed, whichever comes
> first. In the case of a statement returning a ResultSet , the
> statement completes when the last row of the ResultSet has been
****************************************
> retrieved or the ResultSet has been closed explicitly.

This seems to indicate that result set always closes when the last row
has been seen, however, it seems the implementation only does this
when autocommit is enabled. I will attach a repro.

Anyway, this should be corrected for JDBC4 compliancy. Scrollable
result sets should never close implicitly due to positioning,
autocommit or not.



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Dag H. Wanvik made changes - 05/May/06 11:06 PM
Field Original Value New Value
Attachment Main.java [ 12326315 ]
Dag H. Wanvik made changes - 08/May/06 06:49 AM
Component/s JDBC [ 11407 ]
Fernanda Pizzorno made changes - 31/May/06 08:47 PM
Assignee Fernanda Pizzorno [ fernanda ]
Fernanda Pizzorno made changes - 02/Jun/06 03:39 PM
Attachment derby-1295.diff [ 12334940 ]
Attachment derby-1295.stat [ 12334941 ]
Dag H. Wanvik made changes - 03/Jun/06 07:17 AM
Derby Info [Patch Available, Existing Application Impact, Release Note Needed]
Fernanda Pizzorno made changes - 08/Jun/06 04:40 PM
Attachment derby-1295v2.diff [ 12335190 ]
Attachment derby-1295v2.stat [ 12335191 ]
Andreas Korneliussen made changes - 08/Jun/06 07:30 PM
Attachment derby-1295v3.diff [ 12335206 ]
Attachment derby-1295v3.stat [ 12335207 ]
Andreas Korneliussen made changes - 09/Jun/06 01:34 AM
Derby Info [Patch Available, Existing Application Impact, Release Note Needed] [Existing Application Impact, Release Note Needed]
Status Open [ 1 ] Resolved [ 5 ]
Resolution Fixed [ 1 ]
Dag H. Wanvik made changes - 10/Oct/06 04:58 PM
Status Resolved [ 5 ] Closed [ 6 ]
Dag H. Wanvik made changes - 30/Jun/09 04:12 PM
Issue & fix info [Existing Application Impact, Release Note Needed] [Release Note Needed]