Bug #56383 provide option to restart mysqld after each mtr test
Submitted: 30 Aug 2010 19:18 Modified: 6 Oct 2010 19:40
Reporter: Mark Callaghan Email Updates:
Status: Closed Impact on me:
None 
Category:Tools: MTR / mysql-test-run Severity:S4 (Feature request)
Version:5.1.50 OS:Any
Assigned to: Bjørn Munch CPU Architecture:Any
Tags: Contribution, mtr

[30 Aug 2010 19:18] Mark Callaghan
Description:
There are 3 memory leak warnings for 5.1.50 from mtr. They are found when mysqld is shutdown but mysqld is not shutdown after each test so it takes some work to find the test that has the leak. This is easier to debug when mtr has an option to restart after each test.

My hack to support this is a change to mysql-test-run.pl, I am sure there is a better way:

    # ----------------------------------------------------
    # Was it the test program that exited
    # ----------------------------------------------------
    if ($proc eq $test)
    {
      my $res= $test->exit_status();

      if ($res == 0 and $opt_warnings and check_warnings($tinfo) )
      {
        # Test case suceeded, but it has produced unexpected
        # warnings, continue in $res == 1
        $res= 1;
      }

      if ( $res == 0 )
      {
        my $check_res;
        if ( 1 or restart_forced_by_test() )     <-------my hack
        {
          stop_all_servers($opt_shutdown_timeout);
        }

How to repeat:
na

Suggested fix:
Someone better with Perl can suggest one
[30 Aug 2010 19:23] Sveta Smirnova
Thank you for the reasonable feature request.

Workaround: for i in `echo TEST1 TEST2 ...`; do ./mtr $i; done
[31 Aug 2010 9:29] 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/117189

2928 Bjorn Munch	2010-08-31
      Bug #56383 provide option to restart mysqld after each mtr test
      Added --force-restart
[28 Sep 2010 10:07] Bjørn Munch
Unfortunately, this fix missed the internal train for 5.1.51 by a day or two, but it's scheduled to get included in 5.1.52.
[28 Sep 2010 15:39] Bugs System
Pushed into mysql-trunk 5.6.1-m4 (revid:alik@sun.com-20100928153607-tdsxkdm5cmuym5sq) (version source revid:alik@sun.com-20100928153508-0saa6v93dinqx1u7) (merge vers: 5.6.1-m4) (pib:21)
[28 Sep 2010 15:41] Bugs System
Pushed into mysql-next-mr (revid:alik@sun.com-20100928153646-pqp8o1a92mxtuj3h) (version source revid:alik@sun.com-20100928153532-lr3gtvnyp2en4y75) (pib:21)
[28 Sep 2010 15:44] Bugs System
Pushed into mysql-5.5 5.5.7-rc (revid:alik@sun.com-20100928153459-4nudf4zgzlou4s7q) (version source revid:alik@sun.com-20100928153459-4nudf4zgzlou4s7q) (merge vers: 5.5.7-rc) (pib:21)
[28 Sep 2010 19:55] Paul DuBois
Changes to test suite. No changelog entry needed.
[1 Nov 2010 19:00] Bugs System
Pushed into mysql-5.1 5.1.53 (revid:build@mysql.com-20101101184443-o2olipi8vkaxzsqk) (version source revid:build@mysql.com-20101101184443-o2olipi8vkaxzsqk) (merge vers: 5.1.53) (pib:21)