summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2004-05-07 06:34:44 +0300
committerunknown <monty@mysql.com>2004-05-07 06:34:44 +0300
commitdedea9b66b3cfcc4d9fa1b89fdfb30e582f5fff8 (patch)
treea616bcd50def50a47447079c535069f45e0e5b68 /sql
parent33e6b2af85ec92a65669af5330f187f1d39e2b7a (diff)
downloadmariadb-git-dedea9b66b3cfcc4d9fa1b89fdfb30e582f5fff8.tar.gz
Portablity fix for system with case insenstive table names. (Without this ALTER TABLE can fail for InnoDB)
Diffstat (limited to 'sql')
-rw-r--r--sql/sql_table.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index 0d0be1b7e10..abf773b345f 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -2830,6 +2830,9 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name,
db_create_options=table->db_create_options & ~(HA_OPTION_PACK_RECORD);
my_snprintf(tmp_name, sizeof(tmp_name), "%s-%lx_%lx", tmp_file_prefix,
current_pid, thd->thread_id);
+ /* Safety fix for innodb */
+ if (lower_case_table_names)
+ my_casedn_str(system_charset_info, tmp_name);
create_info->db_type=new_db_type;
if (!create_info->comment)
create_info->comment=table->comment;