Debian Codegraph @

mysql-test/suite/binlog/r/binlog_mysqlbinlog_warn_stop_gtid.result

raw
1 #
2 # Clear the existing binary log state.
3 #
4 RESET MASTER;
5 SET @@SESSION.gtid_domain_id= 0;
6 SET @@SESSION.server_id= 1;
7 SET @@SESSION.gtid_seq_no= 1;
8 create table t1 (a int);
9 insert into t1 values (1);
10 SET @@SESSION.gtid_domain_id= 1;
11 insert into t1 values (2);
12 flush binary logs;
13 insert into t1 values (3);
14 # Tag binlog_f2_mid
15 insert into t1 values (4);
16 insert into t1 values (5);
17 SET @@SESSION.gtid_domain_id= 0;
18 insert into t1 values (6);
19 insert into t1 values (7);
20 flush binary logs;
21 drop table t1;
22 # Ensuring binary log order is correct
23 #
24 #
25 # Test using --read-from-remote-server
26 #
27 connection default;
28 #
29 # --stop-position tests
30 #
31 # Case 1.a) With one binlog file, a --stop-position before the end of
32 # the file should not result in a warning
33 # MYSQL_BINLOG --read-from-remote-server --stop-position=binlog_f1_pre_rotate binlog_f1_full --result-file=tmp/warn_position_test_file.out 2>&1
34 #
35 # Case 1.b) With one binlog file, a --stop-position at the exact end of
36 # the file should not result in a warning
37 # MYSQL_BINLOG --read-from-remote-server --stop-position=binlog_f1_end binlog_f1_full --result-file=tmp/warn_position_test_file.out 2>&1
38 #
39 # Case 1.c) With one binlog file, a --stop-position past the end of the
40 # file should(!) result in a warning
41 # MYSQL_BINLOG --read-from-remote-server --short-form --stop-position=binlog_f1_over_eof binlog_f1_full --result-file=tmp/warn_position_test_file.out 2>&1
42 WARNING: Did not reach stop position 1-1-2 before end of input
43 #
44 # Case 2.a) With two binlog files, a --stop-position targeting b2 which
45 # exists in the size of b1 should:
46 # 1) not provide any warnings
47 # 2) not prevent b2 from outputting its desired events before the
48 # stop position
49 # MYSQL_BINLOG --read-from-remote-server --stop-position=binlog_f2_mid binlog_f1_full binlog_f2_full --result-file=tmp/warn_position_test_file.out 2>&1
50 include/assert_grep.inc [Ensure all intended GTIDs are present]
51 include/assert_grep.inc [Ensure the next GTID binlogged is _not_ present]
52 #
53 # Case 2.b) With two binlog files, a --stop-position targeting the end
54 # of binlog 2 should:
55 # 1) not provide any warnings
56 # 2) not prevent b2 from outputting its entire binary log
57 # MYSQL_BINLOG --read-from-remote-server --stop-position=binlog_f2_end binlog_f1_full binlog_f2_full --result-file=tmp/warn_position_test_file.out 2>&1
58 include/assert_grep.inc [Ensure a GTID exists for each transaction]
59 include/assert_grep.inc [Ensure the last GTID binlogged is present]
60 #
61 # Case 2.c) With two binlog files, a --stop-position targeting beyond
62 # the eof of binlog 2 should:
63 # 1) provide a warning that the stop position was not reached
64 # 2) not prevent b2 from outputting its entire binary log
65 # MYSQL_BINLOG --read-from-remote-server --stop-position=binlog_f2_over_eof binlog_f1_full binlog_f2_full --result-file=tmp/warn_position_test_file.out 2>&1
66 WARNING: Did not reach stop position 0-1-5 before end of input
67 include/assert_grep.inc [Ensure a GTID exists for each transaction]
68 #
69 #
70 # Test using local binlog files
71 #
72 connection default;
73 #
74 # --stop-position tests
75 #
76 # Case 1.a) With one binlog file, a --stop-position before the end of
77 # the file should not result in a warning
78 # MYSQL_BINLOG --stop-position=binlog_f1_pre_rotate binlog_f1_full --result-file=tmp/warn_position_test_file.out 2>&1
79 #
80 # Case 1.b) With one binlog file, a --stop-position at the exact end of
81 # the file should not result in a warning
82 # MYSQL_BINLOG --stop-position=binlog_f1_end binlog_f1_full --result-file=tmp/warn_position_test_file.out 2>&1
83 #
84 # Case 1.c) With one binlog file, a --stop-position past the end of the
85 # file should(!) result in a warning
86 # MYSQL_BINLOG --short-form --stop-position=binlog_f1_over_eof binlog_f1_full --result-file=tmp/warn_position_test_file.out 2>&1
87 WARNING: Did not reach stop position 1-1-2 before end of input
88 #
89 # Case 2.a) With two binlog files, a --stop-position targeting b2 which
90 # exists in the size of b1 should:
91 # 1) not provide any warnings
92 # 2) not prevent b2 from outputting its desired events before the
93 # stop position
94 # MYSQL_BINLOG --stop-position=binlog_f2_mid binlog_f1_full binlog_f2_full --result-file=tmp/warn_position_test_file.out 2>&1
95 include/assert_grep.inc [Ensure all intended GTIDs are present]
96 include/assert_grep.inc [Ensure the next GTID binlogged is _not_ present]
97 #
98 # Case 2.b) With two binlog files, a --stop-position targeting the end
99 # of binlog 2 should:
100 # 1) not provide any warnings
101 # 2) not prevent b2 from outputting its entire binary log
102 # MYSQL_BINLOG --stop-position=binlog_f2_end binlog_f1_full binlog_f2_full --result-file=tmp/warn_position_test_file.out 2>&1
103 include/assert_grep.inc [Ensure a GTID exists for each transaction]
104 include/assert_grep.inc [Ensure the last GTID binlogged is present]
105 #
106 # Case 2.c) With two binlog files, a --stop-position targeting beyond
107 # the eof of binlog 2 should:
108 # 1) provide a warning that the stop position was not reached
109 # 2) not prevent b2 from outputting its entire binary log
110 # MYSQL_BINLOG --stop-position=binlog_f2_over_eof binlog_f1_full binlog_f2_full --result-file=tmp/warn_position_test_file.out 2>&1
111 WARNING: Did not reach stop position 0-1-5 before end of input
112 include/assert_grep.inc [Ensure a GTID exists for each transaction]
113 # Poison GTID lists with an extraneous GTID domain - expect additional `9-1-1` warnings
114 #
115 #
116 # Test extraneous stop GTID using --read-from-remote-server
117 #
118 connection default;
119 #
120 # --stop-position tests
121 #
122 # Case 1.a) With one binlog file, a --stop-position before the end of
123 # the file should not result in a warning
124 # MYSQL_BINLOG --read-from-remote-server --stop-position=binlog_f1_pre_rotate binlog_f1_full --result-file=tmp/warn_position_test_file.out 2>&1
125 WARNING: Did not reach stop position 9-1-1 before end of input
126 #
127 # Case 1.b) With one binlog file, a --stop-position at the exact end of
128 # the file should not result in a warning
129 # MYSQL_BINLOG --read-from-remote-server --stop-position=binlog_f1_end binlog_f1_full --result-file=tmp/warn_position_test_file.out 2>&1
130 WARNING: Did not reach stop position 9-1-1 before end of input
131 #
132 # Case 1.c) With one binlog file, a --stop-position past the end of the
133 # file should(!) result in a warning
134 # MYSQL_BINLOG --read-from-remote-server --short-form --stop-position=binlog_f1_over_eof binlog_f1_full --result-file=tmp/warn_position_test_file.out 2>&1
135 WARNING: Did not reach stop position 1-1-2 before end of input
136 WARNING: Did not reach stop position 9-1-1 before end of input
137 #
138 # Case 2.a) With two binlog files, a --stop-position targeting b2 which
139 # exists in the size of b1 should:
140 # 1) not provide any warnings
141 # 2) not prevent b2 from outputting its desired events before the
142 # stop position
143 # MYSQL_BINLOG --read-from-remote-server --stop-position=binlog_f2_mid binlog_f1_full binlog_f2_full --result-file=tmp/warn_position_test_file.out 2>&1
144 WARNING: Did not reach stop position 9-1-1 before end of input
145 include/assert_grep.inc [Ensure all intended GTIDs are present]
146 include/assert_grep.inc [Ensure the next GTID binlogged is _not_ present]
147 #
148 # Case 2.b) With two binlog files, a --stop-position targeting the end
149 # of binlog 2 should:
150 # 1) not provide any warnings
151 # 2) not prevent b2 from outputting its entire binary log
152 # MYSQL_BINLOG --read-from-remote-server --stop-position=binlog_f2_end binlog_f1_full binlog_f2_full --result-file=tmp/warn_position_test_file.out 2>&1
153 WARNING: Did not reach stop position 9-1-1 before end of input
154 include/assert_grep.inc [Ensure a GTID exists for each transaction]
155 include/assert_grep.inc [Ensure the last GTID binlogged is present]
156 #
157 # Case 2.c) With two binlog files, a --stop-position targeting beyond
158 # the eof of binlog 2 should:
159 # 1) provide a warning that the stop position was not reached
160 # 2) not prevent b2 from outputting its entire binary log
161 # MYSQL_BINLOG --read-from-remote-server --stop-position=binlog_f2_over_eof binlog_f1_full binlog_f2_full --result-file=tmp/warn_position_test_file.out 2>&1
162 WARNING: Did not reach stop position 0-1-5 before end of input
163 WARNING: Did not reach stop position 9-1-1 before end of input
164 include/assert_grep.inc [Ensure a GTID exists for each transaction]
165 #
166 #
167 # Test extraneous stop GTID using local binlog files
168 #
169 connection default;
170 #
171 # --stop-position tests
172 #
173 # Case 1.a) With one binlog file, a --stop-position before the end of
174 # the file should not result in a warning
175 # MYSQL_BINLOG --stop-position=binlog_f1_pre_rotate binlog_f1_full --result-file=tmp/warn_position_test_file.out 2>&1
176 WARNING: Did not reach stop position 9-1-1 before end of input
177 #
178 # Case 1.b) With one binlog file, a --stop-position at the exact end of
179 # the file should not result in a warning
180 # MYSQL_BINLOG --stop-position=binlog_f1_end binlog_f1_full --result-file=tmp/warn_position_test_file.out 2>&1
181 WARNING: Did not reach stop position 9-1-1 before end of input
182 #
183 # Case 1.c) With one binlog file, a --stop-position past the end of the
184 # file should(!) result in a warning
185 # MYSQL_BINLOG --short-form --stop-position=binlog_f1_over_eof binlog_f1_full --result-file=tmp/warn_position_test_file.out 2>&1
186 WARNING: Did not reach stop position 1-1-2 before end of input
187 WARNING: Did not reach stop position 9-1-1 before end of input
188 #
189 # Case 2.a) With two binlog files, a --stop-position targeting b2 which
190 # exists in the size of b1 should:
191 # 1) not provide any warnings
192 # 2) not prevent b2 from outputting its desired events before the
193 # stop position
194 # MYSQL_BINLOG --stop-position=binlog_f2_mid binlog_f1_full binlog_f2_full --result-file=tmp/warn_position_test_file.out 2>&1
195 WARNING: Did not reach stop position 9-1-1 before end of input
196 include/assert_grep.inc [Ensure all intended GTIDs are present]
197 include/assert_grep.inc [Ensure the next GTID binlogged is _not_ present]
198 #
199 # Case 2.b) With two binlog files, a --stop-position targeting the end
200 # of binlog 2 should:
201 # 1) not provide any warnings
202 # 2) not prevent b2 from outputting its entire binary log
203 # MYSQL_BINLOG --stop-position=binlog_f2_end binlog_f1_full binlog_f2_full --result-file=tmp/warn_position_test_file.out 2>&1
204 WARNING: Did not reach stop position 9-1-1 before end of input
205 include/assert_grep.inc [Ensure a GTID exists for each transaction]
206 include/assert_grep.inc [Ensure the last GTID binlogged is present]
207 #
208 # Case 2.c) With two binlog files, a --stop-position targeting beyond
209 # the eof of binlog 2 should:
210 # 1) provide a warning that the stop position was not reached
211 # 2) not prevent b2 from outputting its entire binary log
212 # MYSQL_BINLOG --stop-position=binlog_f2_over_eof binlog_f1_full binlog_f2_full --result-file=tmp/warn_position_test_file.out 2>&1
213 WARNING: Did not reach stop position 0-1-5 before end of input
214 WARNING: Did not reach stop position 9-1-1 before end of input
215 include/assert_grep.inc [Ensure a GTID exists for each transaction]
216 #
217 # End of binlog_mysqlbinlog_warn_stop_gtid.test