mirror of
				https://github.com/MariaDB/server.git
				synced 2025-10-31 10:56:12 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			71 lines
		
	
	
	
		
			2.5 KiB
		
	
	
	
		
			Text
		
	
	
	
	
	
			
		
		
	
	
			71 lines
		
	
	
	
		
			2.5 KiB
		
	
	
	
		
			Text
		
	
	
	
	
	
| include/master-slave.inc
 | |
| [connection master]
 | |
| #
 | |
| # Initialize system-versioned and partitioned table and its data
 | |
| connection master;
 | |
| SET timestamp=UNIX_TIMESTAMP('2025-01-01 01:00:00.000000');
 | |
| RESET MASTER;
 | |
| create table t1 (x int) engine=InnoDB with system versioning partition by system_time limit 3 partitions 5;
 | |
| insert into t1 values(1);
 | |
| insert into t1 values(2);
 | |
| insert into t1 values(3);
 | |
| insert into t1 values(4);
 | |
| insert into t1 values(5);
 | |
| # Verifying master partitions are correct after data insertion..
 | |
| # .. done
 | |
| connection slave;
 | |
| connection slave;
 | |
| # Verifying partitions of master and slave match on data setup..
 | |
| # .. done
 | |
| #
 | |
| # "Delete" each row -- these are the BINLOG commands generated by
 | |
| # mysqlbinlog from `delete from t1 where x=<n>` statements. Because the
 | |
| # table uses system versioning and system_time partition, the actual
 | |
| # events are updates, with added fields for the `row_start` and `row_end`
 | |
| # columns.
 | |
| connection master;
 | |
| # BINLOG for Format Description event
 | |
| BINLOG '
 | |
| APZ0Zw8BAAAA/AAAAAABAAAAAAQAMTEuNy4yLU1hcmlhREItZGVidWctbG9nAAAAAAAAAAAAAAAA
 | |
| AAAAAAAAAAAAAAAAAAAA9nRnEzgNAAgAEgAEBAQEEgAA5AAEGggAAAAICAgCAAAACgoKAAAAAAAA
 | |
| CgoKAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
 | |
| AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
 | |
| AAAAAAAAAAAEEwQADQgICAoKCgGuUmo6
 | |
| ';
 | |
| # BINLOG for delete from t1 where x=1;
 | |
| BINLOG '
 | |
| APZ0ZxMBAAAAMQAAAAAAAAAAACEAAAAAAAEABHRlc3QAAnQxAAMDERECBgYBoCHyJQ==
 | |
| APZ0ZxgBAAAASAAAAAAAAAAAACEAAAAAAAEAAwcH+AEAAABndPYAAAAA/////w9CP/gBAAAAZ3T2
 | |
| AAAAAGd09gAAAAAuqwNP
 | |
| ';
 | |
| # BINLOG for delete from t1 where x=2;
 | |
| BINLOG '
 | |
| APZ0ZxMBAAAAMQAAAAAAAAAAACEAAAAAAAEABHRlc3QAAnQxAAMDERECBgYBoCHyJQ==
 | |
| APZ0ZxgBAAAASAAAAAAAAAAAACEAAAAAAAEAAwcH+AIAAABndPYAAAAA/////w9CP/gCAAAAZ3T2
 | |
| AAAAAGd09gAAAAAsSeT/
 | |
| ';
 | |
| # BINLOG for delete from t1 where x=3;
 | |
| BINLOG '
 | |
| APZ0ZxMBAAAAMQAAAAAAAAAAACEAAAAAAAEABHRlc3QAAnQxAAMDERECBgYBoCHyJQ==
 | |
| APZ0ZxgBAAAASAAAAAAAAAAAACEAAAAAAAEAAwcH+AMAAABndPYAAAAA/////w9CP/gDAAAAZ3T2
 | |
| AAAAAGd09gAAAADS6EaQ
 | |
| ';
 | |
| # BINLOG for delete from t1 where x=4;
 | |
| BINLOG '
 | |
| APZ0ZxMBAAAAMQAAAAAAAAAAACEAAAAAAAEABHRlc3QAAnQxAAMDERECBgYBoCHyJQ==
 | |
| APZ0ZxgBAAAASAAAAAAAAAAAACEAAAAAAAEAAwcH+AQAAABndPYAAAAA/////w9CP/gEAAAAZ3T2
 | |
| AAAAAGd09gAAAABpi1pF
 | |
| ';
 | |
| # BINLOG for delete from t1 where x=5;
 | |
| BINLOG '
 | |
| APZ0ZxMBAAAAMQAAAAAAAAAAACEAAAAAAAEABHRlc3QAAnQxAAMDERECBgYBoCHyJQ==
 | |
| APZ0ZxgBAAAASAAAAAAAAAAAACEAAAAAAAEAAwcH+AUAAABndPYAAAAA/////w9CP/gFAAAAZ3T2
 | |
| AAAAAGd09gAAAACXKvgq
 | |
| ';
 | |
| # Verifying master partitions are correct after deletion BINLOG stmts..
 | |
| # .. done
 | |
| connection slave;
 | |
| connection slave;
 | |
| connection master;
 | |
| drop table t1;
 | |
| include/rpl_end.inc
 | 
