1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-11297: Add support for LIMIT clause in GROUP_CONCAT()

This commit is contained in:
Varun Gupta
2017-12-08 12:21:26 +05:30
parent 3aa618a969
commit 6d63a03490
9 changed files with 6287 additions and 12 deletions

View File

@@ -1747,6 +1747,16 @@ class Item_func_group_concat : public Item_sum
bool always_null;
bool force_copy_fields;
bool no_appended;
/** Limits the rows in the result */
Item *row_limit;
/** Skips a particular number of rows in from the result*/
Item *offset_limit;
bool limit_clause;
/* copy of the offset limit */
ulonglong copy_offset_limit;
/*copy of the row limit */
ulonglong copy_row_limit;
/*
Following is 0 normal object and pointer to original one for copy
(to correctly free resources)
@@ -1763,7 +1773,8 @@ class Item_func_group_concat : public Item_sum
public:
Item_func_group_concat(THD *thd, Name_resolution_context *context_arg,
bool is_distinct, List<Item> *is_select,
const SQL_I_List<ORDER> &is_order, String *is_separator);
const SQL_I_List<ORDER> &is_order, String *is_separator,
bool limit_clause, Item *row_limit, Item *offset_limit);
Item_func_group_concat(THD *thd, Item_func_group_concat *item);
~Item_func_group_concat();