1
0
mirror of https://github.com/MariaDB/server.git synced 2026-10-23 18:49:29 +03:00
Files
mariadb/sql
Brandon Nesterenko 83e909fc2a MDEV-40768: Slave cannot apply a fragmented row event written with log_bin_compress=ON
MDEV-32570 added fragmentation of large row events. When binlog
compression is enabled (log_bin_compress=ON), the compression is
bypassed, and these binary log events remain as regular row events, when
they should be compressed row events.

This is because the compression happens during the Log_event::write()
function, whereas row data fragmentation happens before
Log_event::write() is called. The Rows_log_event super-class stores the
row data buffers to be written to disk. The regular Rows_log_event
sub-classes's implementations of Log_event::write() write this data
as-is. The compressed sub-classes's implementation of ::write()
over-write these buffers with the compressed rows data before writing to
disk.

To fragment a large row event, the server fragments the Rows_log_event's
row data buffers, to be written by multiple Partial_rows_log_event's,
and each Partial_rows_log_event::write() call writes its portion of the
row data buffer to disk. However, this happens before compression ever
has a chance to take place, and thereby, an event that should be
compressed, never is.

MDEV-39762 added event structure validation for compressed events, and
discovered that these events carry the compressed event type, but are
not actually compressed. Event validation thereby fails.

This patch adds a workaround to override the event type of the
fragmented row events to be regular row events, to be consistent with
the actual on-disk content. The underlying problem still needs to be
addressed though, and is tracked by MDEV-40851.

