On 02/01/12 21:57, Adriano dos Santos Fernandes wrote:
> On 01-02-2012 12:46, Dmitry Yemanov wrote:
>> 31.01.2012 2:12, Adriano dos Santos Fernandes wrote:
>>> There is two obscure SQL commands called READ BLOB and WRITE BLOB.
>>>
>>> The idea behind these commands is to make blob read/write using the
>>> cursor (fetch/insert) API. Why they exist is not something I know, maybe
>>> it predates blob API functions?
>>>
>>> Currently there is problems related to some requests receiving some
>>> (theoretically invalid) operations that may even crash the server. While
>>> working at it, I do think these two commands could and should be removed
>>> from v3.
>> As I had the same wish for a long time already, I'm not going to object :-)
>>
> BTW, how can isc_dsql_insert work, not considering the read/insert blob
> commands?
>
> This function is documented (in the sources) as "Insert next record into
> a dynamic SQL cursor", but is not documented in IB 6 API guide, nor I
> found any usage of it in the internet.
>
> Is it right it can only work with INSERT BLOB?

Looking at the code - yes, it is. It does something useful only for
REQ_PUT_SEGMENT type of request.

And here some more related and probably interesting facts come.
Definitely isc_dsql_insert was added to support blob cursor. And it was
added one of the last before publishing interbase sources - just look to
entry.h, it's number 44, together with the rest of cursor API. Only
services arrived after it in pre-firebird times. Blob API (get/put
segment) arrived much earlier. I.e. it's not correct to say that "a new
... way to achieve the same result is present". Certainly, I completely
agree that it is "better, faster and simpler" :)

Looks like that when introducing cursors people wanted to follow some
standard that existed that time. But from today POV this commands look
useless and should better be removed - specially if they cause problems
with engine stability. But probably somebody (Ann ?) knows why and what
for were they introduced? It can be very useful to surely say 'remove
them' or may be change our mind.


------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to