Commit 9f4f7980 authored by unknown's avatar unknown
Browse files

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.)
parent 6a1e7562
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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));