mariadb/mysql-test/suite/binlog/t/flashback.combinations
Libing Song 8bf9f21855 MDEV-32894 mysqlbinlog flashback support binlog_row_image FULL_NODUP mode
Summary
=======
With FULL_NODUP mode, before image inclues all columns and after
image inclues only the changed columns. flashback will swap the
value of changed columns from after image to before image.
For example:
  BI: c1, c2, c3_old, c4_old
  AI: c3_new, c4_new
flashback will reconstruct the before and after images to
  BI: c1, c2, c3_new, c4_new
  AI: c3_old, c4_old

Implementation
==============
When parsing the before and after image, position and length of
the fields are collected into ai_fields and bi_fields, if it is an
Update_rows_event and the after image doesn't includes all columns.

The changed fields are swapped between bi_fields and ai_fields.
Then it recreates the before image and after image by using
bi_fields and ai_fields. nullbit will be set to 1 if the
field is NULL, otherwise nullbit will be 0.

It also optimized flashback a little bit.
- calc_row_event_length is used instead of print_verbose_one_row
- swap_buff1 and swap_buff2 are removed.
2024-01-18 12:26:21 +00:00

4 lines
88 B
Text

[use_full_mode]
binlog_row_image=FULL
[use_full_nodup_mode]
binlog_row_image=FULL_NODUP