Details
-
Bug
-
Status: Confirmed (View Workflow)
-
Major
-
Resolution: Unresolved
-
5.3.12, 5.5, 10.0, 10.1
-
None
-
Linux
Description
Manual (https://mariadb.com/kb/en/mariadb/binlog-event-checksums/) says that binlog_checksum can be changed dynamically and:
"When checksums are enabled, replication slaves will check events received over the network for checksum errors, and will stop with an error if a corrupt event is detected."
It does NOT say what should happen when binlog_checksum is disabled dynamically.
In case of a MariaDB 10.0.20 slave (started with log_slave_updates and binlog_checksum=CRC32 in my.cnf) that we want to make replicating from MySQL 5.5 master (that does not support binlog_checksum) while it also replicates from MariaDB 10.0.20 master we have a problem upon I/O thread start:
150720 17:12:15 [Note] 'CHANGE MASTER TO executed'. Previous state master_host='127.0.0.1', master_port='3306', master_log_file='', master_log_pos='4'. New state master_host='127.0.0.1', master_port='3306', master_log_file='ao756-bin.000001', master_log_pos='107'.
|
150720 17:12:23 [Note] Master 'mysql55': Slave SQL thread initialized, starting replication in log 'ao756-bin.000001' at position 107, relay log './mysql_sandbox25031-relay-bin-mysql55.000001' position: 4
|
150720 17:12:23 [Note] Master 'mysql55': Slave I/O thread: connected to master 'root@127.0.0.1:3306',replication started in log 'ao756-bin.000001' at position 107
|
150720 17:12:23 [ERROR] Master 'mysql55': Slave I/O: Replication event checksum verification failed while reading from network. Internal MariaDB error code: 1743
|
150720 17:12:23 [ERROR] Master 'mysql55': Slave I/O: Relay log write failure: could not queue event from master, Internal MariaDB error code: 1595
|
150720 17:12:23 [Note] Master 'mysql55': Slave I/O thread exiting, read up to log 'ao756-bin.000001', position 107
|
and this problem can NOT be resolved by changing binlog_checksum to NONE dynamically on slave. One has to comment setting out in my.cnf and restart the entire instance:
slave1 [localhost] {msandbox} ((none)) > show global variables like 'binlog_che%';
|
+-----------------+-------+
|
| Variable_name | Value |
|
+-----------------+-------+
|
| binlog_checksum | NONE |
|
+-----------------+-------+
|
1 row in set (0.00 sec)
|
|
slave1 [localhost] {msandbox} ((none)) > set global slave_sql_verify_checksum=OFF;
|
Query OK, 0 rows affected (0.00 sec)
|
|
slave1 [localhost] {msandbox} ((none)) > show variables like 'slave_sql%'; +---------------------------+-------+
|
| Variable_name | Value |
|
+---------------------------+-------+
|
| slave_sql_verify_checksum | OFF |
|
+---------------------------+-------+
|
1 row in set (0.00 sec)
|
slave1 [localhost] {msandbox} ((none)) > stop slave 'mysql55'; Query OK, 0 rows affected (0.02 sec)
|
|
slave1 [localhost] {msandbox} ((none)) > reset slave 'mysql55'; Query OK, 0 rows affected (0.00 sec)
|
|
slave1 [localhost] {msandbox} ((none)) > change master 'mysql55' to master_host='127.0.0.1', master_user='root', master_port=3306, master_log_file='ao756-bin.000001', master_log_pos=107;
|
Query OK, 0 rows affected (0.31 sec)
|
|
slave1 [localhost] {msandbox} ((none)) > start slave 'mysql55'; Query OK, 0 rows affected (0.00 sec)
|
slave1 [localhost] {msandbox} ((none)) > show slave 'mysql55' status\G *************************** 1. row ***************************
|
Slave_IO_State:
|
Master_Host: 127.0.0.1
|
Master_User: root
|
Master_Port: 3306
|
Connect_Retry: 60
|
Master_Log_File: ao756-bin.000001
|
Read_Master_Log_Pos: 107
|
Relay_Log_File: mysql_sandbox25031-relay-bin-mysql55.000001
|
Relay_Log_Pos: 4
|
Relay_Master_Log_File: ao756-bin.000001
|
Slave_IO_Running: No
|
Slave_SQL_Running: Yes
|
Replicate_Do_DB:
|
Replicate_Ignore_DB:
|
Replicate_Do_Table:
|
Replicate_Ignore_Table:
|
Replicate_Wild_Do_Table:
|
Replicate_Wild_Ignore_Table:
|
Last_Errno: 0
|
Last_Error:
|
Skip_Counter: 0
|
Exec_Master_Log_Pos: 107
|
Relay_Log_Space: 248
|
Until_Condition: None
|
Until_Log_File:
|
Until_Log_Pos: 0
|
Master_SSL_Allowed: No
|
Master_SSL_CA_File:
|
Master_SSL_CA_Path:
|
Master_SSL_Cert:
|
Master_SSL_Cipher:
|
Master_SSL_Key:
|
Seconds_Behind_Master: NULL
|
Master_SSL_Verify_Server_Cert: No
|
Last_IO_Errno: 1595
|
Last_IO_Error: Relay log write failure: could not queue event from master
|
Last_SQL_Errno: 0
|
Last_SQL_Error:
|
Replicate_Ignore_Server_Ids:
|
Master_Server_Id: 1111
|
Master_SSL_Crl:
|
Master_SSL_Crlpath:
|
Using_Gtid: No
|
Gtid_IO_Pos:
|
1 row in set (0.00 sec)
|
openxs@ao756:~/sandboxes/rsandbox_mariadb-10_0_20/node1$ ./stop
|
openxs@ao756:~/sandboxes/rsandbox_mariadb-10_0_20/node1$ vi my.sandbox.cnf openxs@ao756:~/sandboxes/rsandbox_mariadb-10_0_20/node1$ ./start
|
. sandbox server started
|
openxs@ao756:~/sandboxes/rsandbox_mariadb-10_0_20/node1$ ./my sql Welcome to the MariaDB monitor. Commands end with ; or \g.
|
Your MariaDB connection id is 7
|
Server version: 10.0.20-MariaDB-log MariaDB Server
|
|
Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others.
|
|
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
|
|
slave1 [localhost] {msandbox} ((none)) > show slave 'mysql55' status\G
|
*************************** 1. row ***************************
|
Slave_IO_State: Waiting for master to send event
|
Master_Host: 127.0.0.1
|
Master_User: root
|
Master_Port: 3306
|
Connect_Retry: 60
|
Master_Log_File: ao756-bin.000002
|
Read_Master_Log_Pos: 576
|
Relay_Log_File: mysql_sandbox25031-relay-bin-mysql55.000004
|
Relay_Log_Pos: 863
|
Relay_Master_Log_File: ao756-bin.000002
|
Slave_IO_Running: Yes
|
Slave_SQL_Running: Yes
|
Replicate_Do_DB:
|
Replicate_Ignore_DB:
|
Replicate_Do_Table:
|
Replicate_Ignore_Table:
|
Replicate_Wild_Do_Table:
|
Replicate_Wild_Ignore_Table:
|
Last_Errno: 0
|
Last_Error:
|
Skip_Counter: 0
|
Exec_Master_Log_Pos: 576
|
Relay_Log_Space: 1327
|
Until_Condition: None
|
Until_Log_File:
|
Until_Log_Pos: 0
|
Master_SSL_Allowed: No
|
Master_SSL_CA_File:
|
Master_SSL_CA_Path:
|
Master_SSL_Cert:
|
Master_SSL_Cipher:
|
Master_SSL_Key:
|
Seconds_Behind_Master: 0
|
Master_SSL_Verify_Server_Cert: No
|
Last_IO_Errno: 0
|
Last_IO_Error:
|
Last_SQL_Errno: 0
|
Last_SQL_Error:
|
Replicate_Ignore_Server_Ids:
|
Master_Server_Id: 1111
|
Master_SSL_Crl:
|
Master_SSL_Crlpath:
|
Using_Gtid: No
|
Gtid_IO_Pos:
|
1 row in set (0.00 sec)
|
This is unexpected after reading the manual and is a problem in general (as any instance restart).
So, please, either document this case properly or, even better, make sure that slave is not checking checksums in I/O thread after binlog_checksum is reset to NONE globally (so that next START SLAVE works).
Attachments
Issue Links
- relates to
-
MDEV-26140 binlog_checksum dynamic changes seem ineffective, restart required
- Open