Commit 2b274a60 authored by unknown's avatar unknown

Bug #28754: RPM builds differ from tar.gz in "ALTER ... RENAME" on views

 When constructing the path to the original .frm file ALTER .. RENAME
 was unnecessary (and incorrectly) lowercasing the whole path when not 
 on a case-insensitive filesystem.
 This path should not be modified because of lower_case_table_names
 as it is already in the correct case according to that setting.
 Fixed by removing the lowercasing.
 Unfortunately testing this would require running the tests on a case
 sensitive filesystem in a directory that has uppercase letters.
 This cannot be guaranteed in all setups so no test case added.


sql/sql_table.cc:
  Bug #28754: don't downcase the .frm path
parent 5031a418
...@@ -3101,8 +3101,6 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name, ...@@ -3101,8 +3101,6 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name,
alter_info->tablespace_op)); alter_info->tablespace_op));
sprintf(new_name_buff,"%s/%s/%s%s",mysql_data_home, db, table_name, reg_ext); sprintf(new_name_buff,"%s/%s/%s%s",mysql_data_home, db, table_name, reg_ext);
unpack_filename(new_name_buff, new_name_buff); unpack_filename(new_name_buff, new_name_buff);
if (lower_case_table_names != 2)
my_casedn_str(files_charset_info, new_name_buff);
frm_type= mysql_frm_type(thd, new_name_buff, &table_type); frm_type= mysql_frm_type(thd, new_name_buff, &table_type);
/* Rename a view */ /* Rename a view */
if (frm_type == FRMTYPE_VIEW && !(alter_info->flags & ~ALTER_RENAME)) if (frm_type == FRMTYPE_VIEW && !(alter_info->flags & ~ALTER_RENAME))
......
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