summaryrefslogtreecommitdiff
path: root/storage/maria/ma_delete_table.c
diff options
context:
space:
mode:
Diffstat (limited to 'storage/maria/ma_delete_table.c')
-rw-r--r--storage/maria/ma_delete_table.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/storage/maria/ma_delete_table.c b/storage/maria/ma_delete_table.c
index 90e6b5250c1..fa93a7100b0 100644
--- a/storage/maria/ma_delete_table.c
+++ b/storage/maria/ma_delete_table.c
@@ -30,6 +30,7 @@ int maria_delete_table(const char *name)
{
MARIA_HA *info;
myf sync_dir;
+ int got_error= 0, error;
DBUG_ENTER("maria_delete_table");
#ifdef EXTRA_DEBUG
@@ -41,9 +42,13 @@ int maria_delete_table(const char *name)
Unfortunately it is necessary to open the table just to check this. We use
'open_for_repair' to be able to open even a crashed table.
*/
+ my_errno= 0;
if (!(info= maria_open(name, O_RDONLY, HA_OPEN_FOR_REPAIR, 0)))
{
sync_dir= 0;
+ /* Ignore not found errors and wrong symlink errors */
+ if (my_errno != ENOENT && my_errno != HA_WRONG_CREATE_OPTION)
+ got_error= my_errno;;
}
else
{
@@ -78,7 +83,9 @@ int maria_delete_table(const char *name)
DBUG_RETURN(1);
}
- DBUG_RETURN(maria_delete_table_files(name, 0, sync_dir | MY_WME));
+ if (!(error= maria_delete_table_files(name, 0, sync_dir | MY_WME)))
+ error= got_error;
+ DBUG_RETURN(error);
}
/**