Skip to content

Conversation

@dsugisawa-mixi
Copy link

This PR adds support for MySQL binlog replication.

Changes:

  • Add trilogy_binlog_dump() and trilogy_binlog_dump_recv() functions
  • Add an example program (example/trilogy_binlog) demonstrating binlog replication
  • (Example) Parse FORMAT_DESCRIPTION_EVENT, TABLE_MAP_EVENT, and WRITE_ROWS_EVENT
  • (Example) Add SIGINT handler for graceful shutdown

The example connects to a MySQL server and streams binlog events, printing row data as they are received.

Testing Note

This change introduces COM_BINLOG_DUMP support and requires a MySQL server with replication enabled (--log-bin, --server-id, etc.) for end-to-end validation.
Since Trilogy's current test suite does not spin up such an environment, unit-level tests are omitted.
The implementation has been verified in production systems for over a year without issues.

- Add trilogy_binlog_dump() and trilogy_binlog_dump_recv() functions
- Add function header comments for binlog functions
- Add SIGINT handler for graceful shutdown in example
- Update Makefile to build example/trilogy_binlog
- Add test/binlog_test.c for basic binlog functionality testing
- Register binlog_test suite in test/runner.c
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

Successfully merging this pull request may close these issues.

1 participant