List:Internals« Previous MessageNext Message »
From:Paul McCullagh Date:May 11 2009 7:26pm
Subject:Re: BLOB memory deallocation (storage engine dev)
View as plain text  
Hi Vyacheslav,

On May 11, 2009, at 7:29 PM, Vyacheslav Akhmechet wrote:

> On Mon, May 11, 2009 at 1:15 PM, Paul McCullagh
> <paul.mccullagh@stripped> wrote:
>> As far as I know, you will need a maximum of one buffer per BLOB
>> column per handler.
> So at the end of each read_row, the server copies BLOB data from the
> engine's buffer to its own?

Basically yes. If the server needs a copy of the data it will buffer  
the row data itself. And it will do this before it reads the next row  
from your handler.

But often this is not required. For example, if the data can be  
returned to the client it is just written to the socket.

And if the server sorts the data, it does not have to make a copy. It  
will use ha_handler::position() and ha_handler::rnd_pos() to re-read a  
row from the engine.

> This seems a bit odd (because each BLOB
> requires a memcpy that could potentially be avoided). However, if it
> does work this way, it makes things a lot easier from the storage
> engine's point of view.
>
> Regards,
> - Slava
>
> -- 
> MySQL Internals Mailing List
> For list archives: http://lists.mysql.com/internals
> To unsubscribe:    http://lists.mysql.com/internals?unsub=1
>



--
Paul McCullagh
PrimeBase Technologies
www.primebase.org
www.blobstreaming.org
pbxt.blogspot.com



Thread
BLOB memory deallocation (storage engine dev)Vyacheslav Akhmechet11 May
  • Re: BLOB memory deallocation (storage engine dev)Paul McCullagh11 May
    • Re: BLOB memory deallocation (storage engine dev)Vyacheslav Akhmechet11 May
      • Re: BLOB memory deallocation (storage engine dev)Paul McCullagh11 May
        • Re: BLOB memory deallocation (storage engine dev)Vyacheslav Akhmechet11 May
      • Re: BLOB memory deallocation (storage engine dev)Michael Widenius5 Jun
    • Re: BLOB memory deallocation (storage engine dev)Michael Widenius5 Jun