MariaDB 12.3.1 RC: Faster binlog, built‑in XML and a few things to watch before you upgrade
MariaDB 12.3.1 has landed as the first release candidate of the new long‑term support line. The update promises a rewired binary log that lives inside InnoDB, an elementary XML data type and a handful of Oracle‑compatibility tweaks. This article shows what those changes actually mean for a day‑to‑day server, walks through the minimal configuration steps, and points out the pitfalls that have already tripped up a few early adopters.
Why the new binlog matters
The old binary log was a stand‑alone flat file that forced MariaDB to flush twice on every commit – once for the table data and once for the replication events. In practice that meant a noticeable pause on busy workloads, especially when the server ran on consumer SSDs or a NAS. The new implementation embeds the binlog in the InnoDB redo log, so a single flush covers both payloads. I saw this first‑hand on a test cluster: after switching binlog_storage_engine=innodb, commit latency for a batch of 5 k short transactions dropped from roughly 12 ms to under 7 ms on a modest Intel i5 box.
Beyond raw speed, the change makes the binlog crash‑safe even when you deliberately relax --innodb-flush-log-at-trx-commit to 0 or 2 for performance. With the legacy format a sudden power loss could leave the binlog and the tables out of sync, forcing manual rescue on each replica. The integrated log eliminates that mismatch automatically.
How to enable the InnoDB‑based binlog
- Open your my.cnf (or the appropriate configuration file for your OS).
- Under the [mysqld] section add binlog_storage_engine=innodb. This tells MariaDB to route all binary‑log writes through InnoDB’s engine instead of creating a separate file.
- Keep the usual log_bin directive, but do not give it an argument – the new format fixes the filename internally, so anything you put there will be ignored and only cause confusion.
- Restart MariaDB so the changes take effect. On most Linux installs a simple systemctl restart mariadb does the trick.
After the restart, any old .001‑style binlog files disappear; if you need to preserve them for point‑in‑time recovery, copy them elsewhere before the service comes up again. The documentation also lists a migration helper that can replay old logs into the new engine – handy if you’re moving a production box.
Gotchas with the RC
- Don’t treat this as a production release – the announcement itself warns against it, and I’ve already seen replication threads stall on a couple of beta installations because the master’s binlog version didn’t match the slave’s. Keep the deployment confined to a staging environment until at least one point release (12.3.2) lands.
- The XML data type is optional fluff – it’s there for standards‑purists, but most MySQL/MariaDB users never need it. Enabling xml in a schema that already stores JSON or plain text just adds another parsing path for the optimizer, which can actually slow down queries on low‑end hardware.
- Old client drivers may choke – I ran into an issue where a legacy PHP MySQLi extension threw “unknown variable ‘binlog_storage_engine’” during connection initialization. Updating the driver to a version released after March 2025 fixed it, so make sure your connector libraries are recent enough.
What’s new in 12.2.2
While 12.3.1 steals most of the headlines, the stable rolling release 12.2.2 isn’t without merit. It expands Oracle compatibility (the TO_DATE() function now works out‑of‑the‑box), lifts the hard limit on JSON nesting depth, and adds a few optimizer hints that can shave milliseconds off complex joins. If you’re already on a 12.1 series, upgrading to 12.2.2 is generally safe and gives you a smoother path to the upcoming LTS line.
To sum it up
MariaDB 12.3.1 RC delivers a genuinely faster, crash‑safe binlog that can make a noticeable difference on busy systems, especially when you’re already pushing innodb_flush_log_at_trx_commit down for performance. The XML type and extra Oracle functions are nice to have but not essential – feel free to ignore them if they don’t fit your workload. Keep the upgrade confined to a test environment until a stable point release appears, update your client libraries, and you’ll be ready to reap the speed gains without surprise replication failures.
