Skip to content
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

the update event can't resolve fields name? #54

Closed
biuabiu opened this issue Aug 23, 2021 · 2 comments
Closed

the update event can't resolve fields name? #54

biuabiu opened this issue Aug 23, 2021 · 2 comments

Comments

@biuabiu
Copy link

biuabiu commented Aug 23, 2021

UpdateRowsEventData{tableId=119, includedColumnsBeforeUpdate={0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, includedColumns={0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, rows=[ {before=[xxx], after=[xxx]} ]}

@osheroff
Copy link
Owner

not a bug in binlog-connector-java, a mysql limitation. maxwell and debezium both have to go to ungodly lengths to get fields names.

@bluebike
Copy link

Note...
Older MySQL/MariaDB binlog doesn't contain information about field names.
MySQL 8.0+ and MariaDB 10.5+ have extended metadata which contain data like:

  • column names
  • column charset
  • signedness of number columns
  • enum/set values (those are transmitted as numbes in binary log)
  • primary key
  • ...

Library parses data data to TableMapEventMetaData structure.

https://dev.mysql.com/doc/refman/8.0/en/replication-options-binary-log.html#sysvar_binlog_row_metadata

https://github.com/osheroff/mysql-binlog-connector-java/blob/master/src/main/java/com/github/shyiko/mysql/binlog/event/TableMapEventMetadata.java

https://mariadb.com/kb/en/changes-improvements-in-mariadb-105/#binary-log-and-replication-more-metadata

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

3 participants