Commit ca59bf47 authored by unknown's avatar unknown

Bug #4792 lower_case_table_names does not resolve db.tbl.column in SELECT list

sql_base.cc:
  Added code to lowercase database name in insert_fields when lower_case_table_names=1. This fixes bug# 4792


sql/sql_base.cc:
  Added code to lowercase database name in insert_fields when lower_case_table_names=1. This fixes bug# 4792
parent b15ee678
......@@ -2062,9 +2062,20 @@ bool
insert_fields(THD *thd,TABLE_LIST *tables, const char *db_name,
const char *table_name, List_iterator<Item> *it)
{
char name_buff[NAME_LEN+1];
uint found;
DBUG_ENTER("insert_fields");
if (db_name && lower_case_table_names)
{
/* convert database to lower case for comparison */
strmake( name_buff, db_name, sizeof(name_buff)-1 );
casedn_str( name_buff );
db_name = name_buff;
}
found=0;
for (; tables ; tables=tables->next)
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment