mirror of
https://github.com/MariaDB/server.git
synced 2026-04-28 11:15:33 +02:00
Fixed MDEV-5617: mysqld crashes when running a query with ONLY_FULL_GROUP_BY
Problem was that we used cache_table in some cases where it was not initialized mysql-test/r/func_group.result: Added test case mysql-test/t/func_group.test: Added test case sql/item.cc: Don't use cached_table if not set sql/item_sum.cc: Don't use cached_table
This commit is contained in:
parent
2d48e9f11c
commit
1bdf2151da
4 changed files with 32 additions and 8 deletions
|
|
@ -261,7 +261,7 @@ bool Item_sum::check_sum_func(THD *thd, Item **ref)
|
|||
List_iterator<Item_field> of(outer_fields);
|
||||
while ((field= of++))
|
||||
{
|
||||
SELECT_LEX *sel= field->cached_table->select_lex;
|
||||
SELECT_LEX *sel= field->field->table->pos_in_table_list->select_lex;
|
||||
if (sel->nest_level < aggr_level)
|
||||
{
|
||||
if (in_sum_func)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue