Debian Codegraph @

mysql-test/suite/versioning/r/rpl_row.result

raw
1 include/master-slave.inc
2 [connection master]
3 # MDEV-16252: MINIMAL binlog_row_image does not work for versioned tables
4 set @old_row_image= @@binlog_row_image;
5 set binlog_row_image= minimal;
6 create or replace table t1 (pk int, i int, primary key(pk))
7 with system versioning;
8 insert into t1 values (1,10),(2,20);
9 update t1 set i = 0;
10 connection slave;
11 connection master;
12 drop table t1;
13 set binlog_row_image= @old_row_image;
14 #
15 # MDEV-28254 Wrong position for row_start, row_end after adding column
16 # to implicit versioned table
17 #
18 set @@system_versioning_alter_history= keep;
19 set @@session.time_zone='+00:00';
20 create table t1 (x int) with system versioning engine innodb;
21 alter table t1 add column y int, algorithm=inplace;
22 check table t1;
23 Table Op Msg_type Msg_text
24 test.t1 check status OK
25 connection slave;
26 drop table t1;
27 show create table t1;
28 Table Create Table
29 t1 CREATE TABLE `t1` (
30 `x` int(11) DEFAULT NULL,
31 `y` int(11) DEFAULT NULL
32 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci WITH SYSTEM VERSIONING
33 connection master;
34 set timestamp= 12345;
35 insert t1 values (1, 1);
36 select *, unix_timestamp(row_start) as row_start, unix_timestamp(row_end) as row_end from t1;
37 x y row_start row_end
38 1 1 12345.000000 TIMESTAMP_MAX.999999
39 set timestamp= default;
40 ### INSERT INTO `test`.`t1`
41 ### SET
42 ### @1=1
43 ### @2=1
44 ### @3=12345.000000
45 ### @4=MAX_TIMESTAMP.999999
46 connection slave;
47 select * from t1;
48 x y
49 1 1
50 connection master;
51 drop table t1;
52 #
53 # MDEV-31297 Create table as select on system versioned tables do not work consistently on replication
54 #
55 connection master;
56 create table t engine=innodb with system versioning as select 1 as i;
57 show create table t;
58 Table Create Table
59 t CREATE TABLE `t` (
60 `i` int(1) NOT NULL
61 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci WITH SYSTEM VERSIONING
62 select * from t;
63 i
64 1
65 connection slave;
66 show create table t;
67 Table Create Table
68 t CREATE TABLE `t` (
69 `i` int(1) NOT NULL
70 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci WITH SYSTEM VERSIONING
71 select * from t;
72 i
73 1
74 connection master;
75 drop table t;
76 #
77 # MDEV-25347 DML events for auto-partitioned tables are written into binary log twice
78 #
79 flush binary logs;
80 create table t1 (a int) with system versioning
81 partition by system_time limit 1 auto;
82 insert into t1 values (1);
83 update t1 set a= a + 1;
84 update t1 set a= a + 2;
85 show create table t1;
86 Table Create Table
87 t1 CREATE TABLE `t1` (
88 `a` int(11) DEFAULT NULL
89 ) ENGINE=ENGINE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci WITH SYSTEM VERSIONING
90 PARTITION BY SYSTEM_TIME LIMIT 1 AUTO
91 PARTITIONS 3
92 select * from t1;
93 a
94 4
95 include/show_binlog_events.inc
96 Log_name Pos Event_type Server_id End_log_pos Info
97 master-bin.000002 # Binlog_checkpoint # # master-bin.000002
98 master-bin.000002 # Gtid # # GTID #-#-#
99 master-bin.000002 # Query # # use `test`; create table t1 (a int) with system versioning
100 partition by system_time limit 1 auto
101 master-bin.000002 # Gtid # # BEGIN GTID #-#-#
102 master-bin.000002 # Annotate_rows # # insert into t1 values (1)
103 master-bin.000002 # Table_map # # table_id: # (test.t1)
104 master-bin.000002 # Write_rows_v1 # # table_id: # flags: STMT_END_F
105 master-bin.000002 # Query # # COMMIT
106 master-bin.000002 # Gtid # # BEGIN GTID #-#-#
107 master-bin.000002 # Annotate_rows # # update t1 set a= a + 1
108 master-bin.000002 # Table_map # # table_id: # (test.t1)
109 master-bin.000002 # Update_rows_v1 # # table_id: #
110 master-bin.000002 # Write_rows_v1 # # table_id: # flags: STMT_END_F
111 master-bin.000002 # Query # # COMMIT
112 master-bin.000002 # Gtid # # BEGIN GTID #-#-#
113 master-bin.000002 # Annotate_rows # # update t1 set a= a + 2
114 master-bin.000002 # Table_map # # table_id: # (test.t1)
115 master-bin.000002 # Update_rows_v1 # # table_id: #
116 master-bin.000002 # Write_rows_v1 # # table_id: # flags: STMT_END_F
117 master-bin.000002 # Query # # COMMIT
118 connection slave;
119 show create table t1;
120 Table Create Table
121 t1 CREATE TABLE `t1` (
122 `a` int(11) DEFAULT NULL
123 ) ENGINE=ENGINE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci WITH SYSTEM VERSIONING
124 PARTITION BY SYSTEM_TIME LIMIT 1 AUTO
125 PARTITIONS 3
126 select * from t1;
127 a
128 4
129 connection master;
130 drop table t1;
131 include/rpl_end.inc