From f96200fd1dedaded8d261ad1251bc0e9779203cd Mon Sep 17 00:00:00 2001 From: "wax@kishkin.ru" <> Date: Tue, 3 Jun 2003 17:02:51 +0600 Subject: [PATCH] BUG correct bug with empty table --- sql/item_sum.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sql/item_sum.cc b/sql/item_sum.cc index 8bd3e36b5db..60976ab993a 100644 --- a/sql/item_sum.cc +++ b/sql/item_sum.cc @@ -1582,6 +1582,8 @@ void Item_func_group_concat::reset() bool Item_func_group_concat::add() { + if (always_null) + return 0; copy_fields(tmp_table_param); copy_funcs(tmp_table_param->items_to_copy); @@ -1676,6 +1678,7 @@ bool Item_func_group_concat::setup(THD *thd) /* all not constant fields are push to list and create temp table */ + always_null= 0; for (uint i= 0; i < arg_count; i++) { Item *item= args[i]; @@ -1688,6 +1691,8 @@ bool Item_func_group_concat::setup(THD *thd) always_null= 1; } } + if (always_null) + return 0; List all_fields(list); if (arg_count_order)