summaryrefslogtreecommitdiff
path: root/sql/sql_base.cc
diff options
context:
space:
mode:
authorunknown <bell@sanja.is.com.ua>2004-05-14 18:55:24 +0300
committerunknown <bell@sanja.is.com.ua>2004-05-14 18:55:24 +0300
commitc585b669d665566365bc56d58d5f311af8860ff1 (patch)
treee80e519af3e0f13832739ea11cb94c83d5efedd3 /sql/sql_base.cc
parentebaa2a56246675531454c1f6624b695b3c31514e (diff)
downloadmariadb-git-c585b669d665566365bc56d58d5f311af8860ff1.tar.gz
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
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r--sql/sql_base.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index 3a18b7eaabc..14a54a410a2 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -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)
{