3082
MariaDBWARNINGNotableReplicationHIGH confidence
Unsafe binlog statement: mixed engines with self-logging engine
Production Risk
Medium — replication may diverge on replicas.
What this means
A statement modifies tables in multiple storage engines where at least one engine performs its own logging, making the statement unsafe for statement-based replication.
Why it happens
- 1DML touching both InnoDB and a self-logging engine (e.g., NDB) in the same statement.
How to reproduce
trigger — this will error
trigger — this will error
INSERT INTO innodb_table SELECT * FROM ndb_table;
expected output
Warning (Code 3082): Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table and a transactional table in a single statement with a self-logging engine.
Fix
Switch to ROW binlog format
Switch to ROW binlog format
SET GLOBAL binlog_format = 'ROW';
Why this works
ROW format replicates actual row changes rather than statements, avoiding non-determinism.
What not to do
✕
Sources
Official documentation ↗
MySQL 8.0 — 3082 ER_BINLOG_UNSAFE_MULTIPLE_ENGINES_AND_SELF_LOGGING_ENGINE2
Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev