Subject | Re: Picture Servlet Problems possibly OT |
---|---|
Author | Roman Rokytskyy |
Post date | 2003-06-09T15:39Z |
Ann,
in DDL statement?
get _only one_ segment? So, when I have 16k buffer and 1k segment, I
will need to call isc_get_segment 16 times?
What happens in isc_put_segment if blob has 1k segments defined and
I'm writing 16k bytes? Will it be stored as 1 segment of 16k size, or
will it be stored as 16 segments of 1k size?
What happens if the size of the segment is bigger than page size? Is
such situation allowed?
because driver was feature closed. I will merge that changes soon.
Thanks!
Roman
> > As I understand, segment size influencesCan actual length of one segment be bigger than segment length defined
> >the way blob is stored on the database page.
>
> Yes, but you can store different length segments in a single blob.
> A segmented blob contains two bytes of segment length, followed by
> that many bytes of data, followed by the length of the next segment,
> that segment, etc.
in DDL statement?
> > Also it is used in blobDo I understand you correctly, that each call to isc_get_segment will
> >filters.
>
> The get_segment and put_segment calls are used in both stream and
> segmented blobs. In the case of a stream blob get_segment will
> return full buffers as long as there is still data in the blob.
> In the case of a segmented blob, get_segment will either return
> a segment which may be the size of the buffer or smaller, or it
> will return a full buffer and a status code saying that the
> segment is not yet complete.
get _only one_ segment? So, when I have 16k buffer and 1k segment, I
will need to call isc_get_segment 16 times?
What happens in isc_put_segment if blob has 1k segments defined and
I'm writing 16k bytes? Will it be stored as 1 segment of 16k size, or
will it be stored as 16 segments of 1k size?
What happens if the size of the segment is bigger than page size? Is
such situation allowed?
> Length is easy in either case. Use the blob-info call. It returnsTrue. I had this code already working few months ago, but removed it
> the number of segments (segmented only, of course), the length of
> the longest segment (handy if you're constructing buffers on the
> fly), and the total length of the blob. Seek works only on stream
> blobs (because of the length bytes that occur at irregular intervals
> in segmented blobs), but it provides three modes - from start,
> from current position, and from end (requires a negative offset).
because driver was feature closed. I will merge that changes soon.
Thanks!
Roman