Commit bef05eda authored by lars@mysql.com's avatar lars@mysql.com

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.)
parent 6c253007
...@@ -1274,7 +1274,7 @@ bool MYSQL_LOG::write(Log_event* event_info) ...@@ -1274,7 +1274,7 @@ bool MYSQL_LOG::write(Log_event* event_info)
binlog_[wild_]{do|ignore}_table?" (WL#1049)" binlog_[wild_]{do|ignore}_table?" (WL#1049)"
*/ */
if ((thd && !(thd->options & OPTION_BIN_LOG)) || 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)); VOID(pthread_mutex_unlock(&LOCK_log));
DBUG_PRINT("error",("!db_ok('%s')", local_db)); DBUG_PRINT("error",("!db_ok('%s')", local_db));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment