diff options
author | gkodinov@dl145s.mysql.com <> | 2006-10-20 10:12:38 +0200 |
---|---|---|
committer | gkodinov@dl145s.mysql.com <> | 2006-10-20 10:12:38 +0200 |
commit | a0c0bbd8ae0725bd51178cb55dad72ca4dc89904 (patch) | |
tree | 2e80a4d9713e0245eb5222b0989f5b0d0c91e07a /sql/sql_rename.cc | |
parent | aaed398254fdc1338d777b142934b4fb7eb9d078 (diff) | |
download | mariadb-git-a0c0bbd8ae0725bd51178cb55dad72ca4dc89904.tar.gz |
sql_rename.cc, sql_table.cc, type_decimal.result, mix2_myisam.result:
merge fixes
Diffstat (limited to 'sql/sql_rename.cc')
-rw-r--r-- | sql/sql_rename.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sql/sql_rename.cc b/sql/sql_rename.cc index 8b04345640b..bf2e2d506cd 100644 --- a/sql/sql_rename.cc +++ b/sql/sql_rename.cc @@ -165,7 +165,7 @@ do_rename(THD *thd, TABLE_LIST *ren_table, char *new_db, char *new_table_name, else { old_alias= ren_table->table_name; - new_alias= new_table_table_name; + new_alias= new_table_name; } build_table_filename(name, sizeof(name), new_db, new_alias, reg_ext, 0); @@ -182,8 +182,10 @@ do_rename(THD *thd, TABLE_LIST *ren_table, char *new_db, char *new_table_name, { case FRMTYPE_TABLE: { - if (!(rc= mysql_rename_table(table_type, ren_table->db, old_alias, - new_db, new_alias))) + if (!(rc= mysql_rename_table(ha_resolve_by_legacy_type(thd, + table_type), + ren_table->db, old_alias, + new_db, new_alias, 0))) { if ((rc= Table_triggers_list::change_table_name(thd, ren_table->db, old_alias, @@ -204,7 +206,6 @@ do_rename(THD *thd, TABLE_LIST *ren_table, char *new_db, char *new_table_name, } } break; - } case FRMTYPE_VIEW: /* change of schema is not allowed */ if (strcmp(ren_table->db, new_db)) |