1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-07 00:04:31 +03:00

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)
This commit is contained in:
unknown
2002-07-14 10:37:34 +03:00
parent 9ae7aad20f
commit 765519dbcf
2 changed files with 3 additions and 9 deletions

View File

@@ -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;
}