Fix for embeded library compile
This commit is contained in:
parent
4901295af1
commit
9fb88bfb14
@ -1260,6 +1260,7 @@ err:
|
|||||||
}
|
}
|
||||||
|
|
||||||
pthread_mutex_unlock(&LOCK_log);
|
pthread_mutex_unlock(&LOCK_log);
|
||||||
|
#ifdef HAVE_REPLICATION
|
||||||
if (should_rotate && expire_logs_days)
|
if (should_rotate && expire_logs_days)
|
||||||
{
|
{
|
||||||
long purge_time= time(0) - expire_logs_days*24*60*60;
|
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);
|
error= purge_logs_before_date(current_thd, purge_time);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
DBUG_RETURN(error);
|
DBUG_RETURN(error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2176,12 +2176,14 @@ static int init_server_components()
|
|||||||
open_log(&mysql_bin_log, glob_hostname, opt_bin_logname, "-bin",
|
open_log(&mysql_bin_log, glob_hostname, opt_bin_logname, "-bin",
|
||||||
opt_binlog_index_name,LOG_BIN);
|
opt_binlog_index_name,LOG_BIN);
|
||||||
using_update_log=1;
|
using_update_log=1;
|
||||||
|
#ifdef HAVE_REPLICATION
|
||||||
if (expire_logs_days)
|
if (expire_logs_days)
|
||||||
{
|
{
|
||||||
long purge_time= time(0) - expire_logs_days*24*60*60;
|
long purge_time= time(0) - expire_logs_days*24*60*60;
|
||||||
if (purge_time >= 0)
|
if (purge_time >= 0)
|
||||||
mysql_bin_log.purge_logs_before_date(current_thd, purge_time);
|
mysql_bin_log.purge_logs_before_date(current_thd, purge_time);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
if (opt_error_log)
|
if (opt_error_log)
|
||||||
|
@ -3940,12 +3940,14 @@ bool reload_acl_and_cache(THD *thd, ulong options, TABLE_LIST *tables)
|
|||||||
mysql_log.new_file(1);
|
mysql_log.new_file(1);
|
||||||
mysql_update_log.new_file(1);
|
mysql_update_log.new_file(1);
|
||||||
mysql_bin_log.new_file(1);
|
mysql_bin_log.new_file(1);
|
||||||
|
#ifdef HAVE_REPLICATION
|
||||||
if (expire_logs_days)
|
if (expire_logs_days)
|
||||||
{
|
{
|
||||||
long purge_time= time(0) - expire_logs_days*24*60*60;
|
long purge_time= time(0) - expire_logs_days*24*60*60;
|
||||||
if (purge_time >= 0)
|
if (purge_time >= 0)
|
||||||
mysql_bin_log.purge_logs_before_date(thd, purge_time);
|
mysql_bin_log.purge_logs_before_date(thd, purge_time);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
mysql_slow_log.new_file(1);
|
mysql_slow_log.new_file(1);
|
||||||
if (ha_flush_logs())
|
if (ha_flush_logs())
|
||||||
result=1;
|
result=1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user