List:Commits« Previous MessageNext Message »
From:Matthias Leich Date:May 15 2009 10:16am
Subject:bzr commit into mysql-5.1-bugteam branch (Matthias.Leich:2888)
Bug#42308
View as plain text  
#At file:///work2/5.1/mysql-5.1-bugteam-42308/ based on revid:bernt.johnsen@stripped

 2888 Matthias Leich	2009-05-15
      Fix for Bug#42308 Several server tests do not pass MTR's --check option
      
      Details:
      Most tests mentioned within the bug report were already fixed.
      The test modified here failed in stability (high parallel load) tests.
      
      Details:
      1. Take care that disconnects are finished before the test terminates.
      2. Correct wrong handling of send/reap in events_stress which caused
         random garbled output
      3. Minor beautifying of script code

    modified:
      mysql-test/include/concurrent.inc
      mysql-test/include/grant_cache.inc
      mysql-test/include/handler.inc
      mysql-test/include/query_cache.inc
      mysql-test/r/concurrent_innodb_safelog.result
      mysql-test/r/concurrent_innodb_unsafelog.result
      mysql-test/r/ddl_i18n_koi8r.result
      mysql-test/r/ddl_i18n_utf8.result
      mysql-test/r/events_stress.result
      mysql-test/r/grant_cache_no_prot.result
      mysql-test/r/grant_cache_ps_prot.result
      mysql-test/t/archive_bitfield.test
      mysql-test/t/client_xml.test
      mysql-test/t/csv.test
      mysql-test/t/ddl_i18n_koi8r.test
      mysql-test/t/ddl_i18n_utf8.test
      mysql-test/t/derived.test
      mysql-test/t/drop.test
      mysql-test/t/events_grant.test
      mysql-test/t/events_stress.test
      mysql-test/t/events_trans_notembedded.test
      mysql-test/t/fix_priv_tables.test
      mysql-test/t/flush.test
      mysql-test/t/func_compress.test
      mysql-test/t/lowercase_fs_off.test
=== modified file 'mysql-test/include/concurrent.inc'
--- a/mysql-test/include/concurrent.inc	2009-03-18 16:23:39 +0000
+++ b/mysql-test/include/concurrent.inc	2009-05-15 10:15:56 +0000
@@ -659,11 +659,16 @@ drop table t1;
   connection thread1;
   select * from t1;
 
+--echo ** Cleanup
+connection thread1;
+disconnect thread1;
+--source include/wait_until_disconnected.inc
+--echo ** connection thread2
+connection thread2;
+disconnect thread2;
+--source include/wait_until_disconnected.inc
 --echo ** connection default
 connection default;
 drop table t1;
 drop user mysqltest@localhost;
 
-disconnect thread1;
-disconnect thread2;
-

=== modified file 'mysql-test/include/grant_cache.inc'
--- a/mysql-test/include/grant_cache.inc	2008-09-03 14:45:40 +0000
+++ b/mysql-test/include/grant_cache.inc	2009-05-15 10:15:56 +0000
@@ -171,15 +171,30 @@ show status like "Qcache_not_cached";
 
 # Cleanup
 
---echo ----- switch to connection default and close connections -----
-connection default;
+--echo ----- close connections -----
+connection root;
 disconnect root;
+--source include/wait_until_disconnected.inc
+connection root2;
 disconnect root2;
+--source include/wait_until_disconnected.inc
+connection user1;
 disconnect user1;
+--source include/wait_until_disconnected.inc
+connection user2;
 disconnect user2;
+--source include/wait_until_disconnected.inc
+connection user3;
 disconnect user3;
+--source include/wait_until_disconnected.inc
+connection user4;
 disconnect user4;
+--source include/wait_until_disconnected.inc
+connection unkuser;
 disconnect unkuser;
+--source include/wait_until_disconnected.inc
+--echo ----- switch to connection default -----
+connection default;
 
 #
 # A temporary 4.1 workaround to make this test pass if

=== modified file 'mysql-test/include/handler.inc'
--- a/mysql-test/include/handler.inc	2009-04-17 08:46:27 +0000
+++ b/mysql-test/include/handler.inc	2009-05-15 10:15:56 +0000
@@ -719,6 +719,7 @@ connection con1;
 --reap
 drop table t1;
 disconnect con1;
+--source include/wait_until_disconnected.inc
 connection default;
 
 #

