diff options
author | ram@gw.mysql.r18.ru <> | 2005-01-21 15:14:31 +0400 |
---|---|---|
committer | ram@gw.mysql.r18.ru <> | 2005-01-21 15:14:31 +0400 |
commit | 9c3c566fcbc4f6f1452fc7c5440890d9d2e78efc (patch) | |
tree | 782886f333ab37f44d0491dc8c624d5ab7832bd3 /sql/sql_table.cc | |
parent | e0df86cd357e92215ac78c5563d1cafd217fae9a (diff) | |
download | mariadb-git-9c3c566fcbc4f6f1452fc7c5440890d9d2e78efc.tar.gz |
A fix (bug #7261: Alter table loses temp table with lower_case_table_names=2).
Diffstat (limited to 'sql/sql_table.cc')
-rw-r--r-- | sql/sql_table.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc index c3bfbe086f1..e01df8a3fcd 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -3231,7 +3231,8 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name, } /* Remove link to old table and rename the new one */ close_temporary_table(thd,table->table_cache_key,table_name); - if (rename_temporary_table(thd, new_table, new_db, new_alias)) + /* Should pass the 'new_name' as we store table name in the cache */ + if (rename_temporary_table(thd, new_table, new_db, new_name)) { // Fatal error close_temporary_table(thd,new_db,tmp_name); my_free((gptr) new_table,MYF(0)); |