db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Knut Anders Hatlen <Knut.Hat...@Sun.COM>
Subject Re: Why derby do not auto commit?
Date Mon, 31 May 2010 15:39:37 GMT
On 05/31/10 04:29 PM, Kristian Waagan wrote:
> On 31.05.10 16:04, Knut Anders Hatlen wrote:
>   
>> On 05/31/10 03:38 PM, Kristian Waagan wrote:
>>    
>>     
>>> Is the paragraph referenced from the devguide accurate enough, or should
>>> we change it?
>>> There seems to be many fine details to handle related to this issue...
>>>
>>>      
>>>       
>> I think that the paragraph is accurate enough. It doesn't say what
>> happens when a connection is closed, but that's probably best to leave
>> unspecified until we have harmonized the drivers.
>>
>> I'm wondering about this sentence, though:
>>
>>      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.
>>
>>
>> Is it correct that the statement is completed when the last row has been
>> retrieved if the result set is scrollable? I thought this was only the
>> case for forward-only result sets.
>>    
>>     
> Well, the code posted for this discussion does "while (rst.next())" to 
> print the inserted row, but the insert is lost after the connection close.
> I also tried calling rst.afterLast(), and the insert still got lost 
> after connection close.
>
> To test this with the client driver, I added a rollback after the having 
> read the last row of the result set. The insert was lost

Thanks for testing it, Kristian. I have filed this doc issue:
https://issues.apache.org/jira/browse/DERBY-4682

-- 
Knut Anders


Mime
View raw message