summaryrefslogtreecommitdiff
path: root/sql/rpl_record.cc
diff options
context:
space:
mode:
authorVicențiu Ciorbaru <vicentiu@mariadb.org>2015-05-29 17:19:53 +0300
committerVicențiu Ciorbaru <vicentiu@mariadb.org>2015-06-30 13:17:09 +0300
commitd817267ae6469f3cccbe08a55c5d10afd1bdb42f (patch)
treee5e2e679877197de8c381215c793c778282be57a /sql/rpl_record.cc
parent50955075bba0c9623f362dce9496fa914ff45df5 (diff)
downloadmariadb-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/rpl_record.cc')
-rw-r--r--sql/rpl_record.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/sql/rpl_record.cc b/sql/rpl_record.cc
index 8c694602c74..feab97fd589 100644
--- a/sql/rpl_record.cc
+++ b/sql/rpl_record.cc
@@ -209,6 +209,16 @@ unpack_row(rpl_group_info *rgi,
Field **field_ptr;
Field **const end_ptr= begin_ptr + colcnt;
+ if (bitmap_is_clear_all(cols))
+ {
+ /**
+ There was no data sent from the master, so there is
+ nothing to unpack.
+ */
+ *current_row_end= pack_ptr;
+ *master_reclength= 0;
+ DBUG_RETURN(error);
+ }
DBUG_ASSERT(null_ptr < row_data + master_null_byte_count);
// Mask to mask out the correct bit among the null bits