summaryrefslogtreecommitdiff
path: root/sql/sql_db.cc
diff options
context:
space:
mode:
authorunknown <monty@hundin.mysql.fi>2002-07-14 10:37:34 +0300
committerunknown <monty@hundin.mysql.fi>2002-07-14 10:37:34 +0300
commit765519dbcfe6d4311fa18f308c1dbcb59050503c (patch)
treefd2d6e3c82fb66c0f948105c306fef01f49358db /sql/sql_db.cc
parent9ae7aad20fd8ab21173a0ac716686facbb4471bb (diff)
downloadmariadb-git-765519dbcfe6d4311fa18f308c1dbcb59050503c.tar.gz
Do handler specific drop-database at safe place.
Fix for access problem (merge from 4.0) sql/sql_db.cc: Do handler specific drop-database at safe place. sql/sql_parse.cc: Fix for access problem (merge from 4.0)
Diffstat (limited to 'sql/sql_db.cc')
-rw-r--r--sql/sql_db.cc9
1 files changed, 1 insertions, 8 deletions
diff --git a/sql/sql_db.cc b/sql/sql_db.cc
index e368ef3ae94..5ce1929e90a 100644
--- a/sql/sql_db.cc
+++ b/sql/sql_db.cc
@@ -166,6 +166,7 @@ void mysql_rm_db(THD *thd,char *db,bool if_exists)
if ((deleted=mysql_rm_known_files(thd, dirp, path,0)) >= 0)
{
+ ha_drop_database(path);
if (!thd->query)
{
thd->query = path;
@@ -189,14 +190,6 @@ void mysql_rm_db(THD *thd,char *db,bool if_exists)
exit:
VOID(pthread_mutex_unlock(&LOCK_open));
VOID(pthread_mutex_unlock(&LOCK_mysql_create_db));
-
- /* It seems MySQL may call this function when there still are queries
- running on tables of the database. Since InnoDB waits until the
- queries have ended, we have to call ha_drop_database outside
- the above two mutexes to avoid deadlocks. */
-
- ha_drop_database(path);
-
DBUG_VOID_RETURN;
}