summaryrefslogtreecommitdiff
path: root/sql/sql_table.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_table.cc')
-rw-r--r--sql/sql_table.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index 0f4abb48f33..9e1a8151e3a 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -2780,8 +2780,11 @@ bool mysql_create_like_table(THD* thd, TABLE_LIST* table, TABLE_LIST *src_table,
strxmov(src_path, (*tmp_table)->s->path, reg_ext, NullS);
else
{
- strxmov(src_path, mysql_data_home, "/", src_table->db, "/",
- src_table->table_name, reg_ext, NullS);
+ char *tablename_pos= strxmov(src_path, mysql_data_home, "/", NullS);
+ strxmov(tablename_pos, src_table->db, "/", src_table->table_name,
+ reg_ext, NullS);
+ if (lower_case_table_names)
+ my_casedn_str(files_charset_info, tablename_pos);
/* Resolve symlinks (for windows) */
fn_format(src_path, src_path, "", "", MYF(MY_UNPACK_FILENAME));
if (access(src_path, F_OK))