summaryrefslogtreecommitdiff
path: root/sql/sql_db.cc
diff options
context:
space:
mode:
authorSergey Glukhov <Sergey.Glukhov@sun.com>2009-09-17 16:33:23 +0500
committerSergey Glukhov <Sergey.Glukhov@sun.com>2009-09-17 16:33:23 +0500
commit2535ede7138cb4d1e8986d18b4154c377ba37f3f (patch)
treee52481eb1f8631f34adad7f5545de3e9c30af286 /sql/sql_db.cc
parent7cf8f7a4bb465eca331fb08568127eadb709a4a2 (diff)
downloadmariadb-git-2535ede7138cb4d1e8986d18b4154c377ba37f3f.tar.gz
Bug#42364 SHOW ERRORS returns empty resultset after dropping non existent table
additional backport of of bug43138 fix mysql-test/t/myisam-system.test: additional backport of of bug43138 fix sql/sql_db.cc: additional backport of of bug43138 fix
Diffstat (limited to 'sql/sql_db.cc')
-rw-r--r--sql/sql_db.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/sql/sql_db.cc b/sql/sql_db.cc
index 3fca5bd7df6..bcc8fcf54fc 100644
--- a/sql/sql_db.cc
+++ b/sql/sql_db.cc
@@ -907,6 +907,9 @@ bool mysql_rm_db(THD *thd,char *db,bool if_exists, bool silent)
remove_db_from_cache(db);
pthread_mutex_unlock(&LOCK_open);
+ Drop_table_error_handler err_handler(thd->get_internal_handler());
+ thd->push_internal_handler(&err_handler);
+
error= -1;
/*
We temporarily disable the binary log while dropping the objects
@@ -939,6 +942,7 @@ bool mysql_rm_db(THD *thd,char *db,bool if_exists, bool silent)
error = 0;
reenable_binlog(thd);
}
+ thd->pop_internal_handler();
}
if (!silent && deleted>=0)
{