summaryrefslogtreecommitdiff
path: root/sql/rpl_utility.cc
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2015-07-26 14:19:04 +0300
committerMonty <monty@mariadb.org>2015-07-26 14:32:45 +0300
commitf3e578ab30809dc2b92b4586ee5b0af4470a055e (patch)
treeca7771712eb1220b0a785803b8304436ccdb04f9 /sql/rpl_utility.cc
parent2ebedfa998bd9f3f2255b05607a9cb09b6def93d (diff)
downloadmariadb-git-f3e578ab30809dc2b92b4586ee5b0af4470a055e.tar.gz
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()
Diffstat (limited to 'sql/rpl_utility.cc')
-rw-r--r--sql/rpl_utility.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/rpl_utility.cc b/sql/rpl_utility.cc
index 146bf3b0c0e..6a8dee229bb 100644
--- a/sql/rpl_utility.cc
+++ b/sql/rpl_utility.cc
@@ -1174,7 +1174,7 @@ bool event_checksum_test(uchar *event_buf, ulong event_len, uint8 alg)
compile_time_assert(BINLOG_CHECKSUM_ALG_ENUM_END <= 0x80);
}
incoming= uint4korr(event_buf + event_len - BINLOG_CHECKSUM_LEN);
- computed= my_checksum(0L, NULL, 0);
+ computed= 0;
/* checksum the event content but the checksum part itself */
computed= my_checksum(computed, (const uchar*) event_buf,
event_len - BINLOG_CHECKSUM_LEN);