Bug #60008 MySQL Utilities tests fail under MySQL 5.5
Submitted: 8 Feb 2011 15:05 Modified: 9 Jul 2012 19:08
Reporter: Chuck Bell Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Utilities Severity:S3 (Non-critical)
Version:1.0.0 OS:Any
Assigned to: Assigned Account CPU Architecture:Any

[8 Feb 2011 15:05] Chuck Bell
Description:
A number of the MySQL Utilities tests fail when run against a MySQL 5.5.9 server. These include:

- diskusage_basic
- diskusage_errors
- diskusage_parameters
- export_parameters_def
- export_parameters_data
- export_parameters_both
- replicate_engines
- replicate_innodb

There are a number of issues causing these failures (see below).

How to repeat:
Run mut with:

python ./mut.py --server=root@localhost --force

Where the localhost is running MySQL version 5.5.9.

Suggested fix:
The root cause of most of the failures is the change in the INFORMATION_SCHEMA tables. In previous versions of the server, the TABLE_SCHEMA column (for example) would return 'None' in queries. It now returns 'def'. This made the result files mismatch for the export* tests. The tests must be changed to mask this difference.

There is a minor defect in the dbimport.py file. The code was testing for file format by checking for TABLE_SCHEMA = None. On v5.5 it is 'def'. The code must be changed to detect either 'None' or 'def' as the value for TABLE_SCHEMA.

The change to having InnoDB as the default storage engine caused a problem with the diskusage.py code. The code currently checks to see if InnoDB is enabled by checking have_innodb. Under 5.5.9, even if the server is started with --skip-innodb, have_innodb returns 'YES'. The code must be changed to detect if InnoDB is enabled on 5.5.X machines by checking the 'support' column of the INFORMATION_SCHEMA.ENGINES table. If it is supported, it will return 'YES' and if not, it will return 'NO'.

Aside from this problem, the diskusage tests must be changed to name the general and slow log files to prevent a non-deterministic issue when the tests are run in a different sequence.

The mysqlserverclone code must also be changed. The time it takes for a server to start has increased from 5.1 to 5.5. Thus, the delay loop for waiting for the cloned server to start must be increased.

A minor defect was found when testing on CentOS for the mutlib.py file. There is an exception on line#334 that is incorrect. This must be changed from MUTException to MySQLUtilError to match the rest of the code. This only shows up on CentOS.

The replicate* tests involving InnoDB will not work on 5.5.9. These tests require InnoDB to be turned off and the InnoDB plugin to be turned on. The mechanism used for the tests is not possible under 5.5.9. These two tests should be changed so that they require version 5.1.X of the server and to be skipped if run under version 5.5.X because the use case being tested is still valid under MySQL version 5.1.X.
[8 Feb 2011 19:46] Chuck Bell
Latest patch for review

Attachment: 60008.bundle (application/octet-stream, text), 16.92 KiB.

[9 Jul 2012 19:08] Chuck Bell
Fixed in 1.0.1dev1.