mirror of
				https://github.com/MariaDB/server.git
				synced 2025-11-03 20:36:16 +01:00 
			
		
		
		
	Problem is that mysql.galera_slave_pos table is replicated, thus it should be InnoDB to allow rolling back in case of replay. Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
		
			
				
	
	
		
			73 lines
		
	
	
	
		
			1.7 KiB
		
	
	
	
		
			Text
		
	
	
	
	
	
			
		
		
	
	
			73 lines
		
	
	
	
		
			1.7 KiB
		
	
	
	
		
			Text
		
	
	
	
	
	
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
 | 
						|
connection node_2a;
 | 
						|
connection node_2;
 | 
						|
connection node_1;
 | 
						|
ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
 | 
						|
connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
 | 
						|
connection node_3;
 | 
						|
RESET MASTER;
 | 
						|
connection node_2a;
 | 
						|
START SLAVE;
 | 
						|
connection node_3;
 | 
						|
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1)) engine=innodb;
 | 
						|
INSERT INTO t1 VALUES (1, 'a');
 | 
						|
INSERT INTO t1 VALUES (3, 'a');
 | 
						|
set binlog_format=STATEMENT;
 | 
						|
SET AUTOCOMMIT=ON;
 | 
						|
START TRANSACTION;
 | 
						|
SELECT * FROM t1  FOR UPDATE;
 | 
						|
f1	f2
 | 
						|
1	a
 | 
						|
3	a
 | 
						|
UPDATE t1 SET f2 = 'c' WHERE f1 > 1;
 | 
						|
connection node_2a;
 | 
						|
SET SESSION wsrep_sync_wait = 0;
 | 
						|
connection node_1;
 | 
						|
SET SESSION wsrep_sync_wait = 0;
 | 
						|
connection node_2a;
 | 
						|
SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_master_enter_sync';
 | 
						|
SET GLOBAL debug_dbug = "d,sync.wsrep_apply_cb";
 | 
						|
connection node_1;
 | 
						|
INSERT INTO test.t1 VALUES (2, 'b');
 | 
						|
connection node_3;
 | 
						|
COMMIT;
 | 
						|
connection node_2a;
 | 
						|
SET SESSION wsrep_on = 0;
 | 
						|
SET SESSION wsrep_on = 1;
 | 
						|
SET GLOBAL debug_dbug = "";
 | 
						|
SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
 | 
						|
connection node_2a;
 | 
						|
SET GLOBAL wsrep_provider_options = 'dbug=';
 | 
						|
SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_master_enter_sync';
 | 
						|
connection node_3;
 | 
						|
SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'a';
 | 
						|
COUNT(*) = 1
 | 
						|
1
 | 
						|
SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'c';
 | 
						|
COUNT(*) = 1
 | 
						|
1
 | 
						|
SELECT * FROM t1;
 | 
						|
f1	f2
 | 
						|
1	a
 | 
						|
3	c
 | 
						|
connection node_2a;
 | 
						|
set session wsrep_sync_wait=15;
 | 
						|
set session wsrep_sync_wait=0;
 | 
						|
wsrep_local_replays
 | 
						|
1
 | 
						|
SELECT *  FROM t1;
 | 
						|
f1	f2
 | 
						|
1	a
 | 
						|
2	b
 | 
						|
3	c
 | 
						|
SET DEBUG_SYNC = "RESET";
 | 
						|
connection node_2a;
 | 
						|
STOP SLAVE;
 | 
						|
RESET SLAVE;
 | 
						|
DROP TABLE t1;
 | 
						|
connection node_3;
 | 
						|
DROP TABLE t1;
 | 
						|
RESET MASTER;
 | 
						|
connection node_1;
 | 
						|
disconnect node_2a;
 | 
						|
disconnect node_3;
 |