1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

BUG#39858 rpl.rpl_rotate (rpl.rpl_rotate_logs) failed on pushbuild: result mismatch

The method to purge binary log files produces different results in some platforms.
The reason is that the purge time is calculated based on table modified time and
that can't guarantee to purge master-bin.000002 in all platforms.(eg. windows)

Use a new way that sets the time to purge binlog file 1 second after the last modified time of master-bin.000002.
That can be sure that the file is always deleted in any platform.

mysql-test/suite/rpl/r/rpl_rotate_logs.result:
  Test result
mysql-test/suite/rpl/t/rpl_rotate_logs.test:
  Change 'purge time' 1 sencond after the last modified time of master-bin.000002.
This commit is contained in:
Leonard Zhou
2009-03-11 13:35:58 +08:00
parent d61f114f7f
commit 3c5c878715
2 changed files with 25 additions and 10 deletions

View File

@ -87,9 +87,7 @@ show binary logs;
Log_name File_size
master-bin.000002 #
master-bin.000003 #
select @time_for_purge:=DATE_ADD(UPDATE_TIME, INTERVAL 1 SECOND)
from information_schema.tables
where TABLE_SCHEMA="test" and TABLE_NAME="t2";
SELECT @time_for_purge:=DATE_ADD('tmpval', INTERVAL 1 SECOND);
purge master logs before (@time_for_purge);
show binary logs;
Log_name File_size