mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
galera_inject_bf_log_wait mtr test: more stable test
Added explicit checkpoint wait instead of implicit assumption that statement sent via --send will already be executed when lock-contesting statement is started in another session.
This commit is contained in:
@@ -3,8 +3,11 @@ connection node_1;
|
||||
CREATE TABLE t1(id int not null primary key, b int) engine=InnoDB;
|
||||
INSERT INTO t1 VALUES (0,0),(1,1),(2,2),(3,3);
|
||||
BEGIN;
|
||||
SET DEBUG_SYNC = 'wsrep_after_statement_enter SIGNAL blocked';
|
||||
UPDATE t1 set b = 100 where id between 1 and 2;;
|
||||
connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||
SET DEBUG_SYNC = 'now WAIT_FOR blocked';
|
||||
SET DEBUG_SYNC = 'wsrep_after_statement_enter CLEAR';
|
||||
connection node_1b;
|
||||
SET @save_dbug = @@SESSION.debug_dbug;
|
||||
SET @@SESSION.innodb_lock_wait_timeout=2;
|
||||
@@ -20,5 +23,6 @@ id b
|
||||
1 100
|
||||
2 100
|
||||
3 3
|
||||
SET DEBUG_SYNC = 'RESET';
|
||||
disconnect node_1b;
|
||||
DROP TABLE t1;
|
||||
|
@@ -6,9 +6,14 @@ CREATE TABLE t1(id int not null primary key, b int) engine=InnoDB;
|
||||
INSERT INTO t1 VALUES (0,0),(1,1),(2,2),(3,3);
|
||||
|
||||
BEGIN;
|
||||
SET DEBUG_SYNC = 'wsrep_after_statement_enter SIGNAL blocked';
|
||||
--send UPDATE t1 set b = 100 where id between 1 and 2;
|
||||
|
||||
--connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1
|
||||
|
||||
SET DEBUG_SYNC = 'now WAIT_FOR blocked';
|
||||
SET DEBUG_SYNC = 'wsrep_after_statement_enter CLEAR';
|
||||
|
||||
--connection node_1b
|
||||
SET @save_dbug = @@SESSION.debug_dbug;
|
||||
SET @@SESSION.innodb_lock_wait_timeout=2;
|
||||
@@ -21,5 +26,6 @@ SET @@SESSION.debug_dbug = @save_dbug;
|
||||
--reap
|
||||
COMMIT;
|
||||
SELECT * FROM t1;
|
||||
SET DEBUG_SYNC = 'RESET';
|
||||
--disconnect node_1b
|
||||
DROP TABLE t1;
|
||||
|
Reference in New Issue
Block a user