Bug #73001 rpl_auto_increment.test is not repeatable
Submitted: 13 Jun 2014 17:06 Modified: 23 Jun 2014 13:16
Reporter: Matthias Leich Email Updates:
Status: Closed Impact on me:
None 
Category:Tests: Replication Severity:S3 (Non-critical)
Version:5.7.5 OS:Any
Assigned to: CPU Architecture:Any

[13 Jun 2014 17:06] Matthias Leich
Description:
The test rpl_auto_increment violates the rule that a test
must be repeatable.
./mysql-test-run.pl --suite=rpl --repeat=2 rpl_auto_increment
...
TEST                                      RESULT   TIME (ms) or COMMENT
--------------------------------------------------------------------------

worker[1] Using MTR_BUILD_THREAD 300, with reserved ports 13000..13009
rpl.rpl_auto_increment 'mix'             [ pass ]   2086
rpl.rpl_auto_increment 'mix'             [ fail ]
        Test ended at 2014-06-13 18:58:22

CURRENT_TEST: rpl.rpl_auto_increment
mysqltest: In included file "./extra/rpl_tests/rpl_auto_increment.test": 
included from ./extra/rpl_tests/rpl_auto_increment.test at line 221:
At line 220: command "copy_file" failed with error 1. my_errno=17

How to repeat:
./mysql-test-run.pl --suite=rpl --repeat=2 rpl_auto_increment

Suggested fix:
Line 220 and what follows in 
   extra/rpl_tests/rpl_auto_increment.test
looks suspicious.

Line 220 creates a file $MYSQLD_DATADIR/master-bin.saved
without removing any maybe existing master-bin.saved before.
This is ok because other tests must be cooperative by "MTR test law".
== They must clean up at end so that the next test can expect
   a clean system.
But there is no line in the cleanup of rpl_auto_increment
which removes master-bin.saved.
Therefore
- a repetition of rpl_auto_increment
  (My guess: Very unlikely because we run the test suites different.)
- but also any other test expecting that there is not already
  some master-bin.saved (My guess: Not that unlikely) 
will fail.

I propose to go to the line where that master-bin.saved
is used last time (line 233) and add a
--remove_file $MYSQLD_DATADIR/master-bin.saved
as next line.

In my experiment that helped.
[23 Jun 2014 13:16] Jon Stephens
Fixed in 5.7.5. Testing only, no changelog entry needed. Closed.

Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release.

If necessary, you can access the source repository and build the latest available version, including the bug fix. More information about accessing the source trees is available at

    http://dev.mysql.com/doc/en/installing-source.html