summaryrefslogtreecommitdiff
path: root/sql/handler.cc
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2013-04-09 16:06:54 +0200
committerSergei Golubchik <sergii@pisem.net>2013-04-09 16:06:54 +0200
commit474f45b3dc684b14c3b5ab86303c8aa890d2dce5 (patch)
tree4b9ac6b86cb9dfc6ffbb6f7675f97e6081535ab2 /sql/handler.cc
parente06cb31719ce31fb1cd7944d1de86d4de9e3eca6 (diff)
downloadmariadb-git-474f45b3dc684b14c3b5ab86303c8aa890d2dce5.tar.gz
discover of table non-existance on drop
Diffstat (limited to 'sql/handler.cc')
-rw-r--r--sql/handler.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/sql/handler.cc b/sql/handler.cc
index 00ed78f335d..d58040abaa8 100644
--- a/sql/handler.cc
+++ b/sql/handler.cc
@@ -3448,9 +3448,14 @@ int handler::delete_table(const char *name)
{
int saved_error= 0;
int error= 0;
- int enoent_or_zero= ENOENT; // Error if no file was deleted
+ int enoent_or_zero;
char buff[FN_REFLEN];
+ if (ht->discover_table)
+ enoent_or_zero= 0; // the table may not exist in the engine, it's ok
+ else
+ enoent_or_zero= ENOENT; // the first file of bas_ext() *must* exist
+
for (const char **ext=bas_ext(); *ext ; ext++)
{
fn_format(buff, name, "", *ext, MY_UNPACK_FILENAME|MY_APPEND_EXT);