[Maria-developers] bzr commit into MariaDB 5.1, with Maria 1.5:maria branch (knielsen:2801)
#At lp:maria 2801 knielsen@knielsen-hq.org 2010-01-18 Fixes for some randomly occuring test failures in Buildbot. modified: mysql-test/r/innodb-timeout.result mysql-test/suite/rpl/r/rpl_relayspace.result mysql-test/suite/rpl/t/rpl_relayspace.test mysql-test/t/innodb-timeout.test mysql-test/valgrind.supp per-file messages: mysql-test/r/innodb-timeout.result Make test more robust to scheduling delays on the host running the test suite. mysql-test/suite/rpl/r/rpl_relayspace.result Apply patch from BUG#25228 and tweak timeout value in an attempt to fix random failure of this test in Buildbot (could not repeat locally). mysql-test/suite/rpl/t/rpl_relayspace.test Apply patch from BUG#25228 and tweak timeout value in an attempt to fix random failure of this test in Buildbot (could not repeat locally). mysql-test/t/innodb-timeout.test Make test more robust to scheduling delays on the host running the test suite. mysql-test/valgrind.supp Add suppression for Glibc bug. === modified file 'mysql-test/r/innodb-timeout.result' --- a/mysql-test/r/innodb-timeout.result 2009-06-09 13:19:13 +0000 +++ b/mysql-test/r/innodb-timeout.result 2010-01-18 11:29:53 +0000 @@ -23,6 +23,7 @@ select @@innodb_lock_wait_timeout; create table t1(a int primary key)engine=innodb; begin; insert into t1 values(1),(2),(3); +set innodb_lock_wait_timeout=5; select * from t1 for update; commit; a @@ -31,8 +32,15 @@ a 3 begin; insert into t1 values(4); +set innodb_lock_wait_timeout=1; +set @a= current_timestamp(); select * from t1 for update; -commit; ERROR HY000: Lock wait timeout exceeded; try restarting transaction +set @b= current_timestamp(); +set @c= timestampdiff(SECOND, @a, @b); +select if(@c >= 1 and @c <= 10, 'OK', concat("NOT OK, time passed=", @c)); +if(@c >= 1 and @c <= 10, 'OK', concat("NOT OK, time passed=", @c)) +OK +commit; drop table t1; set global innodb_lock_wait_timeout=50; === modified file 'mysql-test/suite/rpl/r/rpl_relayspace.result' --- a/mysql-test/suite/rpl/r/rpl_relayspace.result 2007-06-27 12:28:02 +0000 +++ b/mysql-test/suite/rpl/r/rpl_relayspace.result 2010-01-18 11:29:53 +0000 @@ -14,6 +14,6 @@ start slave io_thread; stop slave io_thread; reset slave; start slave; -select master_pos_wait('master-bin.001',200,6)=-1; -master_pos_wait('master-bin.001',200,6)=-1 +select master_pos_wait('MASTER_LOG_FILE',200,30)=-1; +master_pos_wait('MASTER_LOG_FILE',200,30)=-1 0 === modified file 'mysql-test/suite/rpl/t/rpl_relayspace.test' --- a/mysql-test/suite/rpl/t/rpl_relayspace.test 2008-02-28 11:36:14 +0000 +++ b/mysql-test/suite/rpl/t/rpl_relayspace.test 2010-01-18 11:29:53 +0000 @@ -2,8 +2,10 @@ # to force the deadlock after one event. source include/master-slave.inc; +let $master_log_file= query_get_value(SHOW MASTER STATUS, File, 1); connection slave; stop slave; +source include/wait_for_slave_to_stop.inc; connection master; # This will generate a master's binlog > 10 bytes create table t1 (a int); @@ -20,6 +22,7 @@ source include/wait_for_slave_param.inc; # A bug caused the I/O thread to refuse stopping. stop slave io_thread; +source include/wait_for_slave_io_to_stop.inc; reset slave; start slave; # The I/O thread stops filling the relay log when @@ -29,9 +32,11 @@ start slave; # So we should have a deadlock. # if it is not resolved automatically we'll detect # it with master_pos_wait that waits for farther than 1Ob; -# it will timeout after 10 seconds; +# it will timeout; # also the slave will probably not cooperate to shutdown # (as 2 threads are locked) -select master_pos_wait('master-bin.001',200,6)=-1; +--replace_result $master_log_file MASTER_LOG_FILE +eval select master_pos_wait('$master_log_file',200,30)=-1; + # End of 4.1 tests === modified file 'mysql-test/t/innodb-timeout.test' --- a/mysql-test/t/innodb-timeout.test 2009-06-09 13:19:13 +0000 +++ b/mysql-test/t/innodb-timeout.test 2010-01-18 11:29:53 +0000 @@ -30,6 +30,7 @@ begin; insert into t1 values(1),(2),(3); connection b; +set innodb_lock_wait_timeout=5; --send select * from t1 for update; @@ -44,16 +45,20 @@ begin; insert into t1 values(4); connection b; ---send +# Test that we get a lock timeout. +# We cannot reliably test that the timeout is exactly 1 seconds due to +# process scheduling differences on the host running the test suite. But we +# can test that we are within reasonable range. +set innodb_lock_wait_timeout=1; +set @a= current_timestamp(); +--error ER_LOCK_WAIT_TIMEOUT select * from t1 for update; +set @b= current_timestamp(); +set @c= timestampdiff(SECOND, @a, @b); +select if(@c >= 1 and @c <= 10, 'OK', concat("NOT OK, time passed=", @c)); connection a; -sleep 2; commit; - -connection b; ---error ER_LOCK_WAIT_TIMEOUT -reap; drop table t1; connection default; === modified file 'mysql-test/valgrind.supp' --- a/mysql-test/valgrind.supp 2009-12-03 11:19:05 +0000 +++ b/mysql-test/valgrind.supp 2010-01-18 11:29:53 +0000 @@ -991,3 +991,15 @@ fun:_dl_allocate_tls fun:pthread_create* } + +# +# Bug in Glibc 2.9: http://sourceware.org/bugzilla/show_bug.cgi?id=10391 +# Fixed in latest Glibc, but suppressed here for running tests on hosts +# with older Glibc version. +# +{ + Glibc bug in __libc_res_nsend + Memcheck:Cond + fun:__libc_res_nsend + fun:__libc_res_nquery +}
participants (1)
-
knielsen@knielsen-hq.org