1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-32589 FULL_NODUP mode for binlog_row_image

This patch provides a new mode FULL_NODUP to binlog_row_image system
variable. With FULL_NODUP mode, all columns are included in before
image, but only updated columns are included in after image for UPDATE.
While all columns are included in the after image for INSERT.

FULL_NODUP is for replacing FULL mode. It includes all data of
the before and after image as FULL mode, but it uses less storage
especially in the case that only a few columns are updated.

Note: It will binlog full before and after image for all modes if the
      table has no primary key. FULL_NODUP follows the behavior.
This commit is contained in:
Libing Song
2023-10-26 17:24:22 +08:00
committed by Andrew Hutchings
parent 6218b5f7cb
commit a119c5f998
20 changed files with 14325 additions and 18 deletions

View File

@ -122,15 +122,17 @@ The following specify which files/extra groups are read (specified before remain
size if possible. The value has to be a multiple of 256.
--binlog-row-image=name
Controls whether rows should be logged in 'FULL',
'NOBLOB' or 'MINIMAL' formats. 'FULL', means that all
columns in the before and after image are logged.
'NOBLOB', means that mysqld avoids logging blob columns
whenever possible (eg, blob column was not changed or is
not part of primary key). 'MINIMAL', means that a PK
equivalent (PK columns or full row if there is no PK in
the table) is logged in the before image, and only
changed columns are logged in the after image. (Default:
FULL).
'FULL_NODUP', 'NOBLOB' or 'MINIMAL' formats. 'FULL',
means that all columns in the before and after image are
logged. 'FULL_NODUP', means that all columns are logged
in before image, but only changed columns or all columns
of inserted record are logged in after image, 'NOBLOB',
means that mysqld avoids logging blob columns whenever
possible (eg, blob column was not changed or is not part
of primary key). 'MINIMAL', means that a PK equivalent
(PK columns or full row if there is no PK in the table)
is logged in the before image, and only changed columns
are logged in the after image. (Default: FULL).
--binlog-row-metadata=name
Controls whether metadata is logged using FULL , MINIMAL
format and NO_LOG.FULL causes all metadata to be logged;