=== modified file 'mysql-test/include/query_cache.inc'
--- a/mysql-test/include/query_cache.inc	2008-11-13 19:19:00 +0000
+++ b/mysql-test/include/query_cache.inc	2009-05-15 10:15:56 +0000
@@ -177,6 +177,7 @@ show status like "Qcache_hits";
 
 # Final cleanup
 eval set GLOBAL query_cache_size=$save_query_cache_size;
+disconnect connection1;
+--source include/wait_until_disconnected.inc
 connection default;
 drop table t2;
-disconnect connection1;

=== modified file 'mysql-test/r/concurrent_innodb_safelog.result'
--- a/mysql-test/r/concurrent_innodb_safelog.result	2009-03-17 13:43:43 +0000
+++ b/mysql-test/r/concurrent_innodb_safelog.result	2009-05-15 10:15:56 +0000
@@ -785,6 +785,8 @@ eta	tipo	c
 70	1	iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
 80	22	jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
 90	11	kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
+** Cleanup
+** connection thread2
 ** connection default
 drop table t1;
 drop user mysqltest@localhost;

=== modified file 'mysql-test/r/concurrent_innodb_unsafelog.result'
--- a/mysql-test/r/concurrent_innodb_unsafelog.result	2009-03-17 13:43:43 +0000
+++ b/mysql-test/r/concurrent_innodb_unsafelog.result	2009-05-15 10:15:56 +0000
@@ -781,6 +781,8 @@ eta	tipo	c
 70	1	iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
 80	1	jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
 90	11	kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
+** Cleanup
+** connection thread2
 ** connection default
 drop table t1;
 drop user mysqltest@localhost;

=== modified file 'mysql-test/r/ddl_i18n_koi8r.result'
--- a/mysql-test/r/ddl_i18n_koi8r.result	2009-02-19 17:22:28 +0000
+++ b/mysql-test/r/ddl_i18n_koi8r.result	2009-05-15 10:15:56 +0000
@@ -2829,7 +2829,11 @@ t2	CREATE TABLE `t2` (
   `col1` varchar(10) COLLATE cp1251_general_cs DEFAULT NULL
 ) ENGINE=MyISAM DEFAULT CHARSET=cp1251 COLLATE=cp1251_general_cs
 
+---> connection: con2
+
+---> connection: con3
+
 ---> connection: default
-use test|
-DROP DATABASE mysqltest1|
-DROP DATABASE mysqltest2|
+USE test;
+DROP DATABASE mysqltest1;
+DROP DATABASE mysqltest2;

=== modified file 'mysql-test/r/ddl_i18n_utf8.result'
--- a/mysql-test/r/ddl_i18n_utf8.result	2009-02-19 17:22:28 +0000
+++ b/mysql-test/r/ddl_i18n_utf8.result	2009-05-15 10:15:56 +0000
@@ -2829,7 +2829,11 @@ t2	CREATE TABLE `t2` (
   `col1` varchar(10) COLLATE cp1251_general_cs DEFAULT NULL
 ) ENGINE=MyISAM DEFAULT CHARSET=cp1251 COLLATE=cp1251_general_cs
 
+---> connection: con2
+
+---> connection: con3
+
 ---> connection: default
-use test|
-DROP DATABASE mysqltest1|
-DROP DATABASE mysqltest2|
+USE test;
+DROP DATABASE mysqltest1;
+DROP DATABASE mysqltest2;

=== modified file 'mysql-test/r/events_stress.result'
--- a/mysql-test/r/events_stress.result	2006-09-01 11:08:44 +0000
+++ b/mysql-test/r/events_stress.result	2009-05-15 10:15:56 +0000
@@ -63,3 +63,4 @@ DROP TABLE fill_it1;
 DROP TABLE fill_it2;
 DROP TABLE fill_it3;
 DROP DATABASE events_test;
+SET GLOBAL event_scheduler=off;

=== modified file 'mysql-test/r/grant_cache_no_prot.result'
--- a/mysql-test/r/grant_cache_no_prot.result	2008-09-03 14:45:40 +0000
+++ b/mysql-test/r/grant_cache_no_prot.result	2009-05-15 10:15:56 +0000
@@ -206,7 +206,8 @@ Qcache_hits	8
 show status like "Qcache_not_cached";
 Variable_name	Value
 Qcache_not_cached	8
