mariadb/mysql-test/suite/binlog_in_engine/online_alter.result
Kristian Nielsen 019b2e7ba6 Binlog-in-engine: Assertion on parallel online alter
The online alter feature registers an extra storage engine handlerton on
transactions concurrent with the ALTER. This storage engine looks like it is
2-phase commit capable (though it is not really, recover() is empty). This
caused the binlog code to attempt to do a cross-engine two-phase commit
transaction, and this code is not ready yet.

But the online alter storage engine does not modify any transaction data, it
is a read-online participant. Fix is to only consider read-write
participating transactions for switching to two-phase commit.

Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
2026-01-16 14:57:13 +01:00

23 lines
612 B
Text

CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1), (2), (3), (4), (5);
connect con1,localhost,root,,;
SET debug_sync= 'alter_table_online_downgraded SIGNAL ready WAIT_FOR cont';
ALTER TABLE t1 FORCE, ALGORITHM=COPY;
connection default;
SET debug_sync= 'now WAIT_FOR ready';
connect con2,localhost,root,,;
BEGIN;
INSERT INTO t1 VALUES (6);
connection default;
SET debug_sync= 'now SIGNAL cont';
connection con2;
INSERT INTO t1 VALUES (7);
COMMIT;
INSERT INTO t1 VALUES (8);
connection con1;
SET debug_sync= 'RESET';
connection con2;
SELECT COUNT(*) FROM t1;
COUNT(*)
8
DROP TABLE t1;