Subject | Re: [firebird-support] Re: Working with stream blobs at API level |
---|---|
Author | Vlad Khorsun |
Post date | 2009-11-03T13:22:24Z |
>> Ensure your BPB is correct. For exampleOf course.
>>
>> {isc_bpb_version1, isc_bpb_type, 1, isc_bpb_type_stream}
>>
>
> Hi Vlad, thanks for answering.
>
> The BPB is correct, but allow me to elaborate my problem:
>
> The blob is created with type stream indeed, as per isc_blob_info(), but it still behaves as a segmented blob. What do I mean by
> that:
>
> 1) I can read and write it with isc_get/put_segment().
> 2) isc_blob_info() shows correct number of segments and max. segment size.Why not ?
> 3) reading the blob with isc_get_segment() does reads it in the exact same segments as it was written.I.e. if you supply buffer with size > max segment size above it anyway returns
no more than max segment size bytes ?
> 4) on a type 1 blob, isc_seek_blob() doesn't wanna seek and always returns 1.Hmm...
> 5) on a type 0 blob isc_seek_blob() doesn't report an error in the status vector, but returns a garbage number instead.
> Now,Yes, it is so and always was so.
>
> I notice Bopen and BLOB_put are just light wrappers on top of isc_open_blob2, isc_put_segment respectively, so there's
> really no separate stream blob API underneath, which validates points 1,2,3. Can someone infirm/confirm this?
> My problem really is with number 4 -- can someone confirm that isc_seek_blob() is really working in v2.5b2 ?What is "type 1" blob ? Do you mean blob subtype or kind of blob (stream\segmented) ?
> I can't seem to find any C test case for this function.
It will be better if you'll create small sample application and show it here.
If you doing something wrong - we will find it. If there is bug in Firebird - we
will attach this sample into tracker and fix the bug.
Regards,
Vlad