summaryrefslogtreecommitdiff
path: root/sql/item_cmpfunc.h
diff options
context:
space:
mode:
authorunknown <sanja@askmonty.org>2013-04-18 22:22:04 +0300
committerunknown <sanja@askmonty.org>2013-04-18 22:22:04 +0300
commit9441e536535af3e71aaa81801645ab42bd07e89f (patch)
tree4479a5d77e53380b7bd2d9b3d4db3c271ea6b40a /sql/item_cmpfunc.h
parent8c71e7a38358c79e1b5b9072fa7407cec3cfd273 (diff)
downloadmariadb-git-9441e536535af3e71aaa81801645ab42bd07e89f.tar.gz
MDEV-4345
Sampling of selectivity of LIKE predicate.
Diffstat (limited to 'sql/item_cmpfunc.h')
-rw-r--r--sql/item_cmpfunc.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h
index 81598ba96c8..ab4219564fe 100644
--- a/sql/item_cmpfunc.h
+++ b/sql/item_cmpfunc.h
@@ -1487,8 +1487,9 @@ class Item_func_like :public Item_bool_func2
enum { alphabet_size = 256 };
Item *escape_item;
-
+
bool escape_used_in_parsing;
+ bool use_sampling;
public:
int escape;
@@ -1496,7 +1497,7 @@ public:
Item_func_like(Item *a,Item *b, Item *escape_arg, bool escape_used)
:Item_bool_func2(a,b), canDoTurboBM(FALSE), pattern(0), pattern_len(0),
bmGs(0), bmBc(0), escape_item(escape_arg),
- escape_used_in_parsing(escape_used) {}
+ escape_used_in_parsing(escape_used), use_sampling(0) {}
longlong val_int();
enum Functype functype() const { return LIKE_FUNC; }
optimize_type select_optimize() const;
@@ -1504,6 +1505,8 @@ public:
const char *func_name() const { return "like"; }
bool fix_fields(THD *thd, Item **ref);
void cleanup();
+
+ bool find_selective_predicates_list_processor(uchar *arg);
};
@@ -1914,6 +1917,7 @@ public:
Item *neg_transformer(THD *thd);
void mark_as_condition_AND_part(TABLE_LIST *embedding);
virtual uint exists2in_reserved_items() { return list.elements; };
+ bool walk_top_and(Item_processor processor, uchar *arg);
};
inline bool is_cond_and(Item *item)