------ switch to connection default and close connections -----
+----- close connections -----
+----- switch to connection default -----
 set names binary;
 delete from mysql.user where user in ("mysqltest_1","mysqltest_2","mysqltest_3");
 delete from mysql.db where user in ("mysqltest_1","mysqltest_2","mysqltest_3");

=== modified file 'mysql-test/r/grant_cache_ps_prot.result'
--- a/mysql-test/r/grant_cache_ps_prot.result	2008-09-03 14:45:40 +0000
+++ b/mysql-test/r/grant_cache_ps_prot.result	2009-05-15 10:15:56 +0000
@@ -206,7 +206,8 @@ Qcache_hits	8
 show status like "Qcache_not_cached";
 Variable_name	Value
 Qcache_not_cached	5
------ switch to connection default and close connections -----
+----- close connections -----
+----- switch to connection default -----
 set names binary;
 delete from mysql.user where user in ("mysqltest_1","mysqltest_2","mysqltest_3");
 delete from mysql.db where user in ("mysqltest_1","mysqltest_2","mysqltest_3");

=== modified file 'mysql-test/t/archive_bitfield.test'
--- a/mysql-test/t/archive_bitfield.test	2006-01-12 05:16:51 +0000
+++ b/mysql-test/t/archive_bitfield.test	2009-05-15 10:15:56 +0000
@@ -94,5 +94,11 @@ INSERT INTO `t1` VALUES
 (NULL,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'100000',b'010010',b'011111',4,5,5,5,5,5,5,5,5,5,3,2,1),
 (NULL,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'000000',b'001100',b'111111',4,5,5,5,5,5,5,5,5,5,3,2,1),
 (NULL,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'111111',b'000000',b'000000',4,5,5,5,5,5,5,5,5,5,3,2,1);
+# Determine the number of open sessions
+--source include/count_sessions.inc
 --exec $MYSQL_DUMP --hex-blob --compact --order-by-primary --skip-extended-insert --no-create-info test t1
 drop table t1;
+# Wait till the number of open sessions is <= the number before the run with $MYSQL_DUMP
+# = The session caused by mysqldump has finished its disconnect
+--source include/wait_until_count_sessions.inc
+

=== modified file 'mysql-test/t/client_xml.test'
--- a/mysql-test/t/client_xml.test	2008-07-18 12:00:45 +0000
+++ b/mysql-test/t/client_xml.test	2009-05-15 10:15:56 +0000
@@ -18,6 +18,10 @@ create table t1 (
   `a>b` text
 );
 insert into t1 values (1, 2, 'a&b a<b a>b');
+
+# Determine the number of open sessions
+--source include/count_sessions.inc
+
 --exec $MYSQL --xml test -e "select * from t1"
 --exec $MYSQL_DUMP --xml --skip-create test
 
@@ -33,3 +37,8 @@ drop table t1;
 
 # Restore global concurrent_insert value
 set @@global.concurrent_insert= @old_concurrent_insert;
+
+# Wait till the number of open sessions is <= the number before the runs with
+# $MYSQL and $MYSQL_DUMP
+# = The session caused by mysql and mysqldump have finished their disconnect
+--source include/wait_until_count_sessions.inc

=== modified file 'mysql-test/t/csv.test'
--- a/mysql-test/t/csv.test	2009-01-23 12:22:05 +0000
+++ b/mysql-test/t/csv.test	2009-05-15 10:15:56 +0000
@@ -1800,10 +1800,11 @@ connect (con1,localhost,root,,);
 # EE_FILENOTFOUND 29
 --error 29
 select * from t1;
+--disconnect con1
+--source include/wait_until_disconnected.inc
 connection default;
 unlock tables;
 drop table t1;
---disconnect con1
 
 #
 # Bug#41441 repair csv table crashes debug server

=== modified file 'mysql-test/t/ddl_i18n_koi8r.test'
--- a/mysql-test/t/ddl_i18n_koi8r.test	2009-03-04 12:45:49 +0000
+++ b/mysql-test/t/ddl_i18n_koi8r.test	2009-05-15 10:15:56 +0000
@@ -1128,15 +1128,22 @@ SHOW CREATE TABLE mysqltest2.t2|
 #
 # Cleanup.
 #
+delimiter ;|
 
---connection default
+--connection con2
 --echo
---echo ---> connection: default
-
+--echo ---> connection: con2
 --disconnect con2
