1610
MySQLERRORNotableReplicationHIGH confidence

Statement cannot be logged: mixed row and statement engines

Production Risk

Medium — the statement fails; no data is written.

What this means

A statement mixes tables using storage engines that require different binary log formats (some need row-based, others use statement-based), making safe logging impossible.

Why it happens
  1. 1A single DML statement updates both InnoDB tables (requiring row-based logging) and non-transactional tables (using statement-based logging).
How to reproduce
trigger — this will error
trigger — this will error
INSERT INTO innodb_table SELECT * FROM myisam_table; -- in ROW binlog mode

expected output

ERROR 1610 (HY000): Cannot execute statement: impossible to write to the binary log since both row-incapable engines and statement-incapable engines are involved.

Fix 1

Use a single storage engine type

Use a single storage engine type
-- Convert all tables in the statement to InnoDB:
ALTER TABLE myisam_table ENGINE = InnoDB;

Why this works

Using a uniform storage engine eliminates binary log format conflicts.

Fix 2

Split the statement into separate operations

Split the statement into separate operations
-- Perform the MyISAM operation and InnoDB operation separately.

Why this works

Separating operations allows each to use the appropriate log format.

What not to do

Sources
Official documentation ↗

MySQL 8.0 — 1610 ER_BINLOG_ROW_ENGINE_AND_STMT_ENGINE

Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev

← All MySQL errors