Skip to content

Adds documentation for row-based replication flags #611

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 3, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions replication/row_event.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ type TableMapEvent struct {
NullBitmap []byte

/*
The followings are available only after MySQL-8.0.1 or MariaDB-10.5.0
The following are available only after MySQL-8.0.1 or MariaDB-10.5.0
By default MySQL and MariaDB do not log the full row metadata.
see:
- https://dev.mysql.com/doc/refman/8.0/en/replication-options-binary-log.html#sysvar_binlog_row_metadata
- https://mysqlhighavailability.com/more-metadata-is-written-into-binary-log/
- https://jira.mariadb.org/browse/MDEV-20477
- https://mariadb.com/kb/en/replication-and-binary-log-system-variables/#binlog_row_metadata
*/

// SignednessBitmap stores signedness info for numeric columns.
Expand Down Expand Up @@ -830,6 +830,16 @@ type RowsEvent struct {

//lenenc_int
ColumnCount uint64

/*
By default MySQL and MariaDB log the full row image.
see
- https://dev.mysql.com/doc/refman/8.0/en/replication-options-binary-log.html#sysvar_binlog_row_image
- https://mariadb.com/kb/en/replication-and-binary-log-system-variables/#binlog_row_image

ColumnBitmap1, ColumnBitmap2 and SkippedColumns are not set on the full row image.
*/

//len = (ColumnCount + 7) / 8
ColumnBitmap1 []byte

Expand Down