diff options
author | Alexander Barkov <bar@mnogosearch.org> | 2013-10-15 10:26:08 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mnogosearch.org> | 2013-10-15 10:26:08 +0400 |
commit | a9240dce9e2f32941611b4f1a52e3b30a1508fc2 (patch) | |
tree | ab7a7ec71341e29676d9a6bb039aeface4f88ce6 /sql/item_strfunc.h | |
parent | 2c0a073970cf5f1dc679b34bb13e7fc55109dfd0 (diff) | |
parent | eb2c6f451392396ef2ca74f1dba761fc4459d171 (diff) | |
download | mariadb-git-a9240dce9e2f32941611b4f1a52e3b30a1508fc2.tar.gz |
Merge 10.0-base -> 10.0
Diffstat (limited to 'sql/item_strfunc.h')
-rw-r--r-- | sql/item_strfunc.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/sql/item_strfunc.h b/sql/item_strfunc.h index 582fa05b4a1..9ae0c92673f 100644 --- a/sql/item_strfunc.h +++ b/sql/item_strfunc.h @@ -217,6 +217,49 @@ public: }; +class Item_func_regexp_replace :public Item_str_func +{ + Regexp_processor_pcre re; + bool append_replacement(String *str, + const LEX_CSTRING *source, + const LEX_CSTRING *replace); +public: + Item_func_regexp_replace(Item *a, Item *b, Item *c) + :Item_str_func(a, b, c) + {} + void cleanup() + { + DBUG_ENTER("Item_func_regex::cleanup"); + Item_str_func::cleanup(); + re.cleanup(); + DBUG_VOID_RETURN; + } + String *val_str(String *str); + void fix_length_and_dec(); + const char *func_name() const { return "regexp_replace"; } +}; + + +class Item_func_regexp_substr :public Item_str_func +{ + Regexp_processor_pcre re; +public: + Item_func_regexp_substr(Item *a, Item *b) + :Item_str_func(a, b) + {} + void cleanup() + { + DBUG_ENTER("Item_func_regex::cleanup"); + Item_str_func::cleanup(); + re.cleanup(); + DBUG_VOID_RETURN; + } + String *val_str(String *str); + void fix_length_and_dec(); + const char *func_name() const { return "regexp_substr"; } +}; + + class Item_func_insert :public Item_str_func { String tmp_value; |