diff options
author | halfspawn <j.brauge@qualiac.com> | 2017-05-31 09:49:17 +0200 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.org> | 2017-08-11 14:47:36 +0400 |
commit | c9981fbee2436dcb893ff74e57a0f461a2020f92 (patch) | |
tree | 17bd91cbd8503834a22eb833fb6768d23c174823 /sql/item_create.cc | |
parent | 1a9e13d622382285d979e75774bdd1dde1660e2d (diff) | |
download | mariadb-git-c9981fbee2436dcb893ff74e57a0f461a2020f92.tar.gz |
MDEV-13003 - Oracle compatibility : Replace function
Diffstat (limited to 'sql/item_create.cc')
-rw-r--r-- | sql/item_create.cc | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/sql/item_create.cc b/sql/item_create.cc index 50f524bad40..e0bfe7a4402 100644 --- a/sql/item_create.cc +++ b/sql/item_create.cc @@ -2624,6 +2624,19 @@ protected: }; +class Create_func_replace_oracle : public Create_func_arg3 +{ +public: + virtual Item *create_3_arg(THD *thd, Item *arg1, Item *arg2, Item *arg3); + + static Create_func_replace_oracle s_singleton; + +protected: + Create_func_replace_oracle() {} + virtual ~Create_func_replace_oracle() {} +}; + + class Create_func_reverse : public Create_func_arg1 { public: @@ -6214,6 +6227,16 @@ Create_func_release_lock::create_1_arg(THD *thd, Item *arg1) } +Create_func_replace_oracle Create_func_replace_oracle::s_singleton; + +Item* +Create_func_replace_oracle::create_3_arg(THD *thd, Item *arg1, Item *arg2, + Item *arg3) +{ + return new (thd->mem_root) Item_func_replace_oracle(thd, arg1, arg2, arg3); +} + + Create_func_reverse Create_func_reverse::s_singleton; Item* @@ -6802,6 +6825,7 @@ static Native_func_registry func_array[] = { { C_STRING_WITH_LEN("CENTROID") }, GEOM_BUILDER(Create_func_centroid)}, { { C_STRING_WITH_LEN("CHARACTER_LENGTH") }, BUILDER(Create_func_char_length)}, { { C_STRING_WITH_LEN("CHAR_LENGTH") }, BUILDER(Create_func_char_length)}, + { { C_STRING_WITH_LEN("CHR") }, BUILDER(Create_func_chr)}, { { C_STRING_WITH_LEN("COERCIBILITY") }, BUILDER(Create_func_coercibility)}, { { C_STRING_WITH_LEN("COLUMN_CHECK") }, BUILDER(Create_func_dyncol_check)}, { { C_STRING_WITH_LEN("COLUMN_EXISTS") }, BUILDER(Create_func_dyncol_exists)}, @@ -6815,7 +6839,6 @@ static Native_func_registry func_array[] = { { C_STRING_WITH_LEN("CONV") }, BUILDER(Create_func_conv)}, { { C_STRING_WITH_LEN("CONVERT_TZ") }, BUILDER(Create_func_convert_tz)}, { { C_STRING_WITH_LEN("CONVEXHULL") }, GEOM_BUILDER(Create_func_convexhull)}, - { { C_STRING_WITH_LEN("CHR") }, BUILDER(Create_func_chr)}, { { C_STRING_WITH_LEN("COS") }, BUILDER(Create_func_cos)}, { { C_STRING_WITH_LEN("COT") }, BUILDER(Create_func_cot)}, { { C_STRING_WITH_LEN("CRC32") }, BUILDER(Create_func_crc32)}, @@ -6990,6 +7013,8 @@ static Native_func_registry func_array[] = { { 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)}, + { { C_STRING_WITH_LEN("REPLACE_ORACLE") }, + BUILDER(Create_func_replace_oracle)}, { { C_STRING_WITH_LEN("REVERSE") }, BUILDER(Create_func_reverse)}, { { C_STRING_WITH_LEN("ROUND") }, BUILDER(Create_func_round)}, { { C_STRING_WITH_LEN("RPAD") }, BUILDER(Create_func_rpad)}, |