mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +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:
@ -79,8 +79,7 @@ fake_event_header(String* packet, Log_event_type event_type, ulong extra_len,
|
||||
}
|
||||
if (*do_checksum)
|
||||
{
|
||||
*crc= my_checksum(0L, NULL, 0);
|
||||
*crc= my_checksum(*crc, (uchar*)header, sizeof(header));
|
||||
*crc= my_checksum(0, (uchar*)header, sizeof(header));
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@ -743,8 +742,8 @@ static int send_heartbeat_event(NET* net, String* packet,
|
||||
if (do_checksum)
|
||||
{
|
||||
char b[BINLOG_CHECKSUM_LEN];
|
||||
ha_checksum crc= my_checksum(0L, NULL, 0);
|
||||
crc= my_checksum(crc, (uchar*) header, sizeof(header));
|
||||
ha_checksum crc;
|
||||
crc= my_checksum(0, (uchar*) header, sizeof(header));
|
||||
crc= my_checksum(crc, (uchar*) p, ident_len);
|
||||
int4store(b, crc);
|
||||
packet->append(b, sizeof(b));
|
||||
|
Reference in New Issue
Block a user