From cd16d6d518761d144844f9f6294744f2aa42c715 Mon Sep 17 00:00:00 2001 From: Alexey Botchkov Date: Fri, 17 May 2019 11:53:58 +0400 Subject: MDEV-13992 Implement JSON_MERGE_PATCH. JSON_MERGE_PATCH implemented. Added JSON_MERGE_PRESERVE as a synonim for the JSON_MERGE. --- sql/item_jsonfunc.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'sql/item_jsonfunc.h') diff --git a/sql/item_jsonfunc.h b/sql/item_jsonfunc.h index f2358168080..d7f804a1b60 100644 --- a/sql/item_jsonfunc.h +++ b/sql/item_jsonfunc.h @@ -291,12 +291,24 @@ public: Item_func_json_array(thd, list) {} String *val_str(String *); bool is_json_type() { return true; } - const char *func_name() const { return "json_merge"; } + const char *func_name() const { return "json_merge_preserve"; } Item *get_copy(THD *thd, MEM_ROOT *mem_root) { return get_item_copy(thd, mem_root, this); } }; +class Item_func_json_merge_patch: public Item_func_json_merge +{ +public: + Item_func_json_merge_patch(THD *thd, List &list): + Item_func_json_merge(thd, list) {} + const char *func_name() const { return "json_merge_patch"; } + String *val_str(String *); + Item *get_copy(THD *thd, MEM_ROOT *mem_root) + { return get_item_copy(thd, mem_root, this); } +}; + + class Item_func_json_length: public Item_int_func { protected: -- cgit v1.2.1