diff options
author | Alexey Botchkov <holyfoot@askmonty.org> | 2017-02-06 06:47:48 +0400 |
---|---|---|
committer | Alexey Botchkov <holyfoot@askmonty.org> | 2017-02-06 06:47:48 +0400 |
commit | abf7582112645ef8decc549eb662a07072b5cd32 (patch) | |
tree | 1082c1f2c8e32120cee647e0cd0374bd67c37b37 /sql/item_jsonfunc.h | |
parent | e51b015fc354ec40c8430d4f4ea6346bc9a8e07b (diff) | |
download | mariadb-git-abf7582112645ef8decc549eb662a07072b5cd32.tar.gz |
MDEV-11557 port MySQL-5.7 JSON tests to MariaDB.
Fixes for issues found.
Diffstat (limited to 'sql/item_jsonfunc.h')
-rw-r--r-- | sql/item_jsonfunc.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/sql/item_jsonfunc.h b/sql/item_jsonfunc.h index 2ce94985a00..941123041d2 100644 --- a/sql/item_jsonfunc.h +++ b/sql/item_jsonfunc.h @@ -427,4 +427,30 @@ public: }; +class Item_func_json_format: public Item_str_func +{ +public: + enum formats + { + NONE, + COMPACT, + LOOSE, + DETAILED + }; +protected: + formats fmt; + String tmp_js; +public: + Item_func_json_format(THD *thd, Item *js, formats format): + Item_str_func(thd, js), fmt(format) {} + Item_func_json_format(THD *thd, Item *js, Item *tabsize): + Item_str_func(thd, js, tabsize), fmt(DETAILED) {} + const char *func_name() const; + void fix_length_and_dec(); + String *val_str(String *str); + Item *get_copy(THD *thd, MEM_ROOT *mem_root) + { return get_item_copy<Item_func_json_format>(thd, mem_root, this); } +}; + + #endif /* ITEM_JSONFUNC_INCLUDED */ |