Commit 3da94694 authored by unknown's avatar unknown

follow-up to bug #2628: attempt to make

alter table rename a bit more efficient in case of
lower_case_table_names.

parent cd361b41
...@@ -1478,8 +1478,12 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name, ...@@ -1478,8 +1478,12 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name,
alias= (lower_case_table_names == 2) ? table_list->alias : table_name; alias= (lower_case_table_names == 2) ? table_list->alias : table_name;
db=table_list->db; db=table_list->db;
if (!new_db || !strcmp(new_db, db)) if (!new_db ||
new_db=db; lower_case_table_names && !my_strcasecmp(new_db, db) ||
!lower_case_table_names && !strcmp(new_db, db))
{
new_db= db;
}
used_fields=create_info->used_fields; used_fields=create_info->used_fields;
mysql_ha_closeall(thd, table_list); mysql_ha_closeall(thd, table_list);
......
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