summaryrefslogtreecommitdiff
path: root/sql/sql_db.cc
diff options
context:
space:
mode:
authorHe Zhenxing <hezx@mysql.com>2008-09-06 08:51:17 +0800
committerHe Zhenxing <hezx@mysql.com>2008-09-06 08:51:17 +0800
commitb17458dcc14882dcb2565bcbb92115ed786fe7c1 (patch)
tree81eaef221aa476a0279c43f5e5c6df9c91924e44 /sql/sql_db.cc
parentd0edf322306221f2e662a54a9feecc78378d6dfe (diff)
parentd70d171ceef259920d975fa2ddccaa6a41ba91fe (diff)
downloadmariadb-git-b17458dcc14882dcb2565bcbb92115ed786fe7c1.tar.gz
Merge 5.1 main -> 5.1-rpl
Diffstat (limited to 'sql/sql_db.cc')
-rw-r--r--sql/sql_db.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/sql/sql_db.cc b/sql/sql_db.cc
index 52d9e42bc82..00476e2fc38 100644
--- a/sql/sql_db.cc
+++ b/sql/sql_db.cc
@@ -920,20 +920,25 @@ bool mysql_rm_db(THD *thd,char *db,bool if_exists, bool silent)
should be dropped while the database is being cleaned, but in
the event that a change in the code to remove other objects is
made, these drops should still not be logged.
+
+ Notice that the binary log have to be enabled over the call to
+ ha_drop_database(), since NDB otherwise detects the binary log
+ as disabled and will not log the drop database statement on any
+ other connected server.
*/
- tmp_disable_binlog(thd);
if ((deleted= mysql_rm_known_files(thd, dirp, db, path, 0,
&dropped_tables)) >= 0)
{
ha_drop_database(path);
+ tmp_disable_binlog(thd);
query_cache_invalidate1(db);
(void) sp_drop_db_routines(thd, db); /* @todo Do not ignore errors */
#ifdef HAVE_EVENT_SCHEDULER
Events::drop_schema_events(thd, db);
#endif
error = 0;
+ reenable_binlog(thd);
}
- reenable_binlog(thd);
}
if (!silent && deleted>=0)
{