mirror of
				https://github.com/MariaDB/server.git
				synced 2025-10-31 02:46:29 +01:00 
			
		
		
		
	 94ef07d61e
			
		
	
	
	94ef07d61e
	
	
	
		
			
			Test case changes only. Add wait_conditions to make sure nodes rejoin the cluster. Assertion itself should not be possible anymore as we do not allow sequences on Aria tables. Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
		
			
				
	
	
		
			203 lines
		
	
	
	
		
			6.3 KiB
		
	
	
	
		
			Text
		
	
	
	
	
	
			
		
		
	
	
			203 lines
		
	
	
	
		
			6.3 KiB
		
	
	
	
		
			Text
		
	
	
	
	
	
| #
 | |
| # This test creates 2x3 nodes galera cluster.
 | |
| #
 | |
| #       A(1) <-> B(2) <-> C(3)     {Galera cluster 1}
 | |
| #       |                          {Circular Async replication}
 | |
| #       D(4) <-> E(5) <-> F(6)     {Galera cluster 2}
 | |
| #
 | |
| 
 | |
| --source include/big_test.inc
 | |
| --source include/galera_cluster.inc
 | |
| --source include/have_innodb.inc
 | |
| --source include/force_restart.inc
 | |
| 
 | |
| --connect node_6, 127.0.0.1, root, , test, $NODE_MYPORT_6
 | |
| --connect node_5, 127.0.0.1, root, , test, $NODE_MYPORT_5
 | |
| --connect node_4, 127.0.0.1, root, , test, $NODE_MYPORT_4
 | |
| 
 | |
| --connection node_4
 | |
| 
 | |
| --disable_query_log
 | |
| --eval CHANGE MASTER TO master_host='127.0.0.1', master_user='root', master_port=$NODE_MYPORT_1, master_use_gtid=current_pos;
 | |
| --enable_query_log
 | |
| START SLAVE;
 | |
| --source include/wait_for_slave_to_start.inc
 | |
| 
 | |
| #
 | |
| # CREATE TABLE & INSERT
 | |
| #
 | |
| 
 | |
| --connection node_1
 | |
| 
 | |
| CREATE TABLE t1(c1 INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY, c2 INTEGER);
 | |
| INSERT INTO t1(c2) VALUES(1);
 | |
| 
 | |
| --connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
 | |
| --connection node_3
 | |
| 
 | |
| SELECT COUNT(*) = 1 FROM t1;
 | |
| 
 | |
| --connection node_1
 | |
| --source include/save_master_gtid.inc
 | |
| 
 | |
| --connection node_4
 | |
| --source include/sync_with_master_gtid.inc
 | |
| 
 | |
| SELECT COUNT(*) = 1 FROM t1;
 | |
| 
 | |
| --connection node_6
 | |
| 
 | |
| SELECT COUNT(*) = 1 FROM t1;
 | |
| 
 | |
| #
 | |
| # ALTER TABLE
 | |
| #
 | |
| 
 | |
| --connection node_2
 | |
| 
 | |
| ALTER TABLE t1 ADD COLUMN t3 INTEGER;
 | |
| --echo Node 2 column number AFTER ALTER
 | |
| SELECT COUNT(*) = 3 FROM information_schema.columns WHERE table_name ='t1';
 | |
| 
 | |
| --connection node_3
 | |
| 
 | |
| --echo Node 3 column number AFTER ALTER
 | |
| SELECT COUNT(*) = 3 FROM information_schema.columns WHERE table_name ='t1';
 | |
| 
 | |
| --connection node_1
 | |
| --source include/save_master_gtid.inc
 | |
| 
 | |
| --connection node_4
 | |
| --source include/sync_with_master_gtid.inc
 | |
| 
 | |
| --echo Node 4 column number AFTER ALTER
 | |
| SELECT COUNT(*) = 3 FROM information_schema.columns WHERE table_name ='t1';
 | |
| 
 | |
| --connection node_6
 | |
| 
 | |
| --echo Node 6 column number AFTER ALTER
 | |
| SELECT COUNT(*) = 3 FROM information_schema.columns WHERE table_name ='t1';
 | |
| 
 | |
| #
 | |
| # OPTIMIZE TABLE
 | |
| #
 | |
| 
 | |
| --connection node_2
 | |
| --let $wsrep_last_committed_before_2 = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
 | |
| 
 | |
| --connection node_1
 | |
| --let $wsrep_last_committed_before_1 = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
 | |
| 
 | |
| --connection node_3
 | |
| --let $wsrep_last_committed_before_3 = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
 | |
| 
 | |
| --connection node_4
 | |
| --let $wsrep_last_committed_before_4 = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
 | |
