diff options
Diffstat (limited to 'sql/log.cc')
-rw-r--r-- | sql/log.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sql/log.cc b/sql/log.cc index 5dcb5857026..de64ad844f0 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -23,6 +23,7 @@ #endif #include "mysql_priv.h" +#include <mysql.h> #include "sql_acl.h" #include "sql_repl.h" @@ -612,6 +613,8 @@ err: LOG_INFO_IO Got IO error while reading file */ +#ifdef HAVE_REPLICATION + int MYSQL_LOG::purge_first_log(struct st_relay_log_info* rli) { int error; @@ -746,6 +749,8 @@ err: DBUG_RETURN(error); } +#endif /* HAVE_REPLICATION */ + /* Create a new log file name @@ -1055,6 +1060,7 @@ bool MYSQL_LOG::write(Log_event* event_info) #else IO_CACHE *file = &log_file; #endif +#ifdef HAVE_REPLICATION if ((thd && !(thd->options & OPTION_BIN_LOG) && (thd->master_access & SUPER_ACL)) || (local_db && !db_ok(local_db, binlog_do_db, binlog_ignore_db))) @@ -1063,6 +1069,7 @@ bool MYSQL_LOG::write(Log_event* event_info) DBUG_PRINT("error",("!db_ok")); DBUG_RETURN(0); } +#endif /* HAVE_REPLICATION */ error=1; /* @@ -1445,6 +1452,7 @@ void MYSQL_LOG::close(bool exiting) DBUG_PRINT("enter",("exiting: %d", (int) exiting)); if (is_open()) { +#ifdef HAVE_REPLICATION if (log_type == LOG_BIN && !no_auto_events && exiting) { Stop_log_event s; @@ -1452,6 +1460,7 @@ void MYSQL_LOG::close(bool exiting) s.write(&log_file); signal_update(); } +#endif /* HAVE_REPLICATION */ end_io_cache(&log_file); if (my_close(log_file.file,MYF(0)) < 0 && ! write_error) { @@ -1575,3 +1584,6 @@ void sql_perror(const char *message) perror(message); #endif } + + + |