Fix for a bug with mysql_select_db() on manually created

database and lower case table names.
parent 53ac2613
...@@ -323,6 +323,9 @@ bool mysql_change_db(THD *thd,const char *name) ...@@ -323,6 +323,9 @@ bool mysql_change_db(THD *thd,const char *name)
uint db_access; uint db_access;
DBUG_ENTER("mysql_change_db"); DBUG_ENTER("mysql_change_db");
if (lower_case_table_names)
casedn_str(dbname);
if (!dbname || !(length=strip_sp(dbname))) if (!dbname || !(length=strip_sp(dbname)))
{ {
x_free(dbname); /* purecov: inspected */ x_free(dbname); /* purecov: inspected */
......
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