+--source include/wait_until_disconnected.inc
+--connection con3
+--echo
+--echo ---> connection: con3
 --disconnect con3
+--source include/wait_until_disconnected.inc
+--connection default
+--echo
+--echo ---> connection: default
+USE test;
+DROP DATABASE mysqltest1;
+DROP DATABASE mysqltest2;
 
-use test|
-
-DROP DATABASE mysqltest1|
-DROP DATABASE mysqltest2|

=== modified file 'mysql-test/t/ddl_i18n_utf8.test'
--- a/mysql-test/t/ddl_i18n_utf8.test	2009-03-04 12:45:49 +0000
+++ b/mysql-test/t/ddl_i18n_utf8.test	2009-05-15 10:15:56 +0000
@@ -1128,15 +1128,22 @@ SHOW CREATE TABLE mysqltest2.t2|
 #
 # Cleanup.
 #
+delimiter ;|
 
---connection default
+--connection con2
 --echo
---echo ---> connection: default
-
+--echo ---> connection: con2
 --disconnect con2
+--source include/wait_until_disconnected.inc
+--connection con3
+--echo
+--echo ---> connection: con3
 --disconnect con3
+--source include/wait_until_disconnected.inc
+--connection default
+--echo
+--echo ---> connection: default
+USE test;
+DROP DATABASE mysqltest1;
+DROP DATABASE mysqltest2;
 
-use test|
-
-DROP DATABASE mysqltest1|
-DROP DATABASE mysqltest2|

