db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sunitha Kambhampati <ksunitha...@gmail.com>
Subject Re: [jira] Commented: (DERBY-1486) ERROR 40XD0 - When exracting Blob from a database
Date Sat, 08 Jul 2006 00:11:39 GMT
I took a quick look at the code, and there is interleaving of resultset 
and statements in autocommit mode.  Can you try with autocommit  off.

I think if readTable1 is called, a commit will be issued for the first 
statement  in readRows., and then calling getBlob in readRows  will 
throw the error since the transaction in which the blob was created is 
already committed.  Also note, the reason you dont hit this error for 
small blob's, is because small blobs are materialized in memory.

Section 10.1 of the JDBC 3.0 spec says
Enabling autocommit,  causes the jdbc driver to do a transaction commit 
after each individual sql statement as soon as it is complete.  the 
point at which it is complete depends on type of statement.  for select 
statement  :- statement is complete when resultset is closed and result 
set is closed* as soon as one* of the following happens
  -- all rows have been retrieved
 -- associated statement object is re-executed
 -- another Statement object is executed on the same connection

api for blob says
"A |Blob| object is valid for the duration of the transaction in which 
is was created. "

So is it right to say derby behavior is ok here ?

Thanks,
Sunitha.

Mime
View raw message