On 04/20/2011 06:12 AM, Zardosht Kasheff wrote:
> Hello all,
> In 5.1, what is the purpose of the parameter HANDLER_BUFFER *buffer in
> the function handler::read_multi_range_first? I see that NDB uses it,
> but I do not understand for what.
> The comment just states:
> @param buffer A HANDLER_BUFFER for internal handler usage.
It's a buffer that server-allocated based on estimates on how many rows
should be returned, that handler can use for temporary storage of rows.
Rows should (still) be returned in table->record...but ha_ndbcluster
(and lately also the "disk-sweep MRR" implementation for MyISAM and
InnoDB) reads a batch into this buffer...and then copies it into record.