diff options
author | He Zhenxing <hezx@mysql.com> | 2008-09-06 08:51:17 +0800 |
---|---|---|
committer | He Zhenxing <hezx@mysql.com> | 2008-09-06 08:51:17 +0800 |
commit | b17458dcc14882dcb2565bcbb92115ed786fe7c1 (patch) | |
tree | 81eaef221aa476a0279c43f5e5c6df9c91924e44 /sql/sql_db.cc | |
parent | d0edf322306221f2e662a54a9feecc78378d6dfe (diff) | |
parent | d70d171ceef259920d975fa2ddccaa6a41ba91fe (diff) | |
download | mariadb-git-b17458dcc14882dcb2565bcbb92115ed786fe7c1.tar.gz |
Merge 5.1 main -> 5.1-rpl
Diffstat (limited to 'sql/sql_db.cc')
-rw-r--r-- | sql/sql_db.cc | 9 |
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) { |