Skip to content

Why is the column name of the get table empty replication #514

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

Open
sidongsheng opened this issue Aug 13, 2020 · 4 comments
Open

Why is the column name of the get table empty replication #514

sidongsheng opened this issue Aug 13, 2020 · 4 comments

Comments

@sidongsheng
Copy link

=== TableMapEvent ===
Date: 2020-08-13 09:18:08
Log position: 566
Event size: 73
TableID: 108
TableID size: 6
Flags: 1
Schema: yitang
Table: yt_member
Column count: 9
Column type:
00000000 03 0f f6 f6 01 11 11 0f 03 |.........|
NULL bitmap:
00000000 f4 00 |..|
Signedness bitmap:
Default charset: []
Column charset: []
Set str value: []
Enum str value: []
Column name: []
Geometry type: []
Primary key: []
Primary key prefix: []
Enum/set default charset: []
Enum/set column charset: []
UnsignedMap: map[int]bool(nil)
CollationMap: map[int]uint64(nil)
EnumSetCollationMap: map[int]uint64(nil)
EnumStrValueMap: map[int][]string(nil)
SetStrValueMap: map[int][]string(nil)
GeometryTypeMap: map[int]uint64(nil)
mysql version: 5.7.30-log MySQL Community Server (GPL)

@Succy
Copy link

Succy commented Nov 26, 2020

Me too!Do you have any good solutions?

@IvoGoman
Copy link
Contributor

IvoGoman commented Aug 4, 2021

I just stumbled across the same issue and found out that by default both MariaDB and MySQL do not log the whole metadata for RowsEvents.
The full metadata including the ColumnNames has to be enabled see:
https://dev.mysql.com/doc/refman/8.0/en/replication-options-binary-log.html#sysvar_binlog_row_metadata
https://mariadb.com/kb/en/replication-and-binary-log-system-variables/#binlog_row_metadata

@atercattus
Copy link
Member

It would be nice to write about this in the documentation. PR welcome :)

@IvoGoman
Copy link
Contributor

I have opened #611 to add some documentation in the TableMapEvent, RowsEvent to describe the behavior of row-based logging with regard to binlog_row_metadata and binlog_row_image.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants