mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
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.
This commit is contained in:
@ -23,6 +23,7 @@ select @@innodb_lock_wait_timeout;
|
|||||||
create table t1(a int primary key)engine=innodb;
|
create table t1(a int primary key)engine=innodb;
|
||||||
begin;
|
begin;
|
||||||
insert into t1 values(1),(2),(3);
|
insert into t1 values(1),(2),(3);
|
||||||
|
set innodb_lock_wait_timeout=5;
|
||||||
select * from t1 for update;
|
select * from t1 for update;
|
||||||
commit;
|
commit;
|
||||||
a
|
a
|
||||||
@ -31,8 +32,15 @@ a
|
|||||||
3
|
3
|
||||||
begin;
|
begin;
|
||||||
insert into t1 values(4);
|
insert into t1 values(4);
|
||||||
|
set innodb_lock_wait_timeout=2;
|
||||||
|
set @a= current_timestamp();
|
||||||
select * from t1 for update;
|
select * from t1 for update;
|
||||||
commit;
|
|
||||||
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
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;
|
drop table t1;
|
||||||
set global innodb_lock_wait_timeout=50;
|
set global innodb_lock_wait_timeout=50;
|
||||||
|
@ -14,6 +14,6 @@ start slave io_thread;
|
|||||||
stop slave io_thread;
|
stop slave io_thread;
|
||||||
reset slave;
|
reset slave;
|
||||||
start slave;
|
start slave;
|
||||||
select master_pos_wait('master-bin.001',200,6)=-1;
|
select master_pos_wait('MASTER_LOG_FILE',200,30)=-1;
|
||||||
master_pos_wait('master-bin.001',200,6)=-1
|
master_pos_wait('MASTER_LOG_FILE',200,30)=-1
|
||||||
0
|
0
|
||||||
|
@ -2,8 +2,10 @@
|
|||||||
# to force the deadlock after one event.
|
# to force the deadlock after one event.
|
||||||
|
|
||||||
source include/master-slave.inc;
|
source include/master-slave.inc;
|
||||||
|
let $master_log_file= query_get_value(SHOW MASTER STATUS, File, 1);
|
||||||
connection slave;
|
connection slave;
|
||||||
stop slave;
|
stop slave;
|
||||||
|
source include/wait_for_slave_to_stop.inc;
|
||||||
connection master;
|
connection master;
|
||||||
# This will generate a master's binlog > 10 bytes
|
# This will generate a master's binlog > 10 bytes
|
||||||
create table t1 (a int);
|
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.
|
# A bug caused the I/O thread to refuse stopping.
|
||||||
stop slave io_thread;
|
stop slave io_thread;
|
||||||
|
source include/wait_for_slave_io_to_stop.inc;
|
||||||
reset slave;
|
reset slave;
|
||||||
start slave;
|
start slave;
|
||||||
# The I/O thread stops filling the relay log when
|
# The I/O thread stops filling the relay log when
|
||||||
@ -29,9 +32,11 @@ start slave;
|
|||||||
# So we should have a deadlock.
|
# So we should have a deadlock.
|
||||||
# if it is not resolved automatically we'll detect
|
# if it is not resolved automatically we'll detect
|
||||||
# it with master_pos_wait that waits for farther than 1Ob;
|
# 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
|
# also the slave will probably not cooperate to shutdown
|
||||||
# (as 2 threads are locked)
|
# (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
|
# End of 4.1 tests
|
||||||
|
@ -30,6 +30,7 @@ begin;
|
|||||||
insert into t1 values(1),(2),(3);
|
insert into t1 values(1),(2),(3);
|
||||||
|
|
||||||
connection b;
|
connection b;
|
||||||
|
set innodb_lock_wait_timeout=5;
|
||||||
--send
|
--send
|
||||||
select * from t1 for update;
|
select * from t1 for update;
|
||||||
|
|
||||||
@ -44,16 +45,20 @@ begin;
|
|||||||
insert into t1 values(4);
|
insert into t1 values(4);
|
||||||
|
|
||||||
connection b;
|
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;
|
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;
|
connection a;
|
||||||
sleep 2;
|
|
||||||
commit;
|
commit;
|
||||||
|
|
||||||
connection b;
|
|
||||||
--error ER_LOCK_WAIT_TIMEOUT
|
|
||||||
reap;
|
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
|
||||||
connection default;
|
connection default;
|
||||||
|
@ -991,3 +991,15 @@
|
|||||||
fun:_dl_allocate_tls
|
fun:_dl_allocate_tls
|
||||||
fun:pthread_create*
|
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
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user