Bug #55689 mysqldump fails with new server module against old MySQL due to --no-tablespaces
Submitted: 2 Aug 2010 15:08 Modified: 3 Aug 2010 14:25
Reporter: John Embretsen Email Updates:
Status: Closed Impact on me:
None 
Category:Tools: Random Query Generator Severity:S2 (Serious)
Version:revno-498 OS:Any
Assigned to: John Embretsen CPU Architecture:Any

[2 Aug 2010 15:08] John Embretsen
Description:
A number of RQG test runs include one or more invocations of the mysqldump tool in order to compare database contents between multiple server instances.

When the RQG is using the built-in DBServer module instead of MTR to start the MySQL server, the mysqldump binary for each respective basedir is used. With the old setup (MTR), only the mysqldump binary for one of the basedirs is used.

If the RQG is testing a MySQL version older than 5.1.14 (e.g. 5.0.x), the call to mysqldump fails with:

# 2010-07-31T23:09:20 Dumping MySQL server 5.0.87 on port 19302
mysqldump: unknown option '--no-tablespaces'

Subsequent comparison of dumps between databases will report a diff since no dump was produced from 5.0.x, and the test will result in a failure.

How to repeat:
perl runall-new.pl \ 
--gendata=conf/partitioning/partition_pruning.zz \ 
--grammar=conf/partitioning/partition_pruning.yy \ 
--basedir1=/path/to/some/mysql \ 
--basedir2=/path/to/mysql-5.0 \ 
--vardir1=/path/to/vardir1 \ 
--vardir2=/path/to/vardir2 \ 
--mysqld=--innodb \ 
--validators=ResultsetComparator \ 
--reporters=Deadlock,ErrorLog,Backtrace \ 
--threads=1 \ 
--queries=10000 \ 
--duration=300

Suggested fix:
Remove --no-tablespaces from generic mysqldump command in DBServer module.

Conditionally add --no-tablespaces to mysqldump command only if MySQL version is 5.1.14 or newer. See DbServer::MySQL::MySQLd.pm sub "dumpdb".
[2 Aug 2010 15:08] John Embretsen
This is presumably causing failures of the test "rqg_partn_pruning_compare_50" in Pushbuild in cases where pb2gentest-new.pl is used (to avoid MTR bug#54835).
[3 Aug 2010 7:47] John Embretsen
Patch to fix bug55689

Attachment: rqg-dump-fix2.diff (text/plain), 1.91 KiB.

[3 Aug 2010 7:48] John Embretsen
With the patch, relevant parts of test output changes to:

# 2010-08-03T09:45:08 Test completed successfully.
# 2010-08-03T09:45:08 gentest.pl exited with exit status 0
# 2010-08-03T09:45:08 Dumping server on port 10110...
# 2010-08-03T09:45:14 Dumping server on port 10112...
# 2010-08-03T09:45:21 Comparing SQL dumps...
# 2010-08-03T09:45:21 No differences were found between servers.
[3 Aug 2010 14:25] John Embretsen
Patch committed and pushed to randgen trunk with revno 501 2010-08-03:

http://bazaar.launchpad.net/~randgen/randgen/rqg2/revision/501