From 9f4f798049fabca4ef4441ce9583b5c145d572f3 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 10 Feb 2005 21:23:48 +0100 Subject: BUG#6749: If there is no current database, then nothing should be binlogged if binlog-do-db or binlog-ignore-db are in effect. (In the future 5.1? 5.0? I think each statement should be verified against the filtering criteria based on the database it *uses* and not the *current* one. But, right now the *current* database is what counts according to the semantics of the manual.) sql/log.cc: BUG#6749: If there is no current database, then nothing should be binlogged if binlog-do-db or binlog-ignore-db are in effect. (In the future I think that each statement should be verified against the filtering criteria based on the database it *uses* and not the *current* one. But, right now the *current* database is what counts according to the semantics of the manual.) --- sql/log.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/log.cc b/sql/log.cc index 38844877f1b..46b44837e0f 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -1274,7 +1274,7 @@ bool MYSQL_LOG::write(Log_event* event_info) binlog_[wild_]{do|ignore}_table?" (WL#1049)" */ if ((thd && !(thd->options & OPTION_BIN_LOG)) || - (local_db && !db_ok(local_db, binlog_do_db, binlog_ignore_db))) + (!db_ok(local_db, binlog_do_db, binlog_ignore_db))) { VOID(pthread_mutex_unlock(&LOCK_log)); DBUG_PRINT("error",("!db_ok('%s')", local_db)); -- cgit v1.2.1