mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
check of item name presence in find_item_in_list (Bug #3752)
mysql-test/r/func_gconcat.result: test of Bug #3752 mysql-test/t/func_gconcat.test: test of Bug #3752 sql/sql_base.cc: check of item name presence in find_item_in_list
This commit is contained in:
@ -2096,7 +2096,14 @@ find_item_in_list(Item *find, List<Item> &items, uint *counter,
|
||||
if (field_name && item->type() == Item::FIELD_ITEM)
|
||||
{
|
||||
Item_field *item_field= (Item_field*) item;
|
||||
if (!my_strcasecmp(system_charset_info, item_field->name, field_name))
|
||||
/*
|
||||
In case of group_concat() with ORDER BY condition in the QUERY
|
||||
item_field can be field of temporary table without item name
|
||||
(if this field created from expression argument of group_concat()),
|
||||
=> we have to check presence of name before compare
|
||||
*/
|
||||
if (item_field->name &&
|
||||
!my_strcasecmp(system_charset_info, item_field->name, field_name))
|
||||
{
|
||||
if (!table_name)
|
||||
{
|
||||
|
Reference in New Issue
Block a user