• Libing Song's avatar
    MDEV-33049 Assertion `marked_for_write_or_computed()' failed in bool · be6d48fd
    Libing Song authored
               Field_new_decimal::store_value(const my_decimal*, int*)
    
    Analysis
    ========
    When rpl applier is unpacking a before row image, Field::reset() will be
    called before setting a field to null if null bit of the field is set in
    the row image. For Field_new_decimal::reset(), it calls
    Field_new_decimal::store_value() to reset the value. store_value() asserts
    that the field is in the write_set bitmap since it thinks the field is
    updating.
    
    But that is not true for the row image generated in FULL_NODUP
    mode. In the mode, the before image includes all fields and the after
    image includes only updated fields.
    
    Fix
    ===
    In the case unpacking binlog row images, the assertion is meaningless.
    So the unpacking field is marked in write_set temporarily to avoid the
    assertion failure.
    be6d48fd
rpl_record.cc 18.4 KB