List:Internals« Previous MessageNext Message »
From:will@delgenio.com Date:July 12 2007 7:41pm
Subject:My attempt at documenting condition pushdown SE implementation (part
2)
View as plain text  
I accidentally hit send (dur), so here's the rest of the doc:

Each COND is a tree of conditions.  The top level COND is actually an 
Item_cond (see item_cmpfunc.h for more the class definition).  To walk 
through the tree, you have to use the function:
void traverse_cond(Cond_traverser, void *arg, traverse_order order);
The traverse order can be postfix or prefix.  MySQL cluster uses prefix 
order which means that "WHERE row1 = 'blah' and row2 = 3" would be 
ordered like this:
Item_cond_and -> Item_func_eq -> Item_field -> Item_int -> Item_func_eq 
-> Item_field -> Item_string -> NULL;
[ed: how do i know how many arguments each item has?]
For more advanced condition pushdown, take a look at
void ndb_serialize_cond(const Item *item, void *arg)
in ha_ndbcluster_cond.cc



-Will (pants-wd)
Thread
My attempt at documenting condition pushdown SE implementation (part2)will@delgenio.com12 Jul
  • Re: My attempt at documenting condition pushdown SE implementation (part 2)Sergei Golubchik13 Jul
    • Re: My attempt at documenting condition pushdown SE implementation(part 2)will@delgenio.com17 Jul