Bug #56895 Changes related to mysqhotcopy tests in 5.5 are missing from 5.1
Submitted: 21 Sep 2010 13:51 Modified: 28 Jan 2011 15:49
Reporter: John Embretsen Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Tests Severity:S3 (Non-critical)
Version:5.1.51 OS:Any
Assigned to: John Embretsen CPU Architecture:Any
Tags: experimental

[21 Sep 2010 13:51] John Embretsen
Description:
This is related to Bug#56817 (mysqlhotcopy tests fail when DBI and DBD-mysql perl modules are not found).

Bazaar history has revealed that several changes to MTR and the mysqhotcopy.inc test script were pushed into mysql-trunk-bugfixing and mysql-next-mr-bugfixing in August without any reference to a bug number. The changes are also present in mysql-5.5-merge.

These changes are relevant to 5.1 as well, and should be backported to mysql-5.1-bugteam in order to make the mysqlhotcopy tests pass once Bug#56817 is fixed.

Two patches need to be backported (see below). 

Patch A is strictly not necessary, because the if condition was not erroneous as claimed in the commit comment. However, it would make further maintenance easier if the tests (and MTR) had the same logic in both MySQL 5.1 and 5.5 and above.

Patch B is necessary in order for MTR to find the mysqlhotcopy script in directory layouts corresponding to binary installations, also used in Pushbuild.

Patch A:
------------------------------------------------------------
revno: 2972.45.6
revision-id: holyfoot@mysql.com-20100823084827-js10vjuil88je35r
parent: bar@mysql.com-20100824061543-rxke4k40f98u06ps
committer: Alexey Botchkov <holyfoot@mysql.com>
branch nick: 55mrg
timestamp: Mon 2010-08-23 13:48:27 +0500
message:
  mysqlhotcopy tests fixed.
  The include/mysqlhotcopy.inc had an error in the 'if' condition, so it failed
  if the mysqlhotcopy tool was found.

  per-file comments:
    mysql-test/include/mysqlhotcopy.inc
          test should proceed exactly if the mysqlhotcopy was set.
    mysql-test/mysql-test-run.pl
          don't set the MYSQL_HOTCOPY variable if no mysqlhotcopy was found.
modified:
  mysql-test/include/mysqlhotcopy.inc
  mysql-test/mysql-test-run.pl

------------------------------------------------------------

Patch B:
------------------------------------------------------------
revno: 2972.52.4
revision-id: holyfoot@mysql.com-20100825135522-8wrjjmvh2u2t0qo6
parent: alfranio.correia@oracle.com-20100825141507-yl2d39c69xoqslrx
committer: Alexey Botchkov <holyfoot@mysql.com>
branch nick: 55mrg
timestamp: Wed 2010-08-25 18:55:22 +0500
message:
  mysqlhotcopy tests fixed.
  The 'mysqlhotcopy' tool gets into bin/ directory after the installation
  from the scripts/.
  So check for it in that in the mysql-test-run.pl.
  
  per-file comments:
    mysql-test/mysql-test-run.pl
  Check the bin/ for mysqlhotcopy presence.
modified:
  mysql-test/mysql-test-run.pl

How to repeat:
Try to run mysqlhotcopy_myisam or mysqlhotcopy_archive tests in 5.1 and compare to 5.5 (tests are disabled, so run with --enable-disabled). 

You will see that in 5.1 the tests fail due to not finding the mysqlhotcopy tool, whereas in 5.5 and beyond the tests either pass or fail due to not finding the DBD::mysql perl module.

perl ./mysql-test-run.pl --enable-disabled mysqlhotcopy_myisam

Suggested fix:
The goal of this bug is to get the 5.1 tests to a state that is comparable to 5.5, so that Bug#56817 can be fixed in both versions without too much complication.

One way to do so is to backport (cherrypick) the revisions mentioned above from mysql-5.5-merge to mysql-5.1-bugteam.
[14 Jan 2011 13:51] 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/128762

3552 John H. Embretsen	2011-01-14
      Bug#56895 part 1 of 2: Backport of revid holyfoot@mysql.com-20100823084827-js10vjuil88je35r from mysql-5.5.
      The purpose is to make MTR logic for mysqlhotcopy the same in 5.1 as in 5.5, making it easier to maintain and fix bugs such as 56817.
[14 Jan 2011 14:03] 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/128768

3553 John H. Embretsen	2011-01-14
      Bug#56895 part 2 of 2: Backport of revid holyfoot@mysql.com-20100825135522-8wrjjmvh2u2t0qo6 from mysql-5.5.
      Without this patch mysqlhotcopy tests would fail due to not finding the mysqlhotcopy tool in release-like builds.
      With this patch the tests would either pass, or fail due to missing Perl modules (see 56817).
      Text conflict in mysql-test/mysql-test-run.pl:
       - resolved by using logic from 5.5 to find mysqlhotcopy, the intention of this backport.
[14 Jan 2011 16:01] 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/128823

3553 John H. Embretsen	2011-01-14
      Bug#56895 part 2 of 2: Backport of revid holyfoot@mysql.com-20100825135522-8wrjjmvh2u2t0qo6 from mysql-5.5.
      Without this patch mysqlhotcopy tests would fail due to not finding the mysqlhotcopy tool in release-like builds.
      With this patch the tests would either pass, or fail due to missing Perl modules (see 56817).
      Text conflict in mysql-test/mysql-test-run.pl:
       - resolved by using logic from 5.5 to find mysqlhotcopy, the intention of this backport. Changed bindir to basedir.
[27 Jan 2011 10:31] Horst Hunger
I inserted the patches into mysql_5.1 files and checked the location of mysqlhotcopy.pl in a release.
Ready to push.
[27 Jan 2011 10:35] Horst Hunger
please, update disabled.def.
[27 Jan 2011 11:07] John Embretsen
Thanks for the review, Horst. I will update disabled.def as part of Bug#56817.
[27 Jan 2011 11:52] Bugs System
Pushed into mysql-5.1 5.1.56 (revid:john.embretsen@oracle.com-20110127113813-dgbd54xlscxe5aac) (version source revid:john.embretsen@oracle.com-20110114160113-1me8j72pwx6b34ku) (merge vers: 5.1.56) (pib:24)
[28 Jan 2011 10:09] Bugs System
Pushed into mysql-trunk 5.6.2 (revid:john.embretsen@oracle.com-20110128100618-yo9uw2cvw9ojbear) (version source revid:john.embretsen@oracle.com-20110128100618-yo9uw2cvw9ojbear) (merge vers: 5.6.2) (pib:24)
[28 Jan 2011 10:09] Bugs System
Pushed into mysql-5.5 5.5.10 (revid:john.embretsen@oracle.com-20110128100154-gianzcfw355owmes) (version source revid:john.embretsen@oracle.com-20110128100154-gianzcfw355owmes) (merge vers: 5.5.10) (pib:24)
[28 Jan 2011 15:49] Paul DuBois
Changes to test suite. No changelog entry needed.