=== modified file 'mysql-test/t/derived.test'
--- a/mysql-test/t/derived.test	2007-10-29 11:11:05 +0000
+++ b/mysql-test/t/derived.test	2009-05-15 10:15:56 +0000
@@ -273,7 +273,9 @@ select t2.* from ((select * from t1) as
 select t2.* from (select * from t1) as A inner join t2 on A.ID = t2.FID;
 drop table t1, t2;
 
+connection con1;
 disconnect con1;
+--source include/wait_until_disconnected.inc
 connection default;
 drop user mysqltest_1;
 

=== modified file 'mysql-test/t/drop.test'
--- a/mysql-test/t/drop.test	2009-03-04 12:45:49 +0000
+++ b/mysql-test/t/drop.test	2009-05-15 10:15:56 +0000
@@ -117,8 +117,11 @@ connection addconroot1;
 --reap
 connection addconroot2;
 --reap
-disconnect addconroot1;
 disconnect addconroot2;
+--source include/wait_until_disconnected.inc
+connection addconroot1;
+disconnect addconroot1;
+--source include/wait_until_disconnected.inc
 connection default;
 
 --echo End of 5.0 tests

=== modified file 'mysql-test/t/events_grant.test'
--- a/mysql-test/t/events_grant.test	2007-05-26 14:36:38 +0000
+++ b/mysql-test/t/events_grant.test	2009-05-15 10:15:56 +0000
@@ -97,7 +97,9 @@ DROP EVENT one_event;
 connection default;
 --echo "One event should not be there"
 SELECT EVENT_CATALOG, EVENT_SCHEMA, EVENT_NAME, DEFINER, EVENT_BODY, EVENT_DEFINITION, EVENT_TYPE, EXECUTE_AT, INTERVAL_VALUE, INTERVAL_FIELD, STATUS,ON_COMPLETION, EVENT_COMMENT FROM INFORMATION_SCHEMA.EVENTS ORDER BY EVENT_SCHEMA, EVENT_NAME;
+connection ev_con1;
 disconnect ev_con1;
+--source include/wait_until_disconnected.inc
 connection default;
 DROP USER ev_test@localhost;
 DROP DATABASE events_test2;
@@ -106,9 +108,6 @@ DROP DATABASE events_test2;
 # End of tests
 #
 
-let $wait_condition=
-  select count(*) = 0 from information_schema.processlist
-  where db='events_test' and command = 'Connect' and user=current_user();
---source include/wait_condition.inc
+--source include/check_events_off.inc
 
 DROP DATABASE events_test;

=== modified file 'mysql-test/t/events_stress.test'
--- a/mysql-test/t/events_stress.test	2007-05-26 14:36:38 +0000
+++ b/mysql-test/t/events_stress.test	2009-05-15 10:15:56 +0000
@@ -109,7 +109,7 @@ connection conn3;
 --send
 DROP DATABASE events_conn3_db;
 connection default;
---send
+# --send
 DROP DATABASE events_conn1_test2;
 DROP DATABASE events_conn1_test3;
 SET GLOBAL event_scheduler=off;
@@ -135,3 +135,7 @@ DROP USER event_user3@localhost;
 #
 
 DROP DATABASE events_test;
+
+# Cleanup
+SET GLOBAL event_scheduler=off;
+--source include/check_events_off.inc

=== modified file 'mysql-test/t/events_trans_notembedded.test'
--- a/mysql-test/t/events_trans_notembedded.test	2007-05-26 14:36:38 +0000
+++ b/mysql-test/t/events_trans_notembedded.test	2009-05-15 10:15:56 +0000
@@ -50,6 +50,7 @@ delete from t1;
 commit work;
 # Cleanup
 disconnect conn1;
+--source include/wait_until_disconnected.inc
 connection default;
 drop user mysqltest_user1@localhost;
 drop database mysqltest_db2;

=== modified file 'mysql-test/t/fix_priv_tables.test'
--- a/mysql-test/t/fix_priv_tables.test	2008-08-04 19:54:44 +0000
+++ b/mysql-test/t/fix_priv_tables.test	2009-05-15 10:15:56 +0000
@@ -51,8 +51,13 @@ echo;
 -- disable_query_log
 
 # Run the mysql_fix_privilege_tables.sql using "mysql --force"
+# Determine the number of open sessions
+--source include/count_sessions.inc
 --exec $MYSQL --force mysql < $MYSQL_FIX_PRIVILEGE_TABLES > $MYSQLTEST_VARDIR/tmp/fix_priv_tables.log 2>&1
 --remove_file $MYSQLTEST_VARDIR/tmp/fix_priv_tables.log
+# Wait till the number of open sessions is <= the number before the run with $MYSQL
+# = The session caused by mysql has finished its disconnect
+--source include/wait_until_count_sessions.inc
 
 -- enable_query_log
 -- enable_result_log

=== modified file 'mysql-test/t/flush.test'
--- a/mysql-test/t/flush.test	2008-03-23 16:35:00 +0000
+++ b/mysql-test/t/flush.test	2009-05-15 10:15:56 +0000
@@ -171,6 +171,7 @@ set session low_priority_updates=default
 connect (con1,localhost,root,,);
 send select benchmark(200, (select sin(1))) > 1000;
 disconnect con1;
+--source include/wait_until_disconnected.inc
 connection default;
 
 --echo End of 5.0 tests

=== modified file 'mysql-test/t/func_compress.test'
--- a/mysql-test/t/func_compress.test	2009-01-31 16:10:43 +0000
+++ b/mysql-test/t/func_compress.test	2009-05-15 10:15:56 +0000
@@ -50,6 +50,7 @@ set @@global.max_allowed_packet=1048576*
 --connect (newconn, localhost, root,,)
 eval select compress(repeat('aaaaaaaaaa', IF('$LOW_MEMORY', 10, 10000000))) is null;
 disconnect newconn;
+--source include/wait_until_disconnected.inc
 connection default;
 set @@global.max_allowed_packet=default;
 

=== modified file 'mysql-test/t/lowercase_fs_off.test'
--- a/mysql-test/t/lowercase_fs_off.test	2006-11-14 18:45:52 +0000
+++ b/mysql-test/t/lowercase_fs_off.test	2009-05-15 10:15:56 +0000
@@ -14,16 +14,18 @@ flush privileges;
 connect (sample,localhost,sample,password,d1);
 connection sample;
 select database();
---error 1044
+--error ER_DBACCESS_DENIED_ERROR
 create database d2;
---error 1044
+--error ER_DBACCESS_DENIED_ERROR
 create database D1;
 disconnect sample;
+--source include/wait_until_disconnected.inc
 
 connection master;
 drop user 'sample'@'localhost';
 drop database if exists d1;
 disconnect master;
+--source include/wait_until_disconnected.inc
 connection default;
 
 # End of 4.1 tests


Attachment: [text/bzr-bundle] bzr/matthias.leich@sun.com-20090515101556-10dt6d2piph9pxww.bundle
Thread
bzr commit into mysql-5.1-bugteam branch (Matthias.Leich:2888)Bug#42308Matthias Leich15 May