summaryrefslogtreecommitdiff
path: root/sql/item.h
diff options
context:
space:
mode:
authorunknown <timour@askmonty.org>2011-01-11 14:04:08 +0200
committerunknown <timour@askmonty.org>2011-01-11 14:04:08 +0200
commitb0be3e2c6834d427c4e652a0203d166625871a35 (patch)
tree555b0a562b8a99bd51b70ad1b7e6ae41faa34e3e /sql/item.h
parentcb4fa7f401267bf887066100726c53f10b712e6d (diff)
parent2e42948ed3f6eeef5fb61a5d8907ba01dd66f4e3 (diff)
downloadmariadb-git-b0be3e2c6834d427c4e652a0203d166625871a35.tar.gz
Merge MWL#89 into 5.3 main.
Diffstat (limited to 'sql/item.h')
-rw-r--r--sql/item.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/sql/item.h b/sql/item.h
index d57155da9b1..f78f25bb9d2 100644
--- a/sql/item.h
+++ b/sql/item.h
@@ -491,6 +491,17 @@ typedef void (*Cond_traverser) (const Item *item, void *arg);
class Item {
Item(const Item &); /* Prevent use of these */
void operator=(Item &);
+ /**
+ The index in the JOIN::join_tab array of the JOIN_TAB this Item is attached
+ to. Items are attached (or 'pushed') to JOIN_TABs during optimization by the
+ make_cond_for_table procedure. During query execution, this item is
+ evaluated when the join loop reaches the corresponding JOIN_TAB.
+
+ If the value of join_tab_idx >= MAX_TABLES, this means that there is no
+ corresponding JOIN_TAB.
+ */
+ uint join_tab_idx;
+
public:
static void *operator new(size_t size) throw ()
{ return sql_alloc(size); }
@@ -950,6 +961,8 @@ public:
virtual bool register_field_in_read_map(uchar *arg) { return 0; }
virtual bool enumerate_field_refs_processor(uchar *arg) { return 0; }
virtual bool mark_as_eliminated_processor(uchar *arg) { return 0; }
+ virtual bool eliminate_subselect_processor(uchar *arg) { return 0; }
+ virtual bool set_fake_select_as_master_processor(uchar *arg) { return 0; }
/* To call bool function for all arguments */
struct bool_func_call_args
@@ -1179,6 +1192,16 @@ public:
Item* set_expr_cache(THD *thd, List<Item*> &depends_on);
virtual Item *get_cached_item() { return NULL; }
+ /**
+ Set the join tab index to the minimal (left-most) JOIN_TAB to which this
+ Item is attached.
+ */
+ virtual void set_join_tab_idx(uint join_tab_idx_arg)
+ {
+ if (join_tab_idx_arg < join_tab_idx)
+ join_tab_idx= join_tab_idx_arg;
+ }
+ virtual uint get_join_tab_idx() { return join_tab_idx; }
};