← Back to team overview

maria-developers team mailing list archive

[Branch ~maria-captains/maria/5.1] Rev 2801: Fixes for some randomly occuring test failures in Buildbot.

 

------------------------------------------------------------
revno: 2801
committer: knielsen@xxxxxxxxxxxxxxx
branch nick: work-5.1
timestamp: Mon 2010-01-18 13:56:10 +0100
message:
  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


--
lp:maria
https://code.launchpad.net/~maria-captains/maria/5.1

Your team Maria developers is subscribed to branch lp:maria.
To unsubscribe from this branch go to https://code.launchpad.net/~maria-captains/maria/5.1/+edit-subscription.
=== modified file 'mysql-test/r/innodb-timeout.result'
--- mysql-test/r/innodb-timeout.result	2009-06-09 13:19:13 +0000
+++ mysql-test/r/innodb-timeout.result	2010-01-18 12:56:10 +0000
@@ -23,6 +23,7 @@
 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 @@
 3
 begin;
 insert into t1 values(4);
+set innodb_lock_wait_timeout=2;
+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'
--- mysql-test/suite/rpl/r/rpl_relayspace.result	2007-06-27 12:28:02 +0000
+++ mysql-test/suite/rpl/r/rpl_relayspace.result	2010-01-18 12:56:10 +0000
@@ -14,6 +14,6 @@
 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'
--- mysql-test/suite/rpl/t/rpl_relayspace.test	2008-02-28 11:36:14 +0000
+++ mysql-test/suite/rpl/t/rpl_relayspace.test	2010-01-18 12:56:10 +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 @@
 
 # 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 @@
 # 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'
--- mysql-test/t/innodb-timeout.test	2009-06-09 13:19:13 +0000
+++ mysql-test/t/innodb-timeout.test	2010-01-18 12:56:10 +0000
@@ -30,6 +30,7 @@
 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 @@
 insert into t1 values(4);
 
 connection b;
---send
-select * from t1 for update;
-
-connection a;
-sleep 2;
-commit;
-
-connection b;
+# 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=2;
+set @a= current_timestamp();
 --error ER_LOCK_WAIT_TIMEOUT
-reap;
+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;
+commit;
 drop table t1;
 
 connection default;

=== modified file 'mysql-test/valgrind.supp'
--- mysql-test/valgrind.supp	2009-12-03 11:19:05 +0000
+++ mysql-test/valgrind.supp	2010-01-18 12:56:10 +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
+}