From f3e578ab30809dc2b92b4586ee5b0af4470a055e Mon Sep 17 00:00:00 2001 From: Monty Date: Sun, 26 Jul 2015 14:19:04 +0300 Subject: Fixed MDEV-8428: Mangled DML statements on 2nd level slave when enabling binlog checksums Fix was to add a test in Query_log_event::Query_log_event() if we are using CREATE ... SELECT and in this case use trans cache, like we do on the master. This avoid using (with doesn't have checksum) Other things: - Removed dummy call my_checksum(0L, NULL, 0) - More DBUG_PRINT - Cleaned up Log_event::need_checksum() to make it more readable (similar as in MySQL 5.6) - Renamed variable that was hiding another one in create_table_imp() --- sql/slave.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sql/slave.cc') diff --git a/sql/slave.cc b/sql/slave.cc index 4129c4cbc98..dde57bc16fb 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -5464,7 +5464,7 @@ static int queue_event(Master_info* mi,const char* buf, ulong event_len) if (uint4korr(&buf[0]) == 0 && checksum_alg == BINLOG_CHECKSUM_ALG_OFF && mi->rli.relay_log.relay_log_checksum_alg != BINLOG_CHECKSUM_ALG_OFF) { - ha_checksum rot_crc= my_checksum(0L, NULL, 0); + ha_checksum rot_crc= 0; event_len += BINLOG_CHECKSUM_LEN; memcpy(rot_buf, buf, event_len - BINLOG_CHECKSUM_LEN); int4store(&rot_buf[EVENT_LEN_OFFSET], -- cgit v1.2.1