summaryrefslogtreecommitdiff
path: root/sql/item_create.cc
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mnogosearch.org>2013-10-15 10:26:08 +0400
committerAlexander Barkov <bar@mnogosearch.org>2013-10-15 10:26:08 +0400
commita9240dce9e2f32941611b4f1a52e3b30a1508fc2 (patch)
treeab7a7ec71341e29676d9a6bb039aeface4f88ce6 /sql/item_create.cc
parent2c0a073970cf5f1dc679b34bb13e7fc55109dfd0 (diff)
parenteb2c6f451392396ef2ca74f1dba761fc4459d171 (diff)
downloadmariadb-git-a9240dce9e2f32941611b4f1a52e3b30a1508fc2.tar.gz
Merge 10.0-base -> 10.0
Diffstat (limited to 'sql/item_create.cc')
-rw-r--r--sql/item_create.cc69
1 files changed, 69 insertions, 0 deletions
diff --git a/sql/item_create.cc b/sql/item_create.cc
index 9842f88e904..fa8c016d61b 100644
--- a/sql/item_create.cc
+++ b/sql/item_create.cc
@@ -2028,6 +2028,45 @@ protected:
};
+class Create_func_regexp_instr : public Create_func_arg2
+{
+public:
+ virtual Item *create_2_arg(THD *thd, Item *arg1, Item *arg2);
+
+ static Create_func_regexp_instr s_singleton;
+
+protected:
+ Create_func_regexp_instr() {}
+ virtual ~Create_func_regexp_instr() {}
+};
+
+
+class Create_func_regexp_replace : public Create_func_arg3
+{
+public:
+ virtual Item *create_3_arg(THD *thd, Item *arg1, Item *arg2, Item *arg3);
+
+ static Create_func_regexp_replace s_singleton;
+
+protected:
+ Create_func_regexp_replace() {}
+ virtual ~Create_func_regexp_replace() {}
+};
+
+
+class Create_func_regexp_substr : public Create_func_arg2
+{
+public:
+ virtual Item *create_2_arg(THD *thd, Item *arg1, Item *arg2);
+
+ static Create_func_regexp_substr s_singleton;
+
+protected:
+ Create_func_regexp_substr() {}
+ virtual ~Create_func_regexp_substr() {}
+};
+
+
class Create_func_radians : public Create_func_arg1
{
public:
@@ -4743,6 +4782,33 @@ Create_func_quote::create_1_arg(THD *thd, Item *arg1)
}
+Create_func_regexp_instr Create_func_regexp_instr::s_singleton;
+
+Item*
+Create_func_regexp_instr::create_2_arg(THD *thd, Item *arg1, Item *arg2)
+{
+ return new (thd->mem_root) Item_func_regexp_instr(arg1, arg2);
+}
+
+
+Create_func_regexp_replace Create_func_regexp_replace::s_singleton;
+
+Item*
+Create_func_regexp_replace::create_3_arg(THD *thd, Item *arg1, Item *arg2, Item *arg3)
+{
+ return new (thd->mem_root) Item_func_regexp_replace(arg1, arg2, arg3);
+}
+
+
+Create_func_regexp_substr Create_func_regexp_substr::s_singleton;
+
+Item*
+Create_func_regexp_substr::create_2_arg(THD *thd, Item *arg1, Item *arg2)
+{
+ return new (thd->mem_root) Item_func_regexp_substr(arg1, arg2);
+}
+
+
Create_func_radians Create_func_radians::s_singleton;
Item*
@@ -5536,6 +5602,9 @@ static Native_func_registry func_array[] =
{ { C_STRING_WITH_LEN("POW") }, BUILDER(Create_func_pow)},
{ { C_STRING_WITH_LEN("POWER") }, BUILDER(Create_func_pow)},
{ { C_STRING_WITH_LEN("QUOTE") }, BUILDER(Create_func_quote)},
+ { { C_STRING_WITH_LEN("REGEXP_INSTR") }, BUILDER(Create_func_regexp_instr)},
+ { { C_STRING_WITH_LEN("REGEXP_REPLACE") }, BUILDER(Create_func_regexp_replace)},
+ { { C_STRING_WITH_LEN("REGEXP_SUBSTR") }, BUILDER(Create_func_regexp_substr)},
{ { C_STRING_WITH_LEN("RADIANS") }, BUILDER(Create_func_radians)},
{ { C_STRING_WITH_LEN("RAND") }, BUILDER(Create_func_rand)},
{ { C_STRING_WITH_LEN("RELEASE_LOCK") }, BUILDER(Create_func_release_lock)},