Bug #95222 Typo in innodb.upgrade_orphan causing test failures on RedHat
Submitted: 2 May 2019 12:18 Modified: 6 May 2019 15:51
Reporter: Laurynas Biveinis (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Tests Severity:S7 (Test Cases)
Version:8.0.12+ OS:CentOS
Assigned to: CPU Architecture:Any

[2 May 2019 12:18] Laurynas Biveinis
Description:
innodb.upgrade_orphan has this, introduced by [1]:

--list_files $MYSQLD_TMP_DIR/ *.log

The env variable MYSQLD_TMP_DIR does not exist. MYSQL_TMP_DIR does. Thus it effectively lists log files at the root directory. If it happens to be a RedHat-based system, installer's log file might be still there, resulting in

190430  8:48:38 [ 95%] innodb.upgrade_orphan                    w5  [ retry-fail ]
        Test ended at 2019-04-30 08:48:38

CURRENT_TEST: innodb.upgrade_orphan
--- /tmp/results/PS/mysql-test/suite/innodb/r/upgrade_orphan.result	2019-04-30 10:43:15.000000000 +0300
+++ /tmp/results/PS/mysql-test/var/5/log/upgrade_orphan.reject	2019-04-30 11:48:38.740457830 +0300
@@ -7,6 +7,7 @@
 # Unzip the zip file.
 # These files are added to test error scenario, delete from for upgrade testing.
 # Remove myisam partitioned tables. There are used for negative testing.
+anaconda-post.log
 # Create an orphan .frm
 # start server and we expect failure because of orphan .frm(sakila/zzz.frm)
 # Remove orphan .frm

mysqltest: Result content mismatch

commit d4d8f9954f929f61ba0e93ab2077d75dd30f98f4
Author: Erlend Dahl <erlend.dahl@oracle.com>
Date:   Fri Mar 16 18:03:40 2018 +0100

    Follow-up fix to gather more info about upgrade test failures.

How to repeat:
See above

Suggested fix:
s/MYSQLD_TMP_DIR/MYSQL_TMP/DIR and a re-record because check-mysqld_1.log will be present there:

diff --git a/mysql-test/suite/innodb/r/upgrade_orphan.result b/mysql-test/suite/innodb/r/upgrade_orphan.result
index e38ec8e6eb7..29fb3f206dc 100644
--- a/mysql-test/suite/innodb/r/upgrade_orphan.result
+++ b/mysql-test/suite/innodb/r/upgrade_orphan.result
@@ -7,6 +7,7 @@
 # Unzip the zip file.
 # These files are added to test error scenario, delete from for upgrade testing.
 # Remove myisam partitioned tables. There are used for negative testing.
+check-mysqld_1.log
 # Create an orphan .frm
 # start server and we expect failure because of orphan .frm(sakila/zzz.frm)
 # Remove orphan .frm
diff --git a/mysql-test/suite/innodb/t/upgrade_orphan.test b/mysql-test/suite/innodb/t/upgrade_orphan.test
index 628fc302f07..6397a3cb102 100644
--- a/mysql-test/suite/innodb/t/upgrade_orphan.test
+++ b/mysql-test/suite/innodb/t/upgrade_orphan.test
@@ -21,7 +21,7 @@ let $MYSQLD_DATADIR1 = $MYSQL_TMP_DIR/data57;
 --remove_file $MYSQL_TMP_DIR/data57/test/55_temporal.MYD
 --remove_file $MYSQL_TMP_DIR/data57/test/55_temporal.MYI
 --echo # Remove myisam partitioned tables. There are used for negative testing.
---list_files $MYSQLD_TMP_DIR/ *.log
+--list_files $MYSQL_TMP_DIR/ *.log
 --remove_files_wildcard $MYSQL_TMP_DIR/data57/partitions *
 --rmdir $MYSQL_TMP_DIR/data57/partitions
 --force-rmdir $MYSQL_TMP_DIR/data57/mismatch_frms
[3 May 2019 6:58] MySQL Verification Team
Hello Laurynas,

Thank you for the report and feedback.

regards,
Umesh
[6 May 2019 15:51] Paul DuBois
Posted by developer:
 
Fix in 8.0.17.

Work was done for test suite. No changelog entry required.
[7 May 2019 8:53] Erlend Dahl
Note: it was difficult to get the proposed patch to work with --parallel>1 and --parallel=1. Since the offending line didn't really serve any purpose, we just removed it.