MDEV-31276 Wrong warnings on 2-nd execution of PS for query with GROUP_CONCAT

If a query with GROUP_CONCAT is executed then the server reports a warning
every time when the length of the result of this function exceeds the set
value of the system variable group_concat_max_len. This bug led to the set
of warnings from the second execution of the prepared statement that did
not coincide with the one from the first execution if the executed query
was a grouping query over a join of tables using GROUP_CONCAT function and
join cache was not allowed to be employed.
The descrepancy of the sets of warnings was due to lack of cleanup for
Item_func_group_concat::row_count after execution of the query.

Approved by Oleksandr Byelkin <sanja@mariadb.com>
This commit is contained in:
Igor Babaev 2024-02-22 22:58:52 -08:00
commit 8778a83eee
5 changed files with 116 additions and 15 deletions

View file

@ -4056,6 +4056,7 @@ void Item_func_group_concat::cleanup()
unique_filter= NULL;
}
}
row_count= 0;
DBUG_ASSERT(tree == 0);
}
/*