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-30 13:17:09 +0300 |
commit | d817267ae6469f3cccbe08a55c5d10afd1bdb42f (patch) | |
tree | e5e2e679877197de8c381215c793c778282be57a /sql/log_event.h | |
parent | 50955075bba0c9623f362dce9496fa914ff45df5 (diff) | |
download | mariadb-git-d817267ae6469f3cccbe08a55c5d10afd1bdb42f.tar.gz |
[MDEV-6877] Change replication event loop to account for empty events10.1-MDEV-6877-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); } |