Skip to main content

Overview

PropertyValue
Engine IDmariadb
Wire ProtocolMySQL wire protocol (shared with MySQL)
ClassifierAST-based (vitess/sqlparser) with MariaDB regex extensions
ShadowDocker mariadb:<version>
MariaDB is a thin adapter over the MySQL engine. It overrides three methods: ID(), Init() (passes mariadb engine name), and NewProxy() (enables RETURNING support for MariaDB 10.5+). Connection Parameters: Same as MySQL.
mori init --from "mysql://user:pass@host:3306/mydb"

Differences from MySQL

  • INSERT … RETURNING — MariaDB 10.5+ supports RETURNING on INSERT/DELETE. The proxy appends RETURNING pk_col1, pk_col2 to INSERTs sent to shadow, parses the result set for exact PKs, providing PostgreSQL-level delta tracking fidelity.
  • mariadb-dump — Uses mariadb-dump instead of mysqldump for schema dumps (MySQL’s mysqldump queries COLUMN_STATISTICS which MariaDB doesn’t support).
  • mariadb-admin — Uses mariadb-admin for container readiness checks (falls back to mysqladmin).
  • Container prefix — Shadow containers use mori-mariadb-shadow- prefix instead of mori-mysql-shadow-.
  • No only_full_group_by issue — MariaDB does not enable this SQL mode by default, avoiding the aggregate re-aggregation conflict that affects MySQL.
  • MariaDB-specific classification — Regex patterns added for INSERT/DELETE/REPLACE ... RETURNING, EXECUTE IMMEDIATE, and CREATE/DROP SEQUENCE.

Differences from PostgreSQL

Inherits all MySQL differences from PostgreSQL (no ctid, no cursors, no LISTEN/UNLISTEN, auto-increment offsets, etc.). See the MySQL engine page for the full list.

Known Limitations

  • Inherits all MySQL limitations
  • Vitess parser is hardcoded to MySQL 8.0.30 — MariaDB-specific syntax falls through to regex fallback which may be a little less accurate.