Bug #58414 Race condition in show_check.test
Submitted: 23 Nov 2010 12:09 Modified: 12 Jan 2011 17:31
Reporter: Alexander Nozdrin Email Updates:
Status: Closed Impact on me:
None 
Category:Tests: Server Severity:S3 (Non-critical)
Version:5.5 OS:Any
Assigned to: Matthias Leich CPU Architecture:Any
Tags: experimental, pb2, test failure

[23 Nov 2010 12:09] Alexander Nozdrin
Description:
Symptoms:
-------------------------------------------------------------------------
main.show_check [ fail ]
        Test ended at 2010-11-22 19:53:48

CURRENT_TEST: main.show_check
--- /export/home2/pb2/test/sb_2-2566974-1290449401.93/usr/share/mysql-test/r/show_check.result	2010-11-22 21:10:33.000000000 +0300
+++ /export/home2/pb2/test/sb_2-2566974-1290449401.93/usr/share/mysql-test/r/show_check.reject	2010-11-22 21:53:48.000000000 +0300
@@ -1526,11 +1526,13 @@
 SHOW PROCESSLIST;
 Id	User	Host	db	Command	Time	State	Info
 ###	root	###	test	Query	###	###	SHOW PROCESSLIST
+###	root	###	test	Query	###	###	ALTER TABLE t1 CHARACTER SET = utf8
 ###	root	###	test	Query	###	###	SELECT GET_LOCK('t',1000) AS 'óóóó'
 SET NAMES utf8;
 SHOW PROCESSLIST;
 Id	User	Host	db	Command	Time	State	Info
 ###	root	###	test	Query	###	###	SHOW PROCESSLIST
+###	root	###	test	Query	###	###	ALTER TABLE t1 CHARACTER SET = utf8
 ###	root	###	test	Query	###	###	SELECT GET_LOCK('t',1000) AS 'óóóó'
 SELECT RELEASE_LOCK('t');
 RELEASE_LOCK('t')

mysqltest: Result content mismatch

 - saving '/export/home2/pb2/test/sb_2-2566974-1290449401.93/usr/share/mysql-test/var/log/main.show_check/' to '/export/home2/pb2/test/sb_2-2566974-1290449401.93/usr/share/mysql-test/var/log/main.show_check/'

Retrying test main.show_check, attempt(2/3)...

main.show_check                          [ retry-fail ]
        Test ended at 2010-11-22 19:53:52

CURRENT_TEST: main.show_check
--- /export/home2/pb2/test/sb_2-2566974-1290449401.93/usr/share/mysql-test/r/show_check.result	2010-11-22 21:10:33.000000000 +0300
+++ /export/home2/pb2/test/sb_2-2566974-1290449401.93/usr/share/mysql-test/r/show_check.reject	2010-11-22 21:53:51.000000000 +0300
@@ -1526,11 +1526,13 @@
 SHOW PROCESSLIST;
 Id	User	Host	db	Command	Time	State	Info
 ###	root	###	test	Query	###	###	SHOW PROCESSLIST
+###	root	###	test	Query	###	###	ALTER TABLE t1 CHARACTER SET = utf8
 ###	root	###	test	Query	###	###	SELECT GET_LOCK('t',1000) AS 'óóóó'
 SET NAMES utf8;
 SHOW PROCESSLIST;
 Id	User	Host	db	Command	Time	State	Info
 ###	root	###	test	Query	###	###	SHOW PROCESSLIST
+###	root	###	test	Query	###	###	ALTER TABLE t1 CHARACTER SET = utf8
 ###	root	###	test	Query	###	###	SELECT GET_LOCK('t',1000) AS 'óóóó'
 SELECT RELEASE_LOCK('t');
 RELEASE_LOCK('t')

mysqltest: Result content mismatch
-------------------------------------------------------------------------

How to repeat:
Found in 5.5-security on 'linux2.6-x86-64bit community rpm': http://pb2.norway.sun.com/?action=archive_download&archive_id=2568974&pretty=please

My theory is the following:

  - the failure happens in the test case for Bug#57306

  - the problem is that 'source include/wait_until_count_sessions.inc'
    before the failing test case does not wait the 'con1' connection
    running 'ALTER TABLE t1 CHARACTER SET = utf8;'

  - that might be because at 'source include/count_sessions.inc'
    time (in the beginning of the test file) there is an extra
    connection.
[24 Nov 2010 13:31] Alexander Nozdrin
The test case has been marked experimental due to this bug.
Pushed to 5.5-security.
[8 Dec 2010 12: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/126313
[16 Dec 2010 21:47] Bugs System
Pushed into mysql-trunk 5.6.1 (revid:alexander.nozdrin@oracle.com-20101216181820-7afubgk2fmuv9qsb) (version source revid:alexander.nozdrin@oracle.com-20101216181820-7afubgk2fmuv9qsb) (merge vers: 5.6.1) (pib:23)
[16 Dec 2010 22:27] Bugs System
Pushed into mysql-5.5 5.5.9 (revid:jonathan.perkin@oracle.com-20101216101358-fyzr1epq95a3yett) (version source revid:jonathan.perkin@oracle.com-20101216101358-fyzr1epq95a3yett) (merge vers: 5.5.9) (pib:24)
[18 Dec 2010 11:04] John Embretsen
Matthias, I looked at the patch at http://lists.mysql.com/commits/126313 and tested it on OpenSolaris x64 and Mac OS X 10.6. Patch looks good to me, your changes seem to make the test more robust. I did not see the original problem, so I cannot say if it really fixes it, but assuming the assumptions in this bug report are correct this looks like a good solution.
[7 Jan 2011 13:32] 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/128168
[7 Jan 2011 16:40] Bugs System
Pushed into mysql-trunk 5.6.2 (revid:matthias.leich@oracle.com-20110107161048-6x3vunwcyt3jl4pe) (version source revid:matthias.leich@oracle.com-20110107161048-6x3vunwcyt3jl4pe) (merge vers: 5.6.2) (pib:24)
[7 Jan 2011 16:40] Bugs System
Pushed into mysql-5.5 5.5.9 (revid:matthias.leich@oracle.com-20110107133746-6j11qtmifhjq0mw2) (version source revid:matthias.leich@oracle.com-20110107133746-6j11qtmifhjq0mw2) (merge vers: 5.5.9) (pib:24)
[10 Jan 2011 14:26] 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/128313

3229 Matthias Leich	2011-01-10
      The fix for Bug#58414 affecting the test show_check is pushed.
      Remove the test from defaults.experimental.
[10 Jan 2011 14:46] 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/128317

3230 Matthias Leich	2011-01-10
      The fix for Bug#58414 affecting the test show_check is pushed.
      Remove the test from defaults.experimental.
[10 Jan 2011 14:53] Bugs System
Pushed into mysql-trunk 5.6.2 (revid:matthias.leich@oracle.com-20110110145743-yeax7y275a9ej35o) (version source revid:matthias.leich@oracle.com-20110110145743-yeax7y275a9ej35o) (merge vers: 5.6.2) (pib:24)
[10 Jan 2011 14:53] Bugs System
Pushed into mysql-5.5 5.5.9 (revid:matthias.leich@oracle.com-20110110145306-wdsagy5duo9ngkw3) (version source revid:matthias.leich@oracle.com-20110110145306-wdsagy5duo9ngkw3) (merge vers: 5.5.9) (pib:24)
[10 Jan 2011 15:35] Paul DuBois
Changes to test suite. No changelog entry needed.