diff options
author | Luis Soares <luis.soares@sun.com> | 2010-01-19 00:10:00 +0000 |
---|---|---|
committer | Luis Soares <luis.soares@sun.com> | 2010-01-19 00:10:00 +0000 |
commit | d1d16f9c3f4310f3ab11fc85b47866d79243a471 (patch) | |
tree | 092624e57eb3c12ba3922c35fda061a14119ef5c /sql/log_event_old.cc | |
parent | ae3e094191d2d48c5468a6fd8e09a54e687cb3e8 (diff) | |
download | mariadb-git-d1d16f9c3f4310f3ab11fc85b47866d79243a471.tar.gz |
Fix for BUG#49481 and BUG#49482 reverted.
PB2 run uncovered issue that needs further analysis.
Diffstat (limited to 'sql/log_event_old.cc')
-rw-r--r-- | sql/log_event_old.cc | 39 |
1 files changed, 1 insertions, 38 deletions
diff --git a/sql/log_event_old.cc b/sql/log_event_old.cc index 72a6e159535..357bc78b1cd 100644 --- a/sql/log_event_old.cc +++ b/sql/log_event_old.cc @@ -351,24 +351,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]); @@ -384,33 +366,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: |