Commit dedea9b6 authored by unknown's avatar unknown

Portablity fix for system with case insenstive table names. (Without this...

Portablity fix for system with case insenstive table names. (Without this ALTER TABLE can fail for InnoDB)


parent 33e6b2af
...@@ -2830,6 +2830,9 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name, ...@@ -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); db_create_options=table->db_create_options & ~(HA_OPTION_PACK_RECORD);
my_snprintf(tmp_name, sizeof(tmp_name), "%s-%lx_%lx", tmp_file_prefix, my_snprintf(tmp_name, sizeof(tmp_name), "%s-%lx_%lx", tmp_file_prefix,
current_pid, thd->thread_id); 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; create_info->db_type=new_db_type;
if (!create_info->comment) if (!create_info->comment)
create_info->comment=table->comment; create_info->comment=table->comment;
......
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