diff options
Diffstat (limited to 'sql/sql_rename.cc')
-rw-r--r-- | sql/sql_rename.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sql/sql_rename.cc b/sql/sql_rename.cc index 4c164a3a621..4e576602a1a 100644 --- a/sql/sql_rename.cc +++ b/sql/sql_rename.cc @@ -27,7 +27,6 @@ #include "sql_table.h" // write_bin_log #include "sql_view.h" // mysql_frm_type, mysql_rename_view #include "sql_trigger.h" -#include "lock.h" // MYSQL_OPEN_SKIP_TEMPORARY #include "sql_base.h" // tdc_remove_table, lock_table_names, #include "sql_handler.h" // mysql_ha_rm_tables #include "sql_statistics.h" @@ -222,14 +221,14 @@ do_rename_temporary(THD *thd, TABLE_LIST *ren_table, TABLE_LIST *new_table, new_alias= (lower_case_table_names == 2) ? new_table->alias : new_table->table_name; - if (find_temporary_table(thd, new_table)) + if (thd->find_temporary_table(new_table, THD::TMP_TABLE_ANY)) { my_error(ER_TABLE_EXISTS_ERROR, MYF(0), new_alias); DBUG_RETURN(1); // This can't be skipped } - DBUG_RETURN(rename_temporary_table(thd, ren_table->table, + DBUG_RETURN(thd->rename_temporary_table(ren_table->table, new_table->db, new_alias)); } |