Skip to content

Commit 88cc11d

Browse files
committed
MDEV-36714: Rows_log_event::write_data_header overallocates buffer size
Nothing is broken by this, but the function Rows_log_event::write_data_header slightly over-allocates its buf by 2 bytes. It allocates 10 (ROWS_HEADER_LEN_V2), but only 8 are ever written. This patch fixes the buf size to match what is written (i.e. ROWS_HEADER_LEN_V1, or 8 bytes). Reviewed By: ============ Kristian Nielsen <knielsen@knielsen-hq.org>
1 parent 3e9e1a2 commit 88cc11d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sql/log_event_server.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5514,7 +5514,7 @@ Rows_log_event::do_update_pos(rpl_group_info *rgi)
55145514

55155515
bool Rows_log_event::write_data_header(Log_event_writer *writer)
55165516
{
5517-
uchar buf[ROWS_HEADER_LEN_V2]; // No need to init the buffer
5517+
uchar buf[ROWS_HEADER_LEN_V1]; // No need to init the buffer
55185518
DBUG_ASSERT(m_table_id != UINT32_MAX);
55195519
DBUG_EXECUTE_IF("old_row_based_repl_4_byte_map_id_master",
55205520
{

0 commit comments

Comments
 (0)