summaryrefslogtreecommitdiff
path: root/sql/log_event.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/log_event.cc')
-rw-r--r--sql/log_event.cc39
1 files changed, 1 insertions, 38 deletions
diff --git a/sql/log_event.cc b/sql/log_event.cc
index fa612993847..c92a528dfab 100644
--- a/sql/log_event.cc
+++ b/sql/log_event.cc
@@ -8854,24 +8854,6 @@ static bool record_compare(TABLE *table)
}
}
- /**
- Check if we are using MyISAM.
-
- If this is a myisam table, then we cannot do a memcmp
- right away because some NULL fields can still contain
- an old value in the row - they are not shown to the user
- because the null bit is set, however, the contents are
- not cleared. As such, plain memory comparison cannot be
- assured to work. See: BUG#49482 and BUG#49481.
-
- On top of this, we do not store field contents for null
- fields in the binlog, so this is extra important when
- comparing records fetched from binlog and from storage
- engine.
- */
- if (table->file->ht->db_type == DB_TYPE_MYISAM)
- goto record_compare_field_by_field;
-
if (table->s->blob_fields + table->s->varchar_fields == 0)
{
result= cmp_record(table,record[1]);
@@ -8887,33 +8869,14 @@ static bool record_compare(TABLE *table)
goto record_compare_exit;
}
-record_compare_field_by_field:
-
/* Compare updated fields */
for (Field **ptr=table->field ; *ptr ; ptr++)
{
- Field *f= *ptr;
-
- /* if just one of the fields is null then there is no match */
- if ((f->is_null_in_record(table->record[0])) ==
- !(f->is_null_in_record(table->record[1])))
+ if ((*ptr)->cmp_binary_offset(table->s->rec_buff_length))
{
result= TRUE;
goto record_compare_exit;
}
-
- /* if both fields are not null then we can compare */
- if (!(f->is_null_in_record(table->record[0])) &&
- !(f->is_null_in_record(table->record[1])))
- {
- if (f->cmp_binary_offset(table->s->rec_buff_length))
- {
- result= TRUE;
- goto record_compare_exit;
- }
- }
-
- /* if both fields are null then there is a match. compare next field */
}
record_compare_exit: