Re: [Maria-developers] implementing index condition pushdown in MariaDB 5.5

2013-02-15 Thread Zardosht Kasheff
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, i

Re: [Maria-developers] implementing index condition pushdown in MariaDB 5.5

2013-02-15 Thread Sergei Petrunia
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() i

Re: [Maria-developers] implementing index condition pushdown in MariaDB 5.5

2013-02-15 Thread Sergei Petrunia
Hi Zardosht, On Thu, Feb 14, 2013 at 11:31:13AM -0500, Zardosht Kasheff wrote: > Thanks for the feedback. What makes this feature a little difficult > for me to grasp is the requirement that the engine is responsible for > doing some of the condition checking, and that MySQL is doing none of > the

Re: [Maria-developers] implementing index condition pushdown in MariaDB 5.5

2013-02-14 Thread Zardosht Kasheff
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? On Thu, Feb 14, 2013 at 11:31 AM, Zardosht Kasheff wrote: > Hello Sergei, > > Thanks for the feedback. What

Re: [Maria-developers] implementing index condition pushdown in MariaDB 5.5

2013-02-14 Thread Zardosht Kasheff
Hello Sergei, Thanks for the feedback. What makes this feature a little difficult for me to grasp is the requirement that the engine is responsible for doing some of the condition checking, and that MySQL is doing none of the checking. Here are the handler cursor API functions: index_first index

Re: [Maria-developers] implementing index condition pushdown in MariaDB 5.5

2013-02-13 Thread Sergei Petrunia
Hi Zardosht, On Tue, Feb 12, 2013 at 11:29:12PM -0500, Zardosht Kasheff wrote: > Is there any documentation for what a storage engine needs to do to > implement index condition pushdown in MariaDB 5.5? I see some related > things, such as handler_index_cond_check, HA_DO_INDEX_COND_PUSHDOWN, > and

[Maria-developers] implementing index condition pushdown in MariaDB 5.5

2013-02-12 Thread Zardosht Kasheff
Hello, Is there any documentation for what a storage engine needs to do to implement index condition pushdown in MariaDB 5.5? I see some related things, such as handler_index_cond_check, HA_DO_INDEX_COND_PUSHDOWN, and idx_cond_push, but I don't understand how these all interact with each other. T