• Monty's avatar
    MDEV-15243 Crash with virtual fields and row based binary logging · 4cd2a0eb
    Monty authored
    The cause of this was several different bugs:
    
    - When using binary logging with binlog_row_image=FULL
      the all bits in read_set was set, which caused a
      different (wrong) pattern for marking vcol_set.
    - TABLE::mark_virtual_columns_for_write() didn't in all
      cases mark vcol_set with the vcol_field.
    - TABLE::update_virtual_fields() has to update all
      vcol fields on REPLACE if binary logging with FULL
      is used.
    - VCOL_UPDATE_INDEXED should update all vcol fields part
      of an index that was not updated by VCOL_UPDATE_FOR_READ
    - max_row_length() calculated length of NULL and not
      used fields. This didn't cause any crash, but used
      more memory than needed.
    4cd2a0eb
table.cc 249 KB