Bug #41231 falcon.falcon_bug_22181 test does not clean up after itself
Submitted: 4 Dec 2008 15:21 Modified: 13 Dec 2008 7:26
Reporter: John Embretsen Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Falcon storage engine Severity:S3 (Non-critical)
Version:6.0.9-bzr OS:Any
Assigned to: Hakan Küçükyılmaz CPU Architecture:Any
Tags: F_TEST
Triage: Triaged: D3 (Medium)

[4 Dec 2008 15:21] John Embretsen
Description:
This is revealed when running the test with the --check-testcases option. Also shown in Pushbuild in branches using the new version of MTR (mysql-test-run.pl):

falcon.falcon_bug_22181                  [ pass ]     15

MTR's internal check of the test case 'falcon.falcon_bug_22181' failed.
This means that the test case does not preserve the state that existed
before the test case was executed.  Most likely the test case did not
do a proper clean-up.
This is the diff of the states of the servers before and after the
test case was executed:
--- /dev/shm/var-falcon-100/tmp/check-mysqld_1.result	2008-12-02 22:59:32.531320500 +0300
+++ /dev/shm/var-falcon-100/tmp/check-mysqld_1.reject	2008-12-02 22:59:34.071416750 +0300
@@ -148,7 +148,7 @@
 MARIA_STATS_METHOD	nulls_unequal
 BACKUP_HISTORY_LOG_FILE	/dev/shm/var-falcon-100/mysqld.1/data/backup_history.log
 FALCON_DIRECT_IO	1
-QUERY_CACHE_SIZE	0
+QUERY_CACHE_SIZE	199680
 MAX_JOIN_SIZE	18446744073709551615
 LONG_QUERY_TIME	10.000000
 FALCON_USE_SECTORCACHE	OFF

mysqltest: Result content mismatch

Such missing cleanup can cause subsequent tests to fail (if they depend on the value of QUERY_CACHE_SIZE).

How to repeat:
$ cd mysql-test
$ ./mysql-test-run.pl --suite=falcon --check-testcases falcon_bug_22181

Suggested fix:
Store the original value of QUERY_CACHE_SIZE at the beginning of the test and re-set it at the end of the test (cleanup section).

Also format the test so that it is more similar to the falcon_bug.template.
[4 Dec 2008 15:44] Hakan Küçükyılmaz
hakan@lu0011:~/work/mysql/mysql-6.0-falcon/mysql-test$ ./mysql-test-run.pl --check-testcase --force --mem --skip-ndb --suite=falcon falcon_bug_22181
Logging: ./mysql-test-run.pl --check-testcase --force --mem --skip-ndb --suite=falcon falcon_bug_22181
MySQL Version 6.0.9
Using dynamic switching of binlog format
Using tmpfs in /dev/shm
Skipping ndbcluster
Setting mysqld to support SSL connections
Using MTR_BUILD_THREAD      = 0
Using MASTER_MYPORT         = 9306
Using MASTER_MYPORT1        = 9307
Using SLAVE_MYPORT          = 9308
Using SLAVE_MYPORT1         = 9309
Using SLAVE_MYPORT2         = 9310
Killing Possible Leftover Processes
Removing Stale Files
Creating Directories
Symlinking 'var' to '/dev/shm/var'
Installing Master Database
Saving snapshot of installed databases
=======================================================

TEST                           RESULT         TIME (ms)
-------------------------------------------------------

falcon.falcon_bug_22181        [ pass ]              5
-------------------------------------------------------
Stopping All Servers
All 1 tests were successful.
The servers were restarted 1 times
Spent 0.005 of 3 seconds executing testcases
[4 Dec 2008 15:45] 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/60620

2926 Hakan Kuecuekyilmaz	2008-12-04
      Fix for Bug#41231 falcon.falcon_bug_22181 test does not clean up after itself.
[4 Dec 2008 15:50] 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/60621

2925 Hakan Kuecuekyilmaz	2008-12-04
      Fix for Bug#41231 falcon.falcon_bug_22181 test does not clean up after itself.
[5 Dec 2008 9:22] John Embretsen
Patch looking good - thanks!
[11 Dec 2008 14:19] Bugs System
Pushed into 6.0.9-alpha  (revid:hky@sun.com-20081204155029-1k55mci4yuon63yo) (version source revid:hky@sun.com-20081205164847-vbocpvlyf6fbxkkj) (pib:5)
[13 Dec 2008 7:26] MC Brown
No documentation needed.