diff options
Diffstat (limited to 'sql/handler.cc')
-rw-r--r-- | sql/handler.cc | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/sql/handler.cc b/sql/handler.cc index 939aee4fc6e..7318de1c503 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -1773,13 +1773,17 @@ int handler::delete_table(const char *name) int handler::rename_table(const char * from, const char * to) { - DBUG_ENTER("handler::rename_table"); - for (const char **ext=bas_ext(); *ext ; ext++) + int error= 0; + for (const char **ext= bas_ext(); *ext ; ext++) { - if (rename_file_ext(from,to,*ext)) - DBUG_RETURN(my_errno); + if (rename_file_ext(from, to, *ext)) + { + if ((error=my_errno) != ENOENT) + break; + error= 0; + } } - DBUG_RETURN(0); + return error; } /* |