mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
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()
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user