From: Andrei Elkin Date: October 26 2010 5:26pm Subject: bzr commit into mysql-next-mr branch (andrei.elkin:3185) Bug#57589 List-Archive: http://lists.mysql.com/commits/121949 X-Bug: 57589 Message-Id: <201010261726.o9QHQMMH007223@mysql1000.dsl.inet.fi> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0994356924==" --===============0994356924== MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline #At file:///home/andrei/MySQL/BZR/2a-23May/WL/mysql-next-mr-wl2540/ based on revid:andrei.elkin@stripped 3185 Andrei Elkin 2010-10-26 Bug #57589 SHOW SLAVE STATUS doesnt show err:1665 on NM-OS when slave can't handle checksum OS can't connect to the checksumming-ON NM and an error goes out to the error log (which is good), but OS can't stop trying to reconnect constantly (which is not). While practically this scenario must be pretty rare it's possible to fix the issue a rather nice way. Master sends back to checksum-unaware OS the ER_MASTER_FATAL_ERROR_READING_BINLOG critical error accompanied with a verbose clarification mentioning the checksum situation like in the following snippet of the error log from the patch testing: 101026 20:15:45 [ERROR] Error reading packet from server: Slave can not handle replication events with the checksum that master is configured to log ( server_errno=1236) 101026 20:15:45 [ERROR] Slave I/O: Got fatal error 1236 from master when reading data from binary log: 'Slave can not handle replication events with the checksum that master is configured to log', Error_code: 1236 Master also logs a warning 101026 20:15:33 [Warning] Configured to log replication events with checksum Master rejects sending them to Slave that can not handle it. @ sql/rpl_master.cc In case of checksumming-ON NM -> OS replication Master sends back to checksum-unaware OS the ER_MASTER_FATAL_ERROR_READING_BINLOG critical error accompanied with a verbose clarification. Master also logs a warning. @ sql/rpl_slave.cc Unneeded anymore piece of codes is removed. @ sql/share/errmsg-utf8.txt Unneeded error is removed. modified: sql/rpl_master.cc sql/rpl_slave.cc sql/share/errmsg-utf8.txt === modified file 'sql/rpl_master.cc' --- a/sql/rpl_master.cc 2010-10-25 19:02:24 +0000 +++ b/sql/rpl_master.cc 2010-10-26 17:26:11 +0000 @@ -815,9 +815,12 @@ impossible position"; current_checksum_alg != BINLOG_CHECKSUM_ALG_OFF && current_checksum_alg != BINLOG_CHECKSUM_ALG_UNDEF) { - my_errno= ER_SLAVE_IS_NOT_CHECKSUM_CAPABLE; - errmsg= ER(my_errno); - goto err; + my_errno= ER_MASTER_FATAL_ERROR_READING_BINLOG; + errmsg= "Slave can not handle replication events with the checksum " + "that master is configured to log"; + sql_print_warning("Configured to log replication events with " + "checksum Master rejects sending them to Slave " + "that can not handle it."); } binlog_can_be_corrupted= test((*packet)[FLAGS_OFFSET+ev_offset] & LOG_EVENT_BINLOG_IN_USE_F); @@ -912,9 +915,13 @@ impossible position"; current_checksum_alg != BINLOG_CHECKSUM_ALG_OFF && current_checksum_alg != BINLOG_CHECKSUM_ALG_UNDEF) { - my_errno= ER_SLAVE_IS_NOT_CHECKSUM_CAPABLE; - errmsg= ER(my_errno); - goto err; + my_errno= ER_MASTER_FATAL_ERROR_READING_BINLOG; + errmsg= "Slave can not handle replication events with the checksum " + "that master is configured to log"; + sql_print_warning("Configured to log replication events with " + "checksum Master rejects sending them to Slave " + "that can not handle it."); + goto err; } binlog_can_be_corrupted= test((*packet)[FLAGS_OFFSET+ev_offset] & LOG_EVENT_BINLOG_IN_USE_F); === modified file 'sql/rpl_slave.cc' --- a/sql/rpl_slave.cc 2010-10-25 19:02:24 +0000 +++ b/sql/rpl_slave.cc 2010-10-26 17:26:11 +0000 @@ -3359,11 +3359,6 @@ Stopping slave I/O thread due to out-of- mi->report(ERROR_LEVEL, ER_OUT_OF_RESOURCES, "%s", ER(ER_OUT_OF_RESOURCES)); goto err; - case ER_SLAVE_IS_NOT_CHECKSUM_CAPABLE: - mi->report(ERROR_LEVEL, ER_SLAVE_IS_NOT_CHECKSUM_CAPABLE, - ER(ER_SLAVE_IS_NOT_CHECKSUM_CAPABLE), - mysql_error_number, mysql_error(mysql)); - goto err; } if (try_to_reconnect(thd, mysql, mi, &retry_count, suppress_warnings, reconnect_messages[SLAVE_RECON_ACT_EVENT])) === modified file 'sql/share/errmsg-utf8.txt' --- a/sql/share/errmsg-utf8.txt 2010-10-25 19:02:24 +0000 +++ b/sql/share/errmsg-utf8.txt 2010-10-26 17:26:11 +0000 @@ -6391,8 +6391,6 @@ ER_NETWORK_READ_EVENT_CHECKSUM_FAILURE eng "Replication event checksum verification failed while reading from network." ER_BINLOG_READ_EVENT_CHECKSUM_FAILURE eng "Replication event checksum verification failed while reading from a log file." -ER_SLAVE_IS_NOT_CHECKSUM_CAPABLE - eng "Slave can not handle replication events with the checksum that master is configured to log." ER_WARN_INDEX_NOT_APPLICABLE eng "Cannot use %-.64s access on index '%-.64s' due to type or collation conversion on field '%-.64s'" ER_BINLOG_CACHE_SIZE_GREATER_THAN_MAX --===============0994356924== MIME-Version: 1.0 Content-Type: text/bzr-bundle; charset="us-ascii"; name="bzr/andrei.elkin@stripped" Content-Transfer-Encoding: 7bit Content-Disposition: inline # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: andrei.elkin@stripped # target_branch: file:///home/andrei/MySQL/BZR/2a-23May/WL/mysql-next-\ # mr-wl2540/ # testament_sha1: 4c30eba8af4992838f0fc53052726f58ef30659b # timestamp: 2010-10-26 20:26:22 +0300 # source_branch: file:///home/andrei/MySQL/BZR/2a-23May/WL/5.6.99-\ # next-rm-wl2540-checksum/ # base_revision_id: andrei.elkin@stripped\ # ov98axm8iosd2atl # # Begin bundle IyBCYXphYXIgcmV2aXNpb24gYnVuZGxlIHY0CiMKQlpoOTFBWSZTWZvUXW0ABAB/gEHwAGBY5/// f+efir////BgCQ+9U7m+rmlVD1be8lj3dWnI7GVAjCSSAFT9MqfqPSbIZNU8mFBpk02po9IaAAZA SUmgaJ4pmiT1TanqeUPU9R5RoAyAAADT1BxkyaMQ00MBNDE0aZMQMjCaNNMIMmEiRE0J6mjI2iA0 QwAAAAQBkNAikQTVP0DRoKeRk0yo/VP0SNlGaRpo0AADQSRJkxAQ0TQnoym0p6hp6mg0ZNGg0ANA dkiD3XZfm/ZfbpDA+r3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