mirror of
https://github.com/MariaDB/server.git
synced 2026-02-22 02:28:39 +01:00
Implement an improved binlog implementation that is integrated into the storage engine. The new implementation is enabled with the --binlog-storage-engine option. Initially the InnoDB storage engine implements the binlog. Integrating the binlog in the storage engine improves performance, since it makes the InnoDB redo log the single source of truth and avoids the need for expensive two-phase commit between binlog and engine. It also makes it possible to disable durability (set --innodb-flush-log-at-trx-commit=0) to further improve performance, while still preserving the ability to recover the binlog and database into a consistent state after a crash. The new binlog implementation also greatly improves the internal design and implementation of the binlog, and enables future enhancements for replication. This is a squash of the original 11.4-based patch series. Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
23 lines
612 B
Text
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;
|