Debian Codegraph @

mysql-test/suite/group_replication/r/gr_transaction_limit.result

raw
1
2 ## 0. Start 3 servers with GR
3 include/group_replication.inc [rpl_server_count=3]
4 Warnings:
5 Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
6 Note #### Storing MySQL user name or password information in the connection metadata repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START REPLICA; see the 'START REPLICA Syntax' in the MySQL Manual for more information.
7 [connection server1]
8
9 [connection server2]
10 set session sql_log_bin=0;
11 call mtr.add_suppression("Run function 'before_commit' in plugin 'group_replication' failed");
12 call mtr.add_suppression("Error on session .*. Transaction of size .* exceeds specified limit 9. To increase the limit please adjust group_replication_transaction_size_limit option.");
13 call mtr.add_suppression("Error on session .*. Transaction of size .* exceeds specified limit 808. To increase the limit please adjust group_replication_transaction_size_limit option.");
14 set session sql_log_bin=1;
15
16 [connection server3]
17 set session sql_log_bin=0;
18 call mtr.add_suppression("Run function 'before_commit' in plugin 'group_replication' failed");
19 call mtr.add_suppression("Error on session .*. Transaction of size .* exceeds specified limit 1024. To increase the limit please adjust group_replication_transaction_size_limit option.");
20 set session sql_log_bin=1;
21
22 include/rpl_gr_wait_for_number_of_members.inc
23
24 ## 1. Connect to server 1, create a table (t1)
25 ## Table t1 will be used later in step 3
26 [connection server1]
27 CREATE TABLE t1 (a INT PRIMARY KEY);
28 include/rpl_sync.inc
29
30 ## 2.1 Create table t2 on server 1 and t3 on server 2.
31 [connection server1]
32 CREATE TABLE t2 (a INT PRIMARY KEY);
33 include/rpl_sync.inc
34
35 [connection server2]
36 CREATE TABLE t3 (a INT PRIMARY KEY);
37 include/rpl_sync.inc
38
39 ## 2.2 Validate tables t2 and t3 are created on each server.
40 [connection server1]
41 include/assert.inc ['Check table t2 exist on server 1']
42 include/assert.inc ['Check table t3 exist on server 1']
43
44 [connection server2]
45 include/assert.inc ['Check table t2 exist on server 2']
46 include/assert.inc ['Check table t3 exist on server 2']
47
48 [connection server3]
49 include/assert.inc ['Check table t2 exist on server 3']
50 include/assert.inc ['Check table t3 exist on server 3']
51
52 ## 2.3 Drop table t2 on server 1 and table t3 on server 2.
53 [connection server1]
54 DROP TABLE t2;
55 include/rpl_sync.inc
56
57 [connection server2]
58 DROP TABLE t3;
59 include/rpl_sync.inc
60
61 ## 2.4 Validate tables t2 and t3 are dropped on each server.
62 [connection server1]
63 include/assert.inc ['Check table t2 dropped on server 1']
64 include/assert.inc ['Check table t3 dropped on server 1']
65
66 [connection server2]
67 include/assert.inc ['Check table t2 dropped on server 2']
68 include/assert.inc ['Check table t3 dropped on server 2']
69
70 [connection server3]
71 include/assert.inc ['Check table t2 dropped on server 3']
72 include/assert.inc ['Check table t3 dropped on server 3']
73
74 ## 3.1 Insert some data in table t1 on server 2,
75 ## transaction should be rolledback
76 [connection server2]
77 INSERT INTO t1 VALUES (10);
78 ERROR HY000: Error on observer while running replication hook 'before_commit'.
79 include/rpl_sync.inc
80
81 [connection server1]
82 include/assert.inc ['Checking the number of records in table t1']
83
84 [connection server2]
85 include/assert.inc ['Checking the number of records in table t1']
86
87 [connection server3]
88 include/assert.inc ['Checking the number of records in table t1']
89
90 ## 3.2 Insert some data in table t1 on server 1, data should be inserted
91 [connection server1]
92 INSERT INTO t1 VALUES (10);
93 include/rpl_sync.inc
94
95 [connection server1]
96 include/assert.inc ['Checking the number of records in table t1']
97
98 [connection server2]
99 include/assert.inc ['Checking the number of records in table t1']
100
101 [connection server3]
102 include/assert.inc ['Checking the number of records in table t1']
103
104 ## 3.3 Insert some data in table t1 on server 3, data should be inserted
105 [connection server3]
106 INSERT INTO t1 VALUES (20);
107 include/rpl_sync.inc
108
109 [connection server1]
110 include/assert.inc ['Checking the number of records in table t1']
111
112 [connection server2]
113 include/assert.inc ['Checking the number of records in table t1']
114
115 [connection server3]
116 include/assert.inc ['Checking the number of records in table t1']
117
118 DELETE FROM t1;
119 include/rpl_sync.inc
120
121 ## 3.4 Insert large sample data in table t1 on server 3,
122 ## transaction should be rolledback
123 [connection server3]
124 BEGIN;
125 COMMIT;
126 ERROR HY000: Error on observer while running replication hook 'before_commit'.
127 include/rpl_sync.inc
128
129 [connection server1]
130 include/assert.inc ['Checking the number of records in table t1']
131
132 [connection server2]
133 include/assert.inc ['Checking the number of records in table t1']
134
135 [connection server3]
136 include/assert.inc ['Checking the number of records in table t1']
137
138 ## 3.5 Insert large sample data in table t1 on server 1,
139 ## data should be inserted
140 [connection server1]
141 BEGIN;
142 COMMIT;
143 include/rpl_sync.inc
144
145 [connection server1]
146 include/assert.inc ['Checking the number of records in table t1']
147
148 [connection server2]
149 include/assert.inc ['Checking the number of records in table t1']
150
151 [connection server3]
152 include/assert.inc ['Checking the number of records in table t1']
153
154 ## 3.6 Delete all data from table t1 on server 2,
155 ## transaction should be rolledback
156 [connection server2]
157 SET @group_replication_transaction_size_limit_save= @@GLOBAL.group_replication_transaction_size_limit;
158 SET GLOBAL group_replication_transaction_size_limit= 808;
159 DELETE FROM t1;
160 ERROR HY000: Error on observer while running replication hook 'before_commit'.
161 include/rpl_sync.inc
162 SET GLOBAL group_replication_transaction_size_limit= @group_replication_transaction_size_limit_save;
163
164 [connection server1]
165 include/assert.inc ['Checking the number of records in table t1']
166
167 [connection server2]
168 include/assert.inc ['Checking the number of records in table t1']
169
170 [connection server3]
171 include/assert.inc ['Checking the number of records in table t1']
172
173 ## 3.7 Delete all data from table t1 on server 3,
174 ## transaction should be rolledback
175 [connection server3]
176 DELETE FROM t1;
177 ERROR HY000: Error on observer while running replication hook 'before_commit'.
178 include/rpl_sync.inc
179
180 [connection server1]
181 include/assert.inc ['Checking the number of records in table t1']
182
183 [connection server2]
184 include/assert.inc ['Checking the number of records in table t1']
185
186 [connection server3]
187 include/assert.inc ['Checking the number of records in table t1']
188
189 ## 3.8 Delete all data from table t1 on server 1, table will be empty
190 [connection server1]
191 DELETE FROM t1;
192 include/rpl_sync.inc
193
194 ## 4. Validate that server1, server2 and server 3 has same set of data
195 include/diff_tables.inc [server1:test.t1, server2:test.t1, server3:test.t1]
196
197 ## 5. Clean-up
198 DROP TABLE t1;
199 include/group_replication_end.inc