connection node_2;
connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
SET SESSION wsrep_on = FALSE;
INSERT INTO t1 VALUES (2);
connection node_2;
SELECT COUNT(*) = 1 FROM t1;
COUNT(*) = 1
1
connection node_1;
SET GLOBAL wsrep_on = TRUE;
INSERT INTO t1 VALUES (3);
connection node_2;
SELECT COUNT(*) = 2 FROM t1;
COUNT(*) = 2
1
SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 2;
COUNT(*) = 0
1
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 3;
COUNT(*) = 1
1
DROP TABLE t1;
connection node_1;
connection node_1;
START TRANSACTION;
SET SESSION wsrep_on=OFF;
ERROR 25000: You are not allowed to execute this command in a transaction
SET GLOBAL wsrep_on=OFF;
ERROR 25000: You are not allowed to execute this command in a transaction
COMMIT;
connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY);
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;
connection node_1;
SHOW SESSION VARIABLES LIKE 'wsrep_on';
Variable_name	Value
wsrep_on	ON
SHOW GLOBAL VARIABLES LIKE 'wsrep_on';
Variable_name	Value
wsrep_on	OFF
INSERT INTO t1 VALUES (2);
COMMIT;
connection node_2;
SET SESSION wsrep_sync_wait = 15;
SELECT * FROM t1;
f1
1
2
connection node_1a;
SET GLOBAL wsrep_on = ON;
DROP TABLE t1;
connection node_2;
connection node_1;
SET GLOBAL wsrep_on = OFF;
connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1;;
connection node_1b;
SHOW SESSION VARIABLES LIKE 'wsrep_on';
Variable_name	Value
wsrep_on	OFF
SHOW GLOBAL VARIABLES LIKE 'wsrep_on';
Variable_name	Value
wsrep_on	OFF
CREATE TABLE t2 (f1 INTEGER);
DROP TABLE t2;
SET GLOBAL wsrep_on = ON;
SHOW SESSION VARIABLES LIKE 'wsrep_on';
Variable_name	Value
wsrep_on	ON
disconnect node_1b;
connection node_2;
connection node_1;
SET GLOBAL wsrep_on = OFF;
SET SESSION wsrep_on = ON;
ERROR HY000: Can't enable @@session.wsrep_on, while @@global.wsrep_on is disabled
SET GLOBAL wsrep_on = ON;
SET SESSION wsrep_on = ON;
connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY);
SET GLOBAL wsrep_on = OFF;
connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1;;
connection node_1b;
SHOW SESSION VARIABLES LIKE 'wsrep_on';
Variable_name	Value
wsrep_on	OFF
SHOW GLOBAL VARIABLES LIKE 'wsrep_on';
Variable_name	Value
wsrep_on	OFF
SET GLOBAL wsrep_on = ON;
START TRANSACTION;
INSERT INTO t1 VALUES(1);
COMMIT;
SELECT * FROM t1;
f1
1
connection node_2;
SELECT * FROM t1;
f1
1
DROP TABLE t1;
connection node_1;
connection node_1;
SET SESSION wsrep_on = OFF;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY);
INSERT INTO t1 VALUES (1);
START TRANSACTION;
INSERT INTO t1 VALUES (2);
COMMIT;
DROP TABLE t1;
connection node_2;
SHOW TABLES;
Tables_in_test
connection node_1;
SET SESSION wsrep_on = ON;
SET GLOBAL wsrep_on = OFF;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY);
INSERT INTO t1 VALUES (1);
START TRANSACTION;
INSERT INTO t1 VALUES (2);
COMMIT;
connection node_2;
SHOW TABLES;
Tables_in_test
connection node_1;
DROP TABLE t1;
SET GLOBAL wsrep_on = ON;
connection node_2;
