Commit 159ff4c1 authored by unknown's avatar unknown

Fixes for some randomly occuring test failures in Buildbot.

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.
parent e7effbdf
......@@ -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=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;
......@@ -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
......@@ -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
......@@ -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=2;
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;
......
......@@ -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
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment