From 9fb88bfb146915e9bbb26f971a2de21bd2f5b976 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 13 Mar 2003 14:12:28 +0400 Subject: [PATCH] Fix for embeded library compile --- sql/log.cc | 2 ++ sql/mysqld.cc | 2 ++ sql/sql_parse.cc | 2 ++ 3 files changed, 6 insertions(+) diff --git a/sql/log.cc b/sql/log.cc index 65497a3e065..170e976e643 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -1260,6 +1260,7 @@ err: } pthread_mutex_unlock(&LOCK_log); +#ifdef HAVE_REPLICATION if (should_rotate && expire_logs_days) { long purge_time= time(0) - expire_logs_days*24*60*60; @@ -1267,6 +1268,7 @@ err: error= purge_logs_before_date(current_thd, purge_time); } +#endif DBUG_RETURN(error); } diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 49b005c480f..c6403f97f07 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -2176,12 +2176,14 @@ static int init_server_components() open_log(&mysql_bin_log, glob_hostname, opt_bin_logname, "-bin", opt_binlog_index_name,LOG_BIN); using_update_log=1; +#ifdef HAVE_REPLICATION if (expire_logs_days) { long purge_time= time(0) - expire_logs_days*24*60*60; if (purge_time >= 0) mysql_bin_log.purge_logs_before_date(current_thd, purge_time); } +#endif } if (opt_error_log) diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index cd3fe0afefa..a3b8ccafc11 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -3940,12 +3940,14 @@ bool reload_acl_and_cache(THD *thd, ulong options, TABLE_LIST *tables) mysql_log.new_file(1); mysql_update_log.new_file(1); mysql_bin_log.new_file(1); +#ifdef HAVE_REPLICATION if (expire_logs_days) { long purge_time= time(0) - expire_logs_days*24*60*60; if (purge_time >= 0) mysql_bin_log.purge_logs_before_date(thd, purge_time); } +#endif mysql_slow_log.new_file(1); if (ha_flush_logs()) result=1;