35 lines
883 B
Plaintext
35 lines
883 B
Plaintext
--source include/have_debug_new.inc
|
|
--connect (follower,127.0.0.1,root,,test,$MYPORT_2)
|
|
connection default;
|
|
create table t(id int primary key);
|
|
insert into t values(1);
|
|
--source include/wait_follower_catchup.inc
|
|
|
|
connection follower;
|
|
SET @old_innodb_lock_wait_timeout= @@innodb_lock_wait_timeout;
|
|
set global innodb_lock_wait_timeout=2;
|
|
begin;
|
|
select * from t where id=1 for update;
|
|
|
|
connection default;
|
|
begin;
|
|
update t set id=2 where id=1;
|
|
commit;
|
|
connection follower;
|
|
|
|
--let $wait_timeout=300
|
|
--let $wait_condition= SELECT variable_value > 0 from performance_schema.global_status where variable_name='slave_retried_transactions'
|
|
--source include/wait_condition.inc
|
|
|
|
rollback;
|
|
|
|
connection default;
|
|
--source include/wait_follower_catchup.inc
|
|
|
|
connection follower;
|
|
select * from t;
|
|
set global innodb_lock_wait_timeout= @old_innodb_lock_wait_timeout;
|
|
|
|
connection default;
|
|
drop table t;
|