Debian Codegraph @

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

raw
1 #
2 # Clear the existing binary log state.
3 #
4 RESET MASTER;
5 create table t1 (a int);
6 insert into t1 values (1);
7 insert into t1 values (2);
8 flush binary logs;
9 insert into t1 values (3);
10 # Tag binlog_f2_mid
11 insert into t1 values (4);
12 insert into t1 values (5);
13 insert into t1 values (6);
14 insert into t1 values (7);
15 flush binary logs;
16 drop table t1;
17 # Ensuring binary log order is correct
18 # Ensuring file offset of binlog_f2_mid < binlog_f1_end
19 #
20 #
21 # Test using --read-from-remote-server
22 #
23 connection default;
24 #
25 # --stop-position tests
26 #
27 # Case 1.a) With one binlog file, a --stop-position before the end of
28 # the file should not result in a warning
29 # 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
30 #
31 # Case 1.b) With one binlog file, a --stop-position at the exact end of
32 # the file should not result in a warning
33 # MYSQL_BINLOG --read-from-remote-server --stop-position=binlog_f1_end binlog_f1_full --result-file=tmp/warn_position_test_file.out 2>&1
34 #
35 # Case 1.c) With one binlog file, a --stop-position past the end of the
36 # file should(!) result in a warning
37 # 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
38 WARNING: Did not reach stop position <BINLOG_F1_OVER_EOF> before end of input
39 #
40 # Case 2.a) With two binlog files, a --stop-position targeting b2 which
41 # exists in the size of b1 should:
42 # 1) not provide any warnings
43 # 2) not prevent b2 from outputting its desired events before the
44 # stop position
45 # 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
46 include/assert_grep.inc [Ensure all intended GTIDs are present]
47 include/assert_grep.inc [Ensure the next GTID binlogged is _not_ present]
48 #
49 # Case 2.b) With two binlog files, a --stop-position targeting the end
50 # of binlog 2 should:
51 # 1) not provide any warnings
52 # 2) not prevent b2 from outputting its entire binary log
53 # 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
54 include/assert_grep.inc [Ensure a GTID exists for each transaction]
55 include/assert_grep.inc [Ensure the last GTID binlogged is present]
56 #
57 # Case 2.c) With two binlog files, a --stop-position targeting beyond
58 # the eof of binlog 2 should:
59 # 1) provide a warning that the stop position was not reached
60 # 2) not prevent b2 from outputting its entire binary log
61 # 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
62 WARNING: Did not reach stop position <BINLOG_F2_OVER_EOF> before end of input
63 include/assert_grep.inc [Ensure a GTID exists for each transaction]
64 #
65 #
66 # Test using local binlog files
67 #
68 connection default;
69 #
70 # --stop-position tests
71 #
72 # Case 1.a) With one binlog file, a --stop-position before the end of
73 # the file should not result in a warning
74 # MYSQL_BINLOG --stop-position=binlog_f1_pre_rotate binlog_f1_full --result-file=tmp/warn_position_test_file.out 2>&1
75 #
76 # Case 1.b) With one binlog file, a --stop-position at the exact end of
77 # the file should not result in a warning
78 # MYSQL_BINLOG --stop-position=binlog_f1_end binlog_f1_full --result-file=tmp/warn_position_test_file.out 2>&1
79 #
80 # Case 1.c) With one binlog file, a --stop-position past the end of the
81 # file should(!) result in a warning
82 # MYSQL_BINLOG --short-form --stop-position=binlog_f1_over_eof binlog_f1_full --result-file=tmp/warn_position_test_file.out 2>&1
83 WARNING: Did not reach stop position <BINLOG_F1_OVER_EOF> before end of input
84 #
85 # Case 2.a) With two binlog files, a --stop-position targeting b2 which
86 # exists in the size of b1 should:
87 # 1) not provide any warnings
88 # 2) not prevent b2 from outputting its desired events before the
89 # stop position
90 # MYSQL_BINLOG --stop-position=binlog_f2_mid binlog_f1_full binlog_f2_full --result-file=tmp/warn_position_test_file.out 2>&1
91 include/assert_grep.inc [Ensure all intended GTIDs are present]
92 include/assert_grep.inc [Ensure the next GTID binlogged is _not_ present]
93 #
94 # Case 2.b) With two binlog files, a --stop-position targeting the end
95 # of binlog 2 should:
96 # 1) not provide any warnings
97 # 2) not prevent b2 from outputting its entire binary log
98 # MYSQL_BINLOG --stop-position=binlog_f2_end binlog_f1_full binlog_f2_full --result-file=tmp/warn_position_test_file.out 2>&1
99 include/assert_grep.inc [Ensure a GTID exists for each transaction]
100 include/assert_grep.inc [Ensure the last GTID binlogged is present]
101 #
102 # Case 2.c) With two binlog files, a --stop-position targeting beyond
103 # the eof of binlog 2 should:
104 # 1) provide a warning that the stop position was not reached
105 # 2) not prevent b2 from outputting its entire binary log
106 # MYSQL_BINLOG --stop-position=binlog_f2_over_eof binlog_f1_full binlog_f2_full --result-file=tmp/warn_position_test_file.out 2>&1
107 WARNING: Did not reach stop position <BINLOG_F2_OVER_EOF> before end of input
108 include/assert_grep.inc [Ensure a GTID exists for each transaction]
109 #
110 # End of binlog_mysqlbinlog_warn_stop_position.test