summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <igor@rurik.mysql.com>2006-04-07 10:19:09 -0700
committerunknown <igor@rurik.mysql.com>2006-04-07 10:19:09 -0700
commite93fe1e4c51fe6a593e5820854aa55df105e7934 (patch)
treeae8536b9754e50e2d1a9a723b5db3b45c335670f /sql
parentf7b039cc5060313390f31098b336d4fa811ab5f8 (diff)
parent998b9d8b14892a91ad32fd1be83f9d60fddba98d (diff)
downloadmariadb-git-e93fe1e4c51fe6a593e5820854aa55df105e7934.tar.gz
Merge ibabaev@bk-internal.mysql.com:/home/bk/mysql-5.0
into rurik.mysql.com:/home/igor/mysql-5.0
Diffstat (limited to 'sql')
-rw-r--r--sql/item.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/sql/item.cc b/sql/item.cc
index e1bde85e200..e3da950ceef 100644
--- a/sql/item.cc
+++ b/sql/item.cc
@@ -3054,6 +3054,7 @@ static Item** find_field_in_group_list(Item *find_item, ORDER *group_list)
int found_match_degree= 0;
Item_ident *cur_field;
int cur_match_degree= 0;
+ char name_buff[NAME_LEN+1];
if (find_item->type() == Item::FIELD_ITEM ||
find_item->type() == Item::REF_ITEM)
@@ -3065,6 +3066,14 @@ static Item** find_field_in_group_list(Item *find_item, ORDER *group_list)
else
return NULL;
+ if (db_name && lower_case_table_names)
+ {
+ /* Convert database to lower case for comparison */
+ strmake(name_buff, db_name, sizeof(name_buff)-1);
+ my_casedn_str(files_charset_info, name_buff);
+ db_name= name_buff;
+ }
+
DBUG_ASSERT(field_name != 0);
for (ORDER *cur_group= group_list ; cur_group ; cur_group= cur_group->next)