1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-07 00:04:31 +03:00

MDEV-23004 When using GROUP BY with JSON_ARRAYAGG with joint table, the

square brackets are not included.

Item_func_json_arrayagg::copy_or_same() should be implemented.
This commit is contained in:
Alexey Botchkov
2021-06-24 13:28:28 +04:00
parent fc2ff46469
commit 98c7916f0f
4 changed files with 44 additions and 3 deletions

View File

@@ -560,15 +560,17 @@ public:
is_separator, limit_clause, row_limit, offset_limit)
{
}
Item_func_json_arrayagg(THD *thd, Item_func_json_arrayagg *item);
Item_func_json_arrayagg(THD *thd, Item_func_json_arrayagg *item) :
Item_func_group_concat(thd, item) {}
bool is_json_type() { return true; }
const char *func_name() const { return "json_arrayagg("; }
enum Sumfunctype sum_func() const {return JSON_ARRAYAGG_FUNC;}
String* val_str(String *str);
String* val_str(String *str) override;
Item *get_copy(THD *thd)
Item *copy_or_same(THD* thd) override;
Item *get_copy(THD *thd) override
{ return get_item_copy<Item_func_json_arrayagg>(thd, this); }
};