| 1 |
include/master-slave.inc |
| 2 |
[connection master] |
| 3 |
CREATE TABLE t1 (pk INT PRIMARY KEY, i INT) WITH SYSTEM VERSIONING; |
| 4 |
INSERT INTO t1 VALUES (1,10),(2,20); |
| 5 |
UPDATE t1 SET i = 100; |
| 6 |
SET BINLOG_FORMAT= ROW; |
| 7 |
DELETE HISTORY FROM t1; |
| 8 |
connection slave; |
| 9 |
connection master; |
| 10 |
drop table t1; |
| 11 |
# |
| 12 |
# MDEV-25347 DML events for auto-partitioned tables are written into binary log twice |
| 13 |
# |
| 14 |
flush binary logs; |
| 15 |
create table t1 (a int) with system versioning |
| 16 |
partition by system_time limit 1 auto; |
| 17 |
insert into t1 values (1); |
| 18 |
update t1 set a= a + 1; |
| 19 |
update t1 set a= a + 2; |
| 20 |
show create table t1; |
| 21 |
Table Create Table |
| 22 |
t1 CREATE TABLE `t1` ( |
| 23 |
`a` int(11) DEFAULT NULL |
| 24 |
) ENGINE=ENGINE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci WITH SYSTEM VERSIONING |
| 25 |
PARTITION BY SYSTEM_TIME LIMIT 1 AUTO |
| 26 |
PARTITIONS 3 |
| 27 |
select * from t1; |
| 28 |
a |
| 29 |
4 |
| 30 |
include/show_binlog_events.inc |
| 31 |
Log_name Pos Event_type Server_id End_log_pos Info |
| 32 |
master-bin.000002 # Binlog_checkpoint # # master-bin.000002 |
| 33 |
master-bin.000002 # Gtid # # GTID #-#-# |
| 34 |
master-bin.000002 # Query # # use `test`; create table t1 (a int) with system versioning |
| 35 |
partition by system_time limit 1 auto |
| 36 |
master-bin.000002 # Gtid # # BEGIN GTID #-#-# |
| 37 |
master-bin.000002 # Annotate_rows # # insert into t1 values (1) |
| 38 |
master-bin.000002 # Table_map # # table_id: # (test.t1) |
| 39 |
master-bin.000002 # Write_rows_v1 # # table_id: # flags: STMT_END_F |
| 40 |
master-bin.000002 # Query # # COMMIT |
| 41 |
master-bin.000002 # Gtid # # BEGIN GTID #-#-# |
| 42 |
master-bin.000002 # Annotate_rows # # update t1 set a= a + 1 |
| 43 |
master-bin.000002 # Table_map # # table_id: # (test.t1) |
| 44 |
master-bin.000002 # Update_rows_v1 # # table_id: # |
| 45 |
master-bin.000002 # Write_rows_v1 # # table_id: # flags: STMT_END_F |
| 46 |
master-bin.000002 # Query # # COMMIT |
| 47 |
master-bin.000002 # Gtid # # BEGIN GTID #-#-# |
| 48 |
master-bin.000002 # Annotate_rows # # update t1 set a= a + 2 |
| 49 |
master-bin.000002 # Table_map # # table_id: # (test.t1) |
| 50 |
master-bin.000002 # Update_rows_v1 # # table_id: # |
| 51 |
master-bin.000002 # Write_rows_v1 # # table_id: # flags: STMT_END_F |
| 52 |
master-bin.000002 # Query # # COMMIT |
| 53 |
connection slave; |
| 54 |
show create table t1; |
| 55 |
Table Create Table |
| 56 |
t1 CREATE TABLE `t1` ( |
| 57 |
`a` int(11) DEFAULT NULL |
| 58 |
) ENGINE=ENGINE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci WITH SYSTEM VERSIONING |
| 59 |
PARTITION BY SYSTEM_TIME LIMIT 1 AUTO |
| 60 |
PARTITIONS 3 |
| 61 |
select * from t1; |
| 62 |
a |
| 63 |
4 |
| 64 |
connection master; |
| 65 |
drop table t1; |
| 66 |
include/rpl_end.inc |