Bug #56460 ndb.ps_7ndb fails if MTR run with option --mysqld=--query-cache-size=1000000
Submitted: 1 Sep 2010 16:34 Modified: 2 Sep 2010 19:24
Reporter: Sveta Smirnova Email Updates:
Status: Verified Impact on me:
None 
Category:Tests: Cluster Severity:S3 (Non-critical)
Version:5.1 OS:Any
Assigned to: CPU Architecture:Any

[1 Sep 2010 16:34] Sveta Smirnova
Description:
ndb.ps_7ndb fails if MTR run with option  --mysqld=--query-cache-size=1000000

How to repeat:
$./mtr --mysqld=--query-cache-size=1000000 ndb.ps_7ndb
Logging: ./mtr  --mysqld=--query-cache-size=1000000 ndb.ps_7ndb
100901 18:30:24 [Note] Plugin 'FEDERATED' is disabled.
100901 18:30:24 [Note] Plugin 'ndbcluster' is disabled.
MySQL Version 5.1.51
Checking supported features...
 - using ndbcluster when necessary, mysqld supports it
 - SSL connections supported
 - binaries are debug compiled
Collecting tests...
vardir: /users/ssmirnova/blade12/src/mysql-5.1/mysql-test/var
Checking leftover processes...
mysql-test-run: WARNING: Found non pid file 'mysqld-slow.log' in '/users/ssmirnova/blade12/src/mysql-5.1/mysql-test/var/run'
mysql-test-run: WARNING: Found non pid file 'mysqld.log' in '/users/ssmirnova/blade12/src/mysql-5.1/mysql-test/var/run'
mysql-test-run: WARNING: Found non pid file 'mysqld.err' in '/users/ssmirnova/blade12/src/mysql-5.1/mysql-test/var/run'
 - found old pid 9873 in 'mysqld.1.1.pid', killing it...
   process did not exist!
 - found old pid 9877 in 'mysqld.2.1.pid', killing it...
   process did not exist!
 - found old pid 9882 in 'mysqld.2.slave.pid', killing it...
   process did not exist!
Removing old var directory...
 - WARNING: Using the 'mysql-test/var' symlink
Creating var directory '/users/ssmirnova/blade12/src/mysql-5.1/mysql-test/var'...
Installing system database...
Using server port 34364

==============================================================================

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

worker[1] Using MTR_BUILD_THREAD 300, with reserved ports 13000..13009
ndb.ps_7ndb                              [ fail ]
        Test ended at 2010-09-01 18:30:49

CURRENT_TEST: ndb.ps_7ndb
--- /users/ssmirnova/blade12/src/mysql-5.1/mysql-test/suite/ndb/r/ps_7ndb.result        2010-05-31 10:32:27.000000000 +0300
+++ /users/ssmirnova/blade12/src/mysql-5.1/mysql-test/suite/ndb/r/ps_7ndb.reject        2010-09-01 19:30:45.000000000 +0300
@@ -1007,7 +1007,7 @@
                      union distinct
                      select ? FROM t1 where a=1 ' ;
 execute stmt1 using @arg00;
-1
+?
 1
 set @arg00='a' ;
 select @arg00 FROM t1 where a=1

mysqltest: Result content mismatch

 - saving '/users/ssmirnova/blade12/src/mysql-5.1/mysql-test/var/log/ndb.ps_7ndb/' to '/users/ssmirnova/blade12/src/mysql-5.1/mysql-test/var/log/ndb.ps_7ndb/'
------------------------------------------------------------
The servers were restarted 0 times
Spent 0.000 of 25 seconds executing testcases

Completed: Failed 1/1 tests, 0.00% were successful.

Failing test(s): ndb.ps_7ndb

The log files in var/log may give you some hint of what went wrong.

If you want to report this error, please read first the documentation
at http://dev.mysql.com/doc/mysql/en/mysql-test-suite.html

mysql-test-run: *** ERROR: there were failing test cases
[2 Sep 2010 7:43] Magnus BlÄudd
Most testcases are hardly dependent on the settings that mysqld and the rest of the custer is started with. For example turning on query cache.

Please isolate the query(s) that cause the result diff and update the bug report with that info as well.
[2 Sep 2010 19:24] Sveta Smirnova
Thank you for the feedback.

Correct, but if test depends from some settings it should check them before start.

Query which caused the problem:

prepare stmt1 from ' select 1 FROM t1 where a=1
                     union distinct
                     select ? FROM t1 where a=1 ' ;
execute stmt1 using @arg00;

This is line 1007 in result file.

Is look at line 994 we see:

prepare stmt1 from ' select ? FROM t1 where a=1
                     union distinct
                     select 1 FROM t1 where a=1 ' ;
execute stmt1 using @arg00;
?
1

Query is same as in line 1007. Looks like cached query returned after argument changed.