Skip to content

Add MariaDB support via MySQL trigger source - #93

Merged
mumoshu merged 1 commit into
mainfrom
mariadb
Jul 1, 2026
Merged

Add MariaDB support via MySQL trigger source#93
mumoshu merged 1 commit into
mainfrom
mariadb

Conversation

@mumoshu

@mumoshu mumoshu commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

What is the motivation?

MariaDB is a common MySQL-compatible source; users should sync it with the same from mysql workflow.

What does this change do?

  • Documents MariaDB as supported (docs/mariadb.md)
  • Reuses the existing MySQL trigger source (mysql://, from mysql subcommands)
  • Adds MariaDB JSON handling where JSON is stored as LONGTEXT
  • Adds MariaDB e2e tests (full, incremental, interleaved snapshot)

What is your testing strategy?

  • make test
  • MariaDB container tests against mariadb:11 mirror existing MySQL scenarios

Is this related to any issues?

Closes #67

Have you read the Contributing Guidelines?

  • I have read the Contributing Guidelines

…andling, shared e2e helpers, and documentation.

Reuse the mysql-trigger-source pipeline with MariaDB-specific schema and type fixes, container test support, and full/incremental integration tests.
@mumoshu
mumoshu merged commit 6b2c403 into main Jul 1, 2026
9 checks passed
@mumoshu
mumoshu deleted the mariadb branch July 1, 2026 09:37
@nickchomey

nickchomey commented Jul 1, 2026

Copy link
Copy Markdown

I don't know if any of this is useful or relevant, but there's a nuance with mariadb CDC stuff on more recent versions of mariadb. It's described in this issue

conduitio-labs/conduit-connector-mysql#136

I ended up instigating a fix for the popular golang mysql CDC package. Perhaps some useful info there to double check what you have in rust.
go-mysql-org/go-mysql#893

@mumoshu

mumoshu commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

@nickchomey Thanks for the input! I think the link you kindly provided is to leverage MariaDB's own binlog.

Unlike the PostgreSQL source, our MySQL/MariaDB source supports only trigger-based mode today, so the natural next step would be to implement binlog-based modes for those. I'll refer to it when tackling it!

@nickchomey

Copy link
Copy Markdown

Oh, I wasn't aware that it was trigger based. Are you able to elaborate a bit on why? I have to figure there's already rust crates for binlog CDC

@mumoshu

mumoshu commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

Hey @nickchomey 👋

I got started with the trigger-based solution because it is more widely available than binlog, and I found no reliable crate for reading/decoding binlog.

Anyways, I've added binlog-based MariaDB/MySQL sources that do DBLog-like watermark-based snapshotting and reconciliation using our own binlog reader/decoder via #105. I believe it should now be the go-to option for syncing MySQL/MariaDB to SurrealDB.

I didn't pay much attention to making it reusable outside this project, but hopefully, it is good enough to serve as a reference.

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.

Documentation: Say whether you support Mariadb or not

2 participants