On 19/05/2025 19:28, Vlad Khorsun wrote:
> 19.05.2025 20:10, 'Mark Rotteveel' via firebird-devel:
>> Having the server be aware of the item, and respond with the "no this
>> is not an inline blob" response item makes for a more uniform API
>> (e.g. if a driver does not use fbclient, doesn't have inline blob
>> support or something, but one of their users is aware of this info item).
>
> Server have no idea about client state. Server could keep blob_id's
> that was sent
> inline, but there is no guarantee that inline data was really used by
> client. I see
> no reason to make server to waste time and memory for this.
I'm not asking for the server to track anything. I'm asking for the
server to *always* respond that something is not an inline blob item
*if* such a blob info item does reach the server (e.g. sent by not an
fbclient, or by an old fbclient talking to a newer server). Relying on
the client to be the only to know about an information item leads to
surprises and an inconsistent API.
So there are basically two situations:
1) The driver knows about such an information item and responds on its
own whether the blob handle points to an inline blob or a server-side blob
2) The client doesn't know about the information item, sends it to the
server, and the server says "no this is not an inline blob".
> Also, driver that not uses fbclient should know if it received
> op_inline_blob for
> given blob_id, or not.
There are two levels at play here. The driver itself, which would know
it, and the user of a driver, which is not aware of the internals of the
driver and whether or not it supports inline blobs, but might be aware
of the information item to query this.
But I think just querying data transfer will be sufficient for my
verification purposes.
>> That might be an alternative for my purposes. Are those exposed in the
>> legacy API? If so, how?
>
> Yes, it is implemented with new set of items (counters) for
> IAttachment::getInfo() (isc_database_info())
> See details at
https://github.com/FirebirdSQL/firebird/pull/8310
Thanks!
Mark
--
Mark Rotteveel