Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/MariaDB/mysql-test/suite/galera_sr/t/   (MariaDB Server Version 8.1-8.4©)  Datei vom 1.9.2026 mit Größe 1 kB image not shown  

Quelle  galera_sr_log_bin.test  Sprache: unbekannt

 
Spracherkennung für: .test vermutete Sprache: SQL {SQL[105] ABAP[69] Lisp[53]} [Methode: maximale Elemente, drei Dimensionen]

#
# Interleave SR and non-SR transactions and confirm that the binlog is in correct order
#

CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
CREATE TABLE t3 (f1 INTEGER) ENGINE=InnoDB;
CREATE TABLE t4 (f1 INTEGER) ENGINE=InnoDB;

--source include/galera_cluster.inc

SET SESSION wsrep_trx_fragment_size = 1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
INSERT INTO t1 VALUES (1);

--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
--connection node_1a
SET GLOBAL wsrep_on=OFF;
RESET MASTER;
SET GLOBAL wsrep_on=ON;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
INSERT INTO t2 VALUES (1);

--connection node_2
SET GLOBAL wsrep_on=OFF;
RESET MASTER;
SET GLOBAL wsrep_on=ON;
SET AUTOCOMMIT=OFF;
SET SESSION wsrep_trx_fragment_size = 1;
START TRANSACTION;
INSERT INTO t3 VALUES (1);

--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
--connection node_2a
SET AUTOCOMMIT=OFF;
START TRANSACTION;
INSERT INTO t4 VALUES (1);

--connection node_1
INSERT INTO t1 VALUES (2);
COMMIT;

--connection node_1a
INSERT INTO t2 VALUES (2);
COMMIT;

--connection node_2
INSERT INTO t3 VALUES (2);
COMMIT;
--connection node_2a
INSERT INTO t4 VALUES (2);
COMMIT;

--connection node_1
SELECT COUNT(*) = 2 FROM t4;

--source include/show_binlog_events.inc

--connection node_2
SELECT COUNT(*) = 2 FROM t4;

--source include/show_binlog_events.inc

DROP TABLE t1,t2,t3,t4;

[Dauer der Verarbeitung: 0.8 Sekunden]