1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

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
This commit is contained in:
unknown
2007-06-08 13:42:10 +03:00
parent 5031a418e5
commit 2b274a60d5

View File

@@ -3101,8 +3101,6 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name,
alter_info->tablespace_op));
sprintf(new_name_buff,"%s/%s/%s%s",mysql_data_home, db, table_name, reg_ext);
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);
/* Rename a view */
if (frm_type == FRMTYPE_VIEW && !(alter_info->flags & ~ALTER_RENAME))