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: Should I be able to select the same Blob column twice?
Date Fri, 25 Apr 2008 14:06:26 GMT
Kathey Marsden <kmarsdenderby@sbcglobal.net> writes:

> Knut Anders Hatlen wrote:
>> Kathey Marsden <kmarsdenderby@sbcglobal.net> writes:
>>   It sounds reasonable to harmonize the two drivers. We could also
>> disallow the second call to getBinaryStream() (or getBlob()) on both
>> drivers, but that would possibly cause more compatibility problems than
>> just closing and reopening the stream.
>>
>>   
> I think the scope of the problem is more than just getBinaryStream().
> If I create another table and select the column twice and
> insert into the second table, I get the error below, so should this be
> legal?
>
>
> ij> create table t (b1 BLOB(2M), b2 BLOB(2M));
> 0 rows inserted/updated/deleted
> ij> insert into t select v, v from T_MAIN;
> 1 row inserted/updated/deleted
> ij> select * from t;
> B1
>        |B2
>
> ------------------------------------------------------------------------------------------------------------------------
> ------------------------------------------------------------------------------------------------------------------------
> -----------------
> ERROR XSDA7: Restore of a serializable or SQLData object of class ,
> attempted to read more data than was originally stor
> ed
> ERROR XJ001: Java exception: ': java.io.EOFException'.

I would have expected this to work. It's also a bit funny that the error
happens in the SELECT statement and not in the INSERT statement.

-- 
Knut Anders

Mime
View raw message