diff options
author | Galina Shalygina <galashalygina@gmail.com> | 2016-05-01 22:29:47 +0300 |
---|---|---|
committer | Galina Shalygina <galashalygina@gmail.com> | 2016-08-23 00:39:12 +0300 |
commit | eb2c1474752a5f743db638d5b06612c9e3f07f74 (patch) | |
tree | 2cbdafbe8617bf72f8addf3cfcdd53b10c7cbe8e /sql/item_xmlfunc.cc | |
parent | 8b94aec11af19fc711ed48f13410986814bc51a0 (diff) | |
download | mariadb-git-eb2c1474752a5f743db638d5b06612c9e3f07f74.tar.gz |
The consolidated patch for mdev-9197.
Diffstat (limited to 'sql/item_xmlfunc.cc')
-rw-r--r-- | sql/item_xmlfunc.cc | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/sql/item_xmlfunc.cc b/sql/item_xmlfunc.cc index ba17d2c48c3..1736f7d4990 100644 --- a/sql/item_xmlfunc.cc +++ b/sql/item_xmlfunc.cc @@ -250,6 +250,8 @@ public: Item_nodeset_func(thd, pxml) {} const char *func_name() const { return "xpath_rootelement"; } String *val_nodeset(String *nodeset); + Item *get_copy(THD *thd, MEM_ROOT *mem_root) + { return get_item_copy<Item_nodeset_func_rootelement>(thd, mem_root, this); } }; @@ -261,6 +263,8 @@ public: Item_nodeset_func(thd, a, b, pxml) {} const char *func_name() const { return "xpath_union"; } String *val_nodeset(String *nodeset); + Item *get_copy(THD *thd, MEM_ROOT *mem_root) + { return get_item_copy<Item_nodeset_func_union>(thd, mem_root, this); } }; @@ -293,6 +297,8 @@ public: Item_nodeset_func_axisbyname(thd, a, n_arg, l_arg, pxml) {} const char *func_name() const { return "xpath_selfbyname"; } String *val_nodeset(String *nodeset); + Item *get_copy(THD *thd, MEM_ROOT *mem_root) + { return get_item_copy<Item_nodeset_func_selfbyname>(thd, mem_root, this); } }; @@ -305,6 +311,8 @@ public: Item_nodeset_func_axisbyname(thd, a, n_arg, l_arg, pxml) {} const char *func_name() const { return "xpath_childbyname"; } String *val_nodeset(String *nodeset); + Item *get_copy(THD *thd, MEM_ROOT *mem_root) + { return get_item_copy<Item_nodeset_func_childbyname>(thd, mem_root, this); } }; @@ -319,6 +327,8 @@ public: need_self(need_self_arg) {} const char *func_name() const { return "xpath_descendantbyname"; } String *val_nodeset(String *nodeset); + Item *get_copy(THD *thd, MEM_ROOT *mem_root) + { return get_item_copy<Item_nodeset_func_descendantbyname>(thd, mem_root, this); } }; @@ -333,6 +343,8 @@ public: need_self(need_self_arg) {} const char *func_name() const { return "xpath_ancestorbyname"; } String *val_nodeset(String *nodeset); + Item *get_copy(THD *thd, MEM_ROOT *mem_root) + { return get_item_copy<Item_nodeset_func_ancestorbyname>(thd, mem_root, this); } }; @@ -345,6 +357,8 @@ public: Item_nodeset_func_axisbyname(thd, a, n_arg, l_arg, pxml) {} const char *func_name() const { return "xpath_parentbyname"; } String *val_nodeset(String *nodeset); + Item *get_copy(THD *thd, MEM_ROOT *mem_root) + { return get_item_copy<Item_nodeset_func_parentbyname>(thd, mem_root, this); } }; @@ -357,6 +371,8 @@ public: Item_nodeset_func_axisbyname(thd, a, n_arg, l_arg, pxml) {} const char *func_name() const { return "xpath_attributebyname"; } String *val_nodeset(String *nodeset); + Item *get_copy(THD *thd, MEM_ROOT *mem_root) + { return get_item_copy<Item_nodeset_func_attributebyname>(thd, mem_root, this); } }; @@ -372,6 +388,8 @@ public: Item_nodeset_func(thd, a, b, pxml) {} const char *func_name() const { return "xpath_predicate"; } String *val_nodeset(String *nodeset); + Item *get_copy(THD *thd, MEM_ROOT *mem_root) + { return get_item_copy<Item_nodeset_func_predicate>(thd, mem_root, this); } }; @@ -383,6 +401,8 @@ public: Item_nodeset_func(thd, a, b, pxml) { } const char *func_name() const { return "xpath_elementbyindex"; } String *val_nodeset(String *nodeset); + Item *get_copy(THD *thd, MEM_ROOT *mem_root) + { return get_item_copy<Item_nodeset_func_elementbyindex>(thd, mem_root, this); } }; @@ -422,6 +442,8 @@ public: } return args[0]->val_real() ? 1 : 0; } + Item *get_copy(THD *thd, MEM_ROOT *mem_root) + { return get_item_copy<Item_xpath_cast_bool>(thd, mem_root, this); } }; @@ -434,6 +456,8 @@ public: Item_xpath_cast_number(THD *thd, Item *a): Item_real_func(thd, a) {} const char *func_name() const { return "xpath_cast_number"; } virtual double val_real() { return args[0]->val_real(); } + Item *get_copy(THD *thd, MEM_ROOT *mem_root) + { return get_item_copy<Item_xpath_cast_number>(thd, mem_root, this); } }; @@ -449,6 +473,8 @@ public: String *val_nodeset(String *res) { return string_cache; } void fix_length_and_dec() { max_length= MAX_BLOB_WIDTH; } + Item *get_copy(THD *thd, MEM_ROOT *mem_root) + { return get_item_copy<Item_nodeset_context_cache>(thd, mem_root, this); } }; @@ -468,6 +494,8 @@ public: return ((MY_XPATH_FLT*)flt->ptr())->pos + 1; return 0; } + Item *get_copy(THD *thd, MEM_ROOT *mem_root) + { return get_item_copy<Item_func_xpath_position>(thd, mem_root, this); } }; @@ -489,6 +517,8 @@ public: return predicate_supplied_context_size; return res->length() / sizeof(MY_XPATH_FLT); } + Item *get_copy(THD *thd, MEM_ROOT *mem_root) + { return get_item_copy<Item_func_xpath_count>(thd, mem_root, this); } }; @@ -532,6 +562,8 @@ public: } return sum; } + Item *get_copy(THD *thd, MEM_ROOT *mem_root) + { return get_item_copy<Item_func_xpath_sum>(thd, mem_root, this); } }; @@ -608,6 +640,8 @@ public: } return 0; } + Item *get_copy(THD *thd, MEM_ROOT *mem_root) + { return get_item_copy<Item_nodeset_to_const_comparator>(thd, mem_root, this); } }; |