• Mats Kindahl's avatar
    BUG#49618: Field length stored incorrectly in binary log · 27737589
    Mats Kindahl authored
               for InnoDB
                
    The class Field_bit_as_char stores the metadata for the
    field incorrecly because bytes_in_rec and bit_len are set
    to (field_length + 7 ) / 8 and 0 respectively, while
    Field_bit has the correct values field_length / 8 and
    field_length % 8.
                
    Solved the problem by re-computing the values for the
    metadata based on the field_length instead of using the
    bytes_in_rec and bit_len variables.
                
    To handle compatibility with old server, a table map
    flag was added to indicate that the bit computation is
    exact. If the flag is clear, the slave computes the
    number of bytes required to store the bit field and
    compares that instead, effectively allowing replication
    *without conversion* from any field length that require
    the same number of bytes to store.
    27737589
rpl_utility.h 9.05 KB