summaryrefslogtreecommitdiff
path: root/sql/sql_db.cc
diff options
context:
space:
mode:
authorunknown <monty@mashka.mysql.fi>2002-12-21 10:57:53 +0200
committerunknown <monty@mashka.mysql.fi>2002-12-21 10:57:53 +0200
commit4e01321b5cca6dccd48d812193fa591ceb705d7b (patch)
tree97ea484b1af02d82effc0cfe272b2f21aa05f308 /sql/sql_db.cc
parent4f83e3fa0a30e739208c59cbf2378afc5f5df9b2 (diff)
downloadmariadb-git-4e01321b5cca6dccd48d812193fa591ceb705d7b.tar.gz
Moved lower_case_table_name check to right place.
Diffstat (limited to 'sql/sql_db.cc')
-rw-r--r--sql/sql_db.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/sql/sql_db.cc b/sql/sql_db.cc
index 338d3161bd4..0be1b7b0411 100644
--- a/sql/sql_db.cc
+++ b/sql/sql_db.cc
@@ -323,9 +323,6 @@ bool mysql_change_db(THD *thd,const char *name)
uint db_access;
DBUG_ENTER("mysql_change_db");
- if (lower_case_table_names)
- casedn_str(dbname);
-
if (!dbname || !(length=strip_sp(dbname)))
{
x_free(dbname); /* purecov: inspected */
@@ -338,6 +335,8 @@ bool mysql_change_db(THD *thd,const char *name)
x_free(dbname);
DBUG_RETURN(1);
}
+ if (lower_case_table_names)
+ casedn_str(dbname);
DBUG_PRINT("general",("Use database: %s", dbname));
if (test_all_bits(thd->master_access,DB_ACLS))
db_access=DB_ACLS;