MySQL Lists are EOL. Please join:

List:Internals« Previous MessageNext Message »
From:Magnus Blåudd Date:April 20 2011 12:07pm
Subject:Re: purpose of HANDLER_BUFFER *buffer in read_multi_range_first
View as plain text  
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.
> Thanks
> -Zardosht

Hi Zardosht,

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[0]...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[0].

Best regards
purpose of HANDLER_BUFFER *buffer in read_multi_range_firstZardosht Kasheff20 Apr
  • Re: purpose of HANDLER_BUFFER *buffer in read_multi_range_firstMagnus Blåudd20 Apr