Signed-off-by: Brandon Nesterenko <brandon.nesterenko@mariadb.com>
2026-08-20 08:27:53 +02:00
..
2026-06-15 16:53:03 +02:00
2025-10-25 00:19:11 +07:00
…
2026-08-20 08:27:14 +02:00
2025-07-28 21:29:29 +02:00
2024-11-05 14:00:48 -08:00
2026-07-30 11:41:55 +02:00
2025-09-29 18:25:09 +03:00
…
2025-03-14 12:08:56 +04:00
2025-03-14 12:08:56 +04:00
…
2024-12-02 11:35:34 +02:00
2024-12-02 17:51:17 +02:00
2026-01-31 14:08:54 +01:00
2024-10-30 15:11:17 +01:00
…
2026-01-31 14:08:54 +01:00
2026-07-30 11:41:55 +02:00
2026-08-20 08:27:14 +02:00
2024-12-02 11:35:34 +02:00
2026-05-26 21:15:58 +02:00
2026-03-24 09:49:17 +02:00
2026-03-24 09:49:17 +02:00
…
…
2024-11-08 07:17:00 +01:00
2026-05-26 21:15:58 +02:00
2026-06-15 16:53:03 +02:00
2026-05-26 21:15:58 +02:00
2026-08-20 08:27:14 +02:00
2026-05-26 21:15:58 +02:00
2026-07-29 12:27:46 +02:00
2024-11-29 13:43:17 +02:00
…
…
2026-08-20 08:27:14 +02:00
2026-08-20 08:27:14 +02:00
2024-12-05 10:11:58 +01:00
2026-08-20 08:27:14 +02:00
2026-07-30 11:41:55 +02:00
2026-08-20 08:27:14 +02:00
2026-02-03 14:53:15 +01:00
2026-08-20 08:27:14 +02:00
2026-05-26 21:15:58 +02:00
2026-02-03 14:53:15 +01:00
2026-02-03 14:53:15 +01:00
2026-08-20 08:27:14 +02:00
2026-07-30 11:41:55 +02:00
2026-08-20 08:27:14 +02:00
2026-07-30 11:41:55 +02:00
2026-06-29 07:40:04 +03:00
2026-03-24 09:49:17 +02:00
2026-01-31 14:08:54 +01:00
2026-04-01 15:03:59 +03:00
2026-08-20 08:27:14 +02:00
2026-08-20 08:27:14 +02:00
2026-01-08 12:02:45 +01:00
2026-07-30 11:41:55 +02:00
2024-07-08 22:40:16 +02:00
2026-05-26 21:15:58 +02:00
2026-08-20 08:27:14 +02:00
…
2026-08-20 08:27:14 +02:00
2026-08-20 08:27:14 +02:00
2026-08-20 08:27:14 +02:00
2026-05-26 21:15:58 +02:00
…
2025-03-14 12:08:56 +04:00
2026-08-20 08:27:14 +02:00
2026-04-02 09:15:17 +03:00
…
2024-10-03 15:59:20 +10:00
…
2025-03-14 12:08:56 +04:00
2026-05-26 21:15:58 +02:00
2026-05-26 21:15:58 +02:00
2026-08-20 08:27:14 +02:00
2026-08-20 08:27:14 +02:00
2026-07-29 12:27:46 +02:00
2026-02-06 17:46:51 +01:00
2026-08-20 08:27:14 +02:00
2026-02-03 14:53:15 +01:00
2026-08-20 08:27:14 +02:00
2026-07-28 13:14:38 +02:00
2026-07-30 11:41:55 +02:00
2026-05-08 08:00:01 +02:00
2026-08-20 08:27:14 +02:00
2026-01-31 14:08:54 +01:00
2026-05-26 21:15:58 +02:00
2026-02-03 14:53:15 +01:00
2025-09-29 18:25:09 +03:00
2024-07-22 15:14:50 +02:00
2026-05-26 21:15:58 +02:00
2026-05-26 21:15:58 +02:00
2026-05-26 21:15:58 +02:00
2026-06-15 16:53:03 +02:00
2026-07-30 11:41:55 +02:00
2026-06-15 16:53:03 +02:00
2026-08-20 08:27:14 +02:00
2026-08-20 08:27:14 +02:00
2026-06-15 16:53:03 +02:00
2026-06-15 16:53:03 +02:00
2025-03-14 12:08:56 +04:00
2026-04-02 09:15:17 +03:00
2026-08-20 08:27:14 +02:00
2026-08-20 08:27:14 +02:00
2026-08-20 08:27:14 +02:00
2026-02-06 17:46:50 +01:00
2025-11-04 12:39:27 +01:00
2026-08-20 08:27:14 +02:00
2026-07-30 11:41:55 +02:00
2026-05-26 21:15:58 +02:00
2026-07-30 11:41:55 +02:00
2026-07-30 11:41:55 +02:00
2026-07-30 11:41:55 +02:00
2026-07-30 11:41:55 +02:00
2026-02-06 17:46:51 +01:00
2026-08-20 08:27:14 +02:00
2025-09-04 18:08:39 +03:00
2026-08-20 08:27:14 +02:00
2025-05-03 12:06:36 +02:00
2026-05-26 21:15:58 +02:00
2024-06-24 13:09:47 +03:00
2026-07-30 11:41:55 +02:00
2026-07-30 11:41:55 +02:00
2026-06-15 15:15:10 +02:00
2026-06-15 15:15:10 +02:00
2026-01-08 21:41:40 +01:00
2026-08-20 08:27:14 +02:00
2026-05-26 21:15:58 +02:00
2026-04-02 09:15:17 +03:00
2026-08-20 08:27:14 +02:00
2026-08-20 08:27:14 +02:00
2026-01-31 14:08:54 +01:00
2026-01-05 20:34:44 +01:00
2026-07-30 11:41:55 +02:00
2026-03-24 09:49:17 +02:00
2026-06-29 07:40:04 +03:00
2026-01-08 12:02:45 +01:00
2026-07-30 11:41:55 +02:00
2026-07-30 11:41:55 +02:00
2026-07-30 11:41:55 +02:00
2026-02-06 17:46:51 +01:00
2026-03-17 18:57:42 +01:00
2026-02-07 22:12:32 +01:00
2026-08-20 08:27:14 +02:00
…
2026-02-06 17:46:51 +01:00
2026-02-06 17:46:51 +01:00
2026-04-02 09:15:17 +03:00
2025-09-29 18:25:09 +03:00
2024-06-27 10:26:09 +03:00
2025-08-04 12:05:53 +02:00
2024-12-02 17:51:17 +02:00
2026-07-30 11:41:55 +02:00
2025-09-19 12:31:14 +03:00
2026-07-30 11:41:55 +02:00
2026-07-30 11:41:55 +02:00
2026-05-26 21:15:58 +02:00
2025-03-14 12:08:56 +04:00
2026-08-20 08:27:14 +02:00
2026-08-20 08:27:14 +02:00
2024-07-03 12:45:30 +02:00
2026-04-17 09:31:38 +10:00
2026-08-20 08:27:14 +02:00
2025-01-09 09:41:38 +02:00
2026-07-30 11:41:55 +02:00
2024-12-02 17:51:17 +02:00
2026-08-20 08:27:14 +02:00
2026-07-30 11:41:55 +02:00
2026-08-20 08:27:14 +02:00
2026-08-20 08:27:14 +02:00
2026-06-15 16:53:03 +02:00
2026-05-26 21:15:58 +02:00
2026-08-20 08:27:14 +02:00
2026-08-20 08:27:14 +02:00
2026-08-20 08:27:14 +02:00
2026-03-24 09:49:17 +02:00
2026-07-30 11:41:55 +02:00
2026-08-19 08:40:05 +02:00
2026-07-28 13:14:38 +02:00
2026-07-30 11:41:55 +02:00
2026-02-07 22:12:32 +01:00
2025-04-29 11:18:00 +10:00
2026-05-26 21:15:58 +02:00
…
2026-05-08 08:11:03 +02:00
2026-08-20 08:27:14 +02:00
2026-07-30 11:41:55 +02:00
2025-03-14 12:08:56 +04:00
2024-12-02 17:51:17 +02:00
2026-08-20 08:27:14 +02:00
2026-07-30 11:41:55 +02:00
2026-07-30 11:41:55 +02:00
2026-06-15 16:53:03 +02:00
2026-08-20 08:27:14 +02:00
2026-08-20 08:27:14 +02:00
2026-08-20 08:27:14 +02:00
2026-08-20 08:27:14 +02:00
2026-08-20 08:27:14 +02:00
2026-08-20 08:27:14 +02:00
2026-08-20 08:27:14 +02:00
2026-07-30 11:41:55 +02:00
2026-03-24 09:49:17 +02:00
2025-09-04 18:08:39 +03:00
2024-06-24 13:09:47 +03:00
2025-03-14 12:08:56 +04:00
2024-12-02 17:51:17 +02:00
2024-12-02 11:35:34 +02:00
2026-08-20 08:27:14 +02:00
2026-08-20 08:27:14 +02:00
2025-03-14 12:08:56 +04:00
2026-06-15 16:53:03 +02:00
2025-11-28 12:56:27 +02:00
2024-06-27 10:26:09 +03:00
2026-08-20 08:27:14 +02:00
2026-05-26 21:15:58 +02:00
2026-06-21 15:32:20 +02:00
2026-08-19 08:40:05 +02:00
2026-06-15 16:53:03 +02:00
2026-04-02 09:15:17 +03:00
2024-10-03 13:24:43 +03:00
2024-09-09 13:50:38 +03:00
2026-08-20 08:27:14 +02:00
2026-02-07 22:12:32 +01:00
2026-07-29 12:27:46 +02:00
2026-07-29 12:27:46 +02:00
2026-08-20 08:27:14 +02:00
2026-04-01 10:49:05 +03:00
2025-07-31 20:55:47 +02:00