The engine is responsible for deallocating the buffer.
However, it is not entirely obvious (to me anyway) exactly when it is
safe to do this.
I recommend making the buffer local to the handler. As far as I know,
you will need a maximum of one buffer per BLOB column per handler.
At the end of the index scan or table scan you can free the buffers
for the handler.
On May 11, 2009, at 6:55 PM, Vyacheslav Akhmechet wrote:
> I understand that when I load a row that contains a blob column, my
> storage engine needs to allocate a buffer in memory for the data, and
> place the pointer to this memory into the relevant field. However, who
> is responsible for deallocating this buffer?
> - Slava
> MySQL Internals Mailing List
> For list archives: http://lists.mysql.com/internals
> To unsubscribe: http://lists.mysql.com/internals?unsub=1