Bug #27438 rpl_rotate_logs fails on Windows
Submitted: 26 Mar 2007 12:25 Modified: 14 Jun 2007 18:00
Reporter: Sveta Smirnova Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Tests Severity:S7 (Test Cases)
Version:5.0, 5.1, 5.0.36 OS:Windows (Windows, SLES10)
Assigned to: Magnus Blåudd CPU Architecture:Any
Tags: bfsm_2007_04_05

[26 Mar 2007 12:25] Sveta Smirnova
Description:
Test rpl_rotate_logs fails on Windows

How to repeat:
./mysql-test-run.pl rpl_rotate_logs
<skip>
rpl_rotate_logs                [ fail ]

Errors are (from y:/mysql-enterprise-gpl-5.0.36-win32/mysql-test/var/log/mysqlte
st-time) :
mysqltest: Result length mismatch
(the last lines may be the most important ones)
Below are the diffs between actual and expected results:
-------------------------------------------------------
*** r/rpl_rotate_logs.result    Wed Feb 21 11:29:40 2007
--- r/rpl_rotate_logs.reject    Mon Mar 26 11:34:49 2007
***************
*** 53,58 ****
--- 53,59 ----
  purge master logs before now();
  show binary logs;
  Log_name      File_size
+ master-bin.000002     363
  master-bin.000003     407
  insert into t2 values (65);
  show slave status;
***************
*** 74,79 ****
--- 75,81 ----
  create table t4 select * from temp_table;
  show binary logs;
  Log_name      File_size
+ master-bin.000002     363
  master-bin.000003     4185
  master-bin.000004     4190
  master-bin.000005     2032
-------------------------------------------------------
Please follow the instructions outlined at
http://www.mysql.com/doc/en/Reporting_mysqltest_bugs.html
to find the reason to this problem and how to report this.

Result from queries before failure can be found in r/rpl_rotate_logs.log
[21 May 2007 9:29] Magnus Blåudd
This problem is occurs when the time differs between 'mysqld' and the filesystem. The testcase is not designed to handle that.

1. Create three master log files by doing some operations and then calling "FLUSH LOGS" two times.  
2. Delete the master-bin.000001 with "PURGE MASTER LOGS TO 'master-bin.000002'"
3. "SHOW BINARY LOGS" now shows there are two logs left.
4. Sleep 1 second
4. Delete "master-bin.000002" with a "PURGE MASTER LOGS BEFORE now()". The PURGE command will take the current time in mysqld and loop through the log files on disk and check it's file time against the "now" value from mysqld.

We should either:
 - skip the testcase if filesystem time differs from mysqld time with more than 1 second.
 - Use the filetime of the "master-bin.0000002" file in the call to "PURGE MASTER LOGS BEFORE".
[21 May 2007 9:34] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/27062

ChangeSet@1.2494, 2007-05-21 11:33:58+02:00, msvensson@pilot.blaudden +2 -0
  Bug#27438  rpl_rotate_logs fails on Windows
   - Fix test case to work also when filesystem time differs
     from mysqld' time. I.e when running with data files on a
     network share.
[21 May 2007 9:52] Daniel Fischer
Approved as a workaround only.

Documentation should include a note that some test cases depend on being run on local storage, and that failure of these test cases when running on remote storage does not indicate an actual malfunction. (It is not generally possible to determine  whether tests are being run on local storage. Furthermore, placing the datastore on remote storage is with high likelihood broken design, with some exceptions to be made for some embedded server use cases, and some more exceptions for cases where using an RDBMS is broken design of course.)
[6 Jun 2007 16:54] Bugs System
Pushed into 5.1.20-beta
[6 Jun 2007 16:58] Bugs System
Pushed into 5.0.44
[14 Jun 2007 18:00] Paul DuBois
No changelog entry needed.

Added a note about the issue to:
http://dev.mysql.com/doc/mysqltest/en/tutorial-other-tips.html