Details
-
Bug
-
Status: Stalled (View Workflow)
-
Critical
-
Resolution: Unresolved
-
N/A
-
None
-
Can result in unexpected behaviour
-
Q1/2026 Server Development
Description
--source include/master-slave.inc
|
--source include/have_innodb.inc
|
--source include/have_binlog_format_statement.inc
|
|
|
CREATE TABLE t (c INT) ENGINE=InnoDB; |
CREATE GLOBAL TEMPORARY TABLE gtt (c INT) ENGINE=InnoDB ON COMMIT PRESERVE ROWS; |
|
|
CREATE TRIGGER tr AFTER INSERT ON t FOR EACH ROW INSERT INTO gtt VALUES (NEW.c); |
|
|
# SBR Incompatibility
|
# Expected: Successful INSERT (forcing ROW-based for the GTT part). |
# Actual: Fails with ER_BINLOG_STMT_MODE_AND_ROW_ENGINE (1665). |
INSERT INTO t VALUES (1); |
|
|
--connection master
|
TRUNCATE TABLE gtt; |
DROP TABLE t, gtt; |
--source include/rpl_end.inc |
Leads to:
|
MDEV-35915-v11 CS 12.2.0 8934bac9ea05b79f7a5109d9e980cb939a24d4e3 (Debug, Clang 21.1.3-20250923) Build 19/01/2026 |
mysqltest: At line 13: query 'INSERT INTO t VALUES (1)' failed: ER_BINLOG_STMT_MODE_AND_ROW_ENGINE (1665): Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = STATEMENT and at least one table uses a storage engine limited to row-based logging.
|
An operation that should be safe in SBR (INSERT INTO t1) crashes because the dependency (the GTT inside the trigger) forces a requirement (ROW format) that the cannot be satisfied.
Attachments
Issue Links
- is caused by
-
MDEV-35915 Implement Global temporary tables
-
- Stalled
-
- relates to
-
MDEV-38638 GTT: SBR and MBR fall back to ROW events for all DML using GTT and base tables + binlog Bloat
-
- Confirmed
-