File: rpl_checksum.result

package info (click to toggle)
mysql-8.0 8.0.43-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,273,924 kB
  • sloc: cpp: 4,684,605; ansic: 412,450; pascal: 108,398; java: 83,641; perl: 30,221; cs: 27,067; sql: 26,594; sh: 24,181; python: 21,816; yacc: 17,169; php: 11,522; xml: 7,388; javascript: 7,076; makefile: 2,194; lex: 1,075; awk: 670; asm: 520; objc: 183; ruby: 97; lisp: 86
file content (147 lines) | stat: -rw-r--r-- 7,265 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
include/master-slave.inc
Warnings:
Note	####	Sending passwords in plain text without SSL/TLS is extremely insecure.
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.
[connection master]
call mtr.add_suppression('Replica can not handle replication events with the checksum that source is configured to log');
call mtr.add_suppression('Replication event checksum verification failed');
call mtr.add_suppression('Relay log write failure: could not queue event from source');
call mtr.add_suppression('Event crc check failed! Most likely there is event corruption');
call mtr.add_suppression("Replica SQL for channel '': Error initializing relay log position: I/O error reading event at position .*, Error_code: MY-013117");
call mtr.add_suppression('Source is configured to log replication events with checksum, but will not send such events to replicas that cannot process');
set @master_save_binlog_checksum= @@global.binlog_checksum;
set @save_source_verify_checksum =  @@global.source_verify_checksum;
select @@global.binlog_checksum as 'must be CRC32 because of the command line option';
must be CRC32 because of the command line option
CRC32
select @@session.binlog_checksum as 'no session var';
ERROR HY000: Variable 'binlog_checksum' is a GLOBAL variable
select @@global.source_verify_checksum  as 'must be zero because of default';
must be zero because of default
0
select @@session.source_verify_checksum  as 'no session var';
ERROR HY000: Variable 'source_verify_checksum' is a GLOBAL variable
set @slave_save_binlog_checksum= @@global.binlog_checksum;
set @save_replica_sql_verify_checksum = @@global.replica_sql_verify_checksum;
select @@global.replica_sql_verify_checksum  as 'must be one because of default';
must be one because of default
1
select @@session.replica_sql_verify_checksum  as 'no session var';
ERROR HY000: Variable 'replica_sql_verify_checksum' is a GLOBAL variable
show binary logs;
Log_name	File_size	Encrypted
master-bin.000001	#	#
set @@global.binlog_checksum = NONE;
*** must be rotations seen ***
show binary logs;
Log_name	File_size	Encrypted
master-bin.000001	#	#
master-bin.000002	#	#
set @@global.binlog_checksum = default;
set @@global.binlog_checksum = CRC32;
set @@global.binlog_checksum = CRC32;
set @@global.source_verify_checksum = 0;
set @@global.source_verify_checksum = default;
set @@global.binlog_checksum = ADLER32;
ERROR 42000: Variable 'binlog_checksum' can't be set to the value of 'ADLER32'
set @@global.source_verify_checksum = 2;
ERROR 42000: Variable 'source_verify_checksum' can't be set to the value of '2'
set @@global.replica_sql_verify_checksum = 0;
set @@global.replica_sql_verify_checksum = default;
set @@global.replica_sql_verify_checksum = 2;
ERROR 42000: Variable 'replica_sql_verify_checksum' can't be set to the value of '2'
set @@global.binlog_checksum = NONE;
create table t1 (a int);
flush logs;
flush logs;
flush logs;
flush logs;
flush logs;
flush logs;
select count(*) as zero from t1;
zero
0
include/stop_slave.inc
set @@global.binlog_checksum = CRC32;
insert into t1 values (1) /* will not be applied on slave due to simulation */;
set @@global.debug='+d,simulate_replica_unaware_checksum';
start slave;
Warnings:
Warning	1287	'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
include/wait_for_slave_io_error.inc [errno=13114]
Last_IO_Error = 'Got fatal error 1236 from source when reading data from binary log: 'Replica can not handle replication events with the checksum that source is configured to log; the first event 'master-bin.000009' at XXX, the last event read from './master-bin.000010' at XXX, the last byte read from './master-bin.000010' at XXX.''
select count(*) as zero from t1;
zero
0
include/stop_slave.inc
set @@global.debug='-d,simulate_replica_unaware_checksum';
include/start_slave.inc
set @@global.source_verify_checksum = 1;
set @@session.debug='+d,simulate_checksum_test_failure';
show binlog events;
ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Error reading Log_event at position 4: Failed decoding event: Event crc check failed! Most likely there is event corruption.
set @@session.debug='-d,simulate_checksum_test_failure';
set @@global.source_verify_checksum = default;
include/stop_slave.inc
create table t2 (a int);
set @@global.debug='+d,simulate_checksum_test_failure';
start slave io_thread;
Warnings:
Warning	1287	'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
include/wait_for_slave_io_error.inc [errno=13122, 13115]
set @@global.debug='-d,simulate_checksum_test_failure';
start slave io_thread;
Warnings:
Warning	1287	'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
include/sync_slave_io_with_master.inc
set @@global.replica_sql_verify_checksum = 1;
set @@global.debug='+d,simulate_checksum_test_failure';
start slave sql_thread;
Warnings:
Warning	1287	'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
include/wait_for_slave_sql_error.inc [errno=13117]
Last_SQL_Error = 'Event crc check failed! Most likely there is event corruption.'
include/stop_slave.inc
set @@global.debug='-d,simulate_checksum_test_failure';
include/start_slave.inc
select count(*) as 'must be zero' from t2;
must be zero
0
stop slave;
Warnings:
Warning	1287	'STOP SLAVE' is deprecated and will be removed in a future release. Please use STOP REPLICA instead
reset slave;
Warnings:
Warning	1287	'RESET SLAVE' is deprecated and will be removed in a future release. Please use RESET REPLICA instead
reset master;
set @@global.binlog_checksum= IF(floor((rand()*1000)%2), "CRC32", "NONE");
flush logs;
set @@global.binlog_checksum= CRC32;
reset master;
flush logs;
create table t3 (a int, b char(5));
include/start_slave.inc
select count(*) as 'must be zero' from t3;
must be zero
0
include/stop_slave.inc
CHANGE REPLICATION SOURCE to SOURCE_HOST='127.0.0.1',SOURCE_PORT=MASTER_PORT, SOURCE_USER='root';
Warnings:
Note	####	Sending passwords in plain text without SSL/TLS is extremely insecure.
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.
flush logs;
reset master;
insert into t3 value (1, @@global.binlog_checksum);
include/start_slave.inc
flush logs;
select count(*) as 'must be one' from t3;
must be one
1
set @@global.binlog_checksum= IF(floor((rand()*1000)%2), "CRC32", "NONE");
insert into t3 value (1, @@global.binlog_checksum);
drop table t1, t2, t3;
set @@global.binlog_checksum = @master_save_binlog_checksum;
set @@global.source_verify_checksum = @save_source_verify_checksum;
set @@global.binlog_checksum = @slave_save_binlog_checksum;
set @@global.replica_sql_verify_checksum = @save_replica_sql_verify_checksum;
include/rpl_end.inc