← Back to team overview

maria-developers team mailing list archive

Re: implementing index condition pushdown in MariaDB 5.5


On Thu, Feb 14, 2013 at 02:24:57PM -0500, Zardosht Kasheff wrote:
> Also, can somebody please explain how handler_index_cond_check checks
> index conditions? The key function seems to be item->val_int. How does
> this get each value and check check conditions?

Function handler_index_cond_check() is invoked once for each index tuple.

That is, the storage is expected to do something like:

  read the next index tuple;
  unpack index columns into their places in table->record[0];

  if ((res= handler_index_cond_check()) != ICP_NO_MATCH)
    // return either an error or record, depending on the value of res.

Sergei Petrunia, Software Developer
Monty Program AB, http://askmonty.org
Blog: http://s.petrunia.net/blog

Follow ups