hi!
>>>>> "Vyacheslav" == Vyacheslav Akhmechet <coffeemug@stripped>
> writes:
Vyacheslav> Paul,
Vyacheslav> On Mon, May 11, 2009 at 1:15 PM, Paul McCullagh
Vyacheslav> <paul.mccullagh@stripped> wrote:
>> As far as I know, you will need a maximum of one buffer per BLOB
>> column per handler.
Vyacheslav> So at the end of each read_row, the server copies BLOB data from the
Vyacheslav> engine's buffer to its own?
No, this isn't the case.
The server will normally send around pointer to where the blob data
is; Even if you do something like SELECT LEFT(blob,100), MySQL will
only normally pointers for the data.
However, MySQL will copy the data if it needs to change it (for
example lcase(blob).
MySQL will also copy the blob to a send buffer when sending the data
to the client.
Vyacheslav> This seems a bit odd (because each BLOB
Vyacheslav> requires a memcpy that could potentially be avoided). However, if it
Vyacheslav> does work this way, it makes things a lot easier from the storage
Vyacheslav> engine's point of view.
MySQL tries to avoid memcpy as much as possible...
Regards,
Monty
For information of MariaDB, the community developed server based on
source code from MySQL, check out www.askmonty.org