diff options
author | Vicențiu Ciorbaru <vicentiu@mariadb.org> | 2015-05-29 17:19:53 +0300 |
---|---|---|
committer | Vicențiu Ciorbaru <vicentiu@mariadb.org> | 2015-06-22 10:35:48 +0300 |
commit | d1634c66ea85a7388ac54799613feb30e8733848 (patch) | |
tree | a9fee95a6fc87b96c27f303fe9119d9b3904dd51 /sql/log_event.h | |
parent | 563e35ad27ac315548e47b40c72b5ec2e4bc9250 (diff) | |
download | mariadb-git-bb-10.1-binlog_row_image.tar.gz |
[MDEV-6877] Change replication event loop to account for empty eventsbb-10.1-binlog_row_image
When writing rows with a minimal row image, it is possible to receive
empty events. In that case m_curr_row and m_rows_end are the same,
however the event implies an insert into the table with the default
values associated for that table.
Diffstat (limited to 'sql/log_event.h')
-rw-r--r-- | sql/log_event.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sql/log_event.h b/sql/log_event.h index d602c704828..95b68e627ff 100644 --- a/sql/log_event.h +++ b/sql/log_event.h @@ -4409,20 +4409,23 @@ protected: int find_row(rpl_group_info *); int write_row(rpl_group_info *, const bool); - // Unpack the current row into m_table->record[0] + // Unpack the current row into m_table->record[0], but with + // a different columns bitmap. int unpack_current_row(rpl_group_info *rgi, MY_BITMAP const *cols) { DBUG_ASSERT(m_table); - ASSERT_OR_RETURN_ERROR(m_curr_row < m_rows_end, HA_ERR_CORRUPT_EVENT); + ASSERT_OR_RETURN_ERROR(m_curr_row <= m_rows_end, HA_ERR_CORRUPT_EVENT); return ::unpack_row(rgi, m_table, m_width, m_curr_row, cols, &m_curr_row_end, &m_master_reclength, m_rows_end); } + + // Unpack the current row into m_table->record[0] int unpack_current_row(rpl_group_info *rgi) { DBUG_ASSERT(m_table); - ASSERT_OR_RETURN_ERROR(m_curr_row < m_rows_end, HA_ERR_CORRUPT_EVENT); + ASSERT_OR_RETURN_ERROR(m_curr_row <= m_rows_end, HA_ERR_CORRUPT_EVENT); return ::unpack_row(rgi, m_table, m_width, m_curr_row, &m_cols, &m_curr_row_end, &m_master_reclength, m_rows_end); } |