Commit d446289f authored by unknown's avatar unknown

Remove dangerous "remove warning" hack, cast to long

will truncate the time value on systems where "long" are 32bit,
instead use time_t as datatype
  

parent 48a9d2c3
......@@ -1784,7 +1784,7 @@ void MYSQL_LOG::rotate_and_purge(uint flags)
#ifdef HAVE_REPLICATION
if (expire_logs_days)
{
long purge_time= (long) (time(0) - expire_logs_days*24*60*60);
time_t purge_time= time(0) - expire_logs_days*24*60*60;
if (purge_time >= 0)
purge_logs_before_date(purge_time);
}
......
......@@ -3271,7 +3271,7 @@ server.");
#ifdef HAVE_REPLICATION
if (opt_bin_log && expire_logs_days)
{
long purge_time= (long) (time(0) - expire_logs_days*24*60*60);
time_t purge_time= time(0) - expire_logs_days*24*60*60;
if (purge_time >= 0)
mysql_bin_log.purge_logs_before_date(purge_time);
}
......
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