Thanks a lot Sergei. This information is very helpful. I think this will be my (initial) attempt at implementing ICP for TokuDB. I will return the full pushed condition to MySQL, but I will use the information passed down to filter all index_next, index_next_same, and index_prev calls. This way, if we happen to accidentally not filter a row, MySQL will still behave correctly.
On Fri, Feb 15, 2013 at 8:28 PM, Sergei Petrunia <pser...@askmonty.org> wrote: > 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: > > while() > { > 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. > } > } > > BR > Sergei > -- > Sergei Petrunia, Software Developer > Monty Program AB, http://askmonty.org > Blog: http://s.petrunia.net/blog _______________________________________________ Mailing list: https://launchpad.net/~maria-developers Post to : maria-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-developers More help : https://help.launchpad.net/ListHelp