| 
 | |
| --connection node_5
 | |
| --let $wsrep_last_committed_before_5 = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
 | |
| 
 | |
| --connection node_6
 | |
| --let $wsrep_last_committed_before_6 = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
 | |
| 
 | |
| --connection node_2
 | |
| OPTIMIZE TABLE t1;
 | |
| --let $wait_condition = SELECT VARIABLE_VALUE >= $wsrep_last_committed_before_2 + 1 FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'
 | |
| --source include/wait_condition.inc
 | |
| 
 | |
| --connection node_1
 | |
| --let $wait_condition = SELECT VARIABLE_VALUE >= $wsrep_last_committed_before_1 + 1 FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'
 | |
| --source include/wait_condition.inc
 | |
| 
 | |
| --connection node_3
 | |
| --let $wait_condition = SELECT VARIABLE_VALUE >= $wsrep_last_committed_before_3 + 1 FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'
 | |
| --source include/wait_condition.inc
 | |
| 
 | |
| --connection node_4
 | |
| --let $wait_condition = SELECT VARIABLE_VALUE >= $wsrep_last_committed_before_4 + 1 FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'
 | |
| --source include/wait_condition.inc
 | |
| 
 | |
| --connection node_5
 | |
| --let $wait_condition = SELECT VARIABLE_VALUE >= $wsrep_last_committed_before_5 + 1 FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'
 | |
| --source include/wait_condition.inc
 | |
| 
 | |
| --connection node_6
 | |
| --let $wait_condition = SELECT VARIABLE_VALUE >= $wsrep_last_committed_before_6 + 1 FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'
 | |
| --source include/wait_condition.inc
 | |
| 
 | |
| #
 | |
| # Cleanup
 | |
| #
 | |
| 
 | |
| --connection node_1
 | |
| 
 | |
| DROP TABLE t1;
 | |
| 
 | |
| --connection node_4
 | |
| 
 | |
| STOP SLAVE;
 | |
| RESET SLAVE;
 | |
| SET GLOBAL wsrep_on = OFF;
 | |
| RESET MASTER;
 | |
| SET GLOBAL wsrep_on = ON;
 | |
| --source include/wait_until_ready.inc
 | |
| SET GLOBAL GTID_SLAVE_POS="";
 | |
| 
 | |
| --connection node_1
 | |
| 
 | |
| SET GLOBAL wsrep_on = OFF;
 | |
| RESET MASTER;
 | |
| SET GLOBAL wsrep_on = ON;
 | |
| --source include/wait_until_ready.inc
 | |
| 
 | |
| --connection node_2
 | |
| 
 | |
| SET GLOBAL wsrep_on = OFF;
 | |
| RESET MASTER;
 | |
| SET GLOBAL wsrep_on = ON;
 | |
| --source include/wait_until_ready.inc
 | |
| 
 | |
| --connection node_3
 | |
| 
 | |
| SET GLOBAL wsrep_on = OFF;
 | |
| RESET MASTER;
 | |
| SET GLOBAL wsrep_on = ON;
 | |
| --source include/wait_until_ready.inc
 | |
| 
 | |
| --connection node_5
 | |
| 
 | |
| SET GLOBAL wsrep_on = OFF;
 | |
| RESET MASTER;
 | |
| SET GLOBAL wsrep_on = ON;
 | |
| --source include/wait_until_ready.inc
 | |
| 
 | |
| --connection node_6
 | |
| 
 | |
| SET GLOBAL wsrep_on = OFF;
 | |
| RESET MASTER;
 | |
| SET GLOBAL wsrep_on = ON;
 | |
| --source include/wait_until_ready.inc
 | |
| 
 | |
| connection node_1;
 | |
| CALL mtr.add_suppression("Ignoring server id .* for non bootstrap node");
 | |
| CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format since ");
 | |
| 
 | |
| connection node_2;
 | |
| CALL mtr.add_suppression("Ignoring server id .* for non bootstrap node");
 | |
| CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format since ");
 | |
| 
 | |
| connection node_3;
 | |
| CALL mtr.add_suppression("Ignoring server id .* for non bootstrap node");
 | |
| CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format since ");
 | |
| 
 | |
| connection node_4;
 | |
| CALL mtr.add_suppression("Ignoring server id .* for non bootstrap node");
 | |
| CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format since ");
 | |
| 
 | |
| connection node_5;
 | |
| CALL mtr.add_suppression("Ignoring server id .* for non bootstrap node");
 | |
| CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format since ");
 | |
| 
 | |
| connection node_6;
 | |
| CALL mtr.add_suppression("Ignoring server id .* for non bootstrap node");
 | |
| CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format since ");
 |