2019-01-23 12:30:00 +01:00
|
|
|
connection node_2;
|
|
|
|
connection node_1;
|
2018-11-22 09:16:58 +01:00
|
|
|
connection node_1;
|
|
|
|
connection node_2;
|
2018-09-28 16:35:28 +02:00
|
|
|
Performing State Transfer on a server that has been temporarily disconnected
|
2018-11-22 09:16:58 +01:00
|
|
|
connection node_1;
|
2018-09-28 16:35:28 +02:00
|
|
|
CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
|
|
|
|
SET AUTOCOMMIT=OFF;
|
|
|
|
START TRANSACTION;
|
|
|
|
INSERT INTO t1 VALUES ('node1_committed_before');
|
|
|
|
INSERT INTO t1 VALUES ('node1_committed_before');
|
|
|
|
INSERT INTO t1 VALUES ('node1_committed_before');
|
|
|
|
INSERT INTO t1 VALUES ('node1_committed_before');
|
|
|
|
INSERT INTO t1 VALUES ('node1_committed_before');
|
|
|
|
COMMIT;
|
2018-11-22 09:16:58 +01:00
|
|
|
connection node_2;
|
2018-09-28 16:35:28 +02:00
|
|
|
SET AUTOCOMMIT=OFF;
|
|
|
|
START TRANSACTION;
|
|
|
|
INSERT INTO t1 VALUES ('node2_committed_before');
|
|
|
|
INSERT INTO t1 VALUES ('node2_committed_before');
|
|
|
|
INSERT INTO t1 VALUES ('node2_committed_before');
|
|
|
|
INSERT INTO t1 VALUES ('node2_committed_before');
|
|
|
|
INSERT INTO t1 VALUES ('node2_committed_before');
|
|
|
|
COMMIT;
|
|
|
|
Unloading wsrep provider ...
|
|
|
|
SET GLOBAL wsrep_provider = 'none';
|
2018-11-22 09:16:58 +01:00
|
|
|
connection node_1;
|
2018-09-28 16:35:28 +02:00
|
|
|
SET AUTOCOMMIT=OFF;
|
|
|
|
START TRANSACTION;
|
|
|
|
INSERT INTO t1 VALUES ('node1_committed_during');
|
|
|
|
INSERT INTO t1 VALUES ('node1_committed_during');
|
|
|
|
INSERT INTO t1 VALUES ('node1_committed_during');
|
|
|
|
INSERT INTO t1 VALUES ('node1_committed_during');
|
|
|
|
INSERT INTO t1 VALUES ('node1_committed_during');
|
|
|
|
COMMIT;
|
|
|
|
START TRANSACTION;
|
|
|
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
|
|
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
|
|
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
|
|
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
|
|
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
2018-11-22 09:16:58 +01:00
|
|
|
connect node_1a_galera_st_disconnect_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
2018-09-28 16:35:28 +02:00
|
|
|
SET AUTOCOMMIT=OFF;
|
|
|
|
START TRANSACTION;
|
|
|
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
|
|
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
|
|
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
|
|
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
|
|
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
2018-11-22 09:16:58 +01:00
|
|
|
connection node_2;
|
2018-09-28 16:35:28 +02:00
|
|
|
Loading wsrep provider ...
|
2019-01-23 12:30:00 +01:00
|
|
|
disconnect node_2;
|
|
|
|
connect node_2, 127.0.0.1, root, , test, $NODE_MYPORT_2;
|
|
|
|
connection node_2;
|
2018-09-28 16:35:28 +02:00
|
|
|
SET AUTOCOMMIT=OFF;
|
|
|
|
START TRANSACTION;
|
|
|
|
INSERT INTO t1 VALUES ('node2_committed_after');
|
|
|
|
INSERT INTO t1 VALUES ('node2_committed_after');
|
|
|
|
INSERT INTO t1 VALUES ('node2_committed_after');
|
|
|
|
INSERT INTO t1 VALUES ('node2_committed_after');
|
|
|
|
INSERT INTO t1 VALUES ('node2_committed_after');
|
|
|
|
COMMIT;
|
2018-11-22 09:16:58 +01:00
|
|
|
connection node_1;
|
2018-09-28 16:35:28 +02:00
|
|
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
|
|
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
|
|
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
|
|
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
|
|
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
|
|
|
COMMIT;
|
|
|
|
SET AUTOCOMMIT=OFF;
|
|
|
|
START TRANSACTION;
|
|
|
|
INSERT INTO t1 VALUES ('node1_committed_after');
|
|
|
|
INSERT INTO t1 VALUES ('node1_committed_after');
|
|
|
|
INSERT INTO t1 VALUES ('node1_committed_after');
|
|
|
|
INSERT INTO t1 VALUES ('node1_committed_after');
|
|
|
|
INSERT INTO t1 VALUES ('node1_committed_after');
|
|
|
|
COMMIT;
|
2018-11-22 09:16:58 +01:00
|
|
|
connection node_1a_galera_st_disconnect_slave;
|
2018-09-28 16:35:28 +02:00
|
|
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
|
|
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
|
|
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
|
|
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
|
|
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
|
|
|
ROLLBACK;
|
|
|
|
SELECT COUNT(*) = 35 FROM t1;
|
|
|
|
COUNT(*) = 35
|
|
|
|
1
|
|
|
|
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
|
|
|
|
COUNT(*) = 0
|
|
|
|
1
|
|
|
|
COMMIT;
|
|
|
|
SET AUTOCOMMIT=ON;
|
2018-11-22 09:16:58 +01:00
|
|
|
connection node_1;
|
2018-09-28 16:35:28 +02:00
|
|
|
SELECT COUNT(*) = 35 FROM t1;
|
|
|
|
COUNT(*) = 35
|
|
|
|
1
|
|
|
|
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
|
|
|
|
COUNT(*) = 0
|
|
|
|
1
|
|
|
|
DROP TABLE t1;
|
|
|
|
COMMIT;
|
|
|
|
SET AUTOCOMMIT=ON;
|
|
|
|
Performing State Transfer on a server that has been shut down cleanly and restarted
|
2018-11-22 09:16:58 +01:00
|
|
|
connection node_1;
|
2018-09-28 16:35:28 +02:00
|
|
|
CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
|
|
|
|
SET AUTOCOMMIT=OFF;
|
|
|
|
START TRANSACTION;
|
|
|
|
INSERT INTO t1 VALUES ('node1_committed_before');
|
|
|
|
INSERT INTO t1 VALUES ('node1_committed_before');
|
|
|
|
INSERT INTO t1 VALUES ('node1_committed_before');
|
|
|
|
INSERT INTO t1 VALUES ('node1_committed_before');
|
|
|
|
INSERT INTO t1 VALUES ('node1_committed_before');
|
|
|
|
COMMIT;
|
2018-11-22 09:16:58 +01:00
|
|
|
connection node_2;
|
2018-09-28 16:35:28 +02:00
|
|
|
SET AUTOCOMMIT=OFF;
|
|
|
|
START TRANSACTION;
|
|
|
|
INSERT INTO t1 VALUES ('node2_committed_before');
|
|
|
|
INSERT INTO t1 VALUES ('node2_committed_before');
|
|
|
|
INSERT INTO t1 VALUES ('node2_committed_before');
|
|
|
|
INSERT INTO t1 VALUES ('node2_committed_before');
|
|
|
|
INSERT INTO t1 VALUES ('node2_committed_before');
|
|
|
|
COMMIT;
|
|
|
|
Shutting down server ...
|
2018-11-22 09:16:58 +01:00
|
|
|
connection node_1;
|
2018-09-28 16:35:28 +02:00
|
|
|
SET AUTOCOMMIT=OFF;
|
|
|
|
START TRANSACTION;
|
|
|
|
INSERT INTO t1 VALUES ('node1_committed_during');
|
|
|
|
INSERT INTO t1 VALUES ('node1_committed_during');
|
|
|
|
INSERT INTO t1 VALUES ('node1_committed_during');
|
|
|
|
INSERT INTO t1 VALUES ('node1_committed_during');
|
|
|
|
INSERT INTO t1 VALUES ('node1_committed_during');
|
|
|
|
COMMIT;
|
|
|
|
START TRANSACTION;
|
|
|
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
|
|
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
|
|
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
|
|
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
|
|
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
2018-11-22 09:16:58 +01:00
|
|
|
connect node_1a_galera_st_shutdown_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
2018-09-28 16:35:28 +02:00
|
|
|
SET AUTOCOMMIT=OFF;
|
|
|
|
START TRANSACTION;
|
|
|
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
|
|
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
|
|
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
|
|
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
|
|
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
2018-11-22 09:16:58 +01:00
|
|
|
connection node_2;
|
2018-09-28 16:35:28 +02:00
|
|
|
Starting server ...
|
|
|
|
SET AUTOCOMMIT=OFF;
|
|
|
|
START TRANSACTION;
|
|
|
|
INSERT INTO t1 VALUES ('node2_committed_after');
|
|
|
|
INSERT INTO t1 VALUES ('node2_committed_after');
|
|
|
|
INSERT INTO t1 VALUES ('node2_committed_after');
|
|
|
|
INSERT INTO t1 VALUES ('node2_committed_after');
|
|
|
|
INSERT INTO t1 VALUES ('node2_committed_after');
|
|
|
|
COMMIT;
|
2018-11-22 09:16:58 +01:00
|
|
|
connection node_1;
|
2018-09-28 16:35:28 +02:00
|
|
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
|
|
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
|
|
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
|
|
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
|
|
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
|
|
|
COMMIT;
|
|
|
|
SET AUTOCOMMIT=OFF;
|
|
|
|
START TRANSACTION;
|
|
|
|
INSERT INTO t1 VALUES ('node1_committed_after');
|
|
|
|
INSERT INTO t1 VALUES ('node1_committed_after');
|
|
|
|
INSERT INTO t1 VALUES ('node1_committed_after');
|
|
|
|
INSERT INTO t1 VALUES ('node1_committed_after');
|
|
|
|
INSERT INTO t1 VALUES ('node1_committed_after');
|
|
|
|
COMMIT;
|
2018-11-22 09:16:58 +01:00
|
|
|
connection node_1a_galera_st_shutdown_slave;
|
2018-09-28 16:35:28 +02:00
|
|
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
|
|
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
|
|
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
|
|
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
|
|
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
|
|
|
ROLLBACK;
|
|
|
|
SELECT COUNT(*) = 35 FROM t1;
|
|
|
|
COUNT(*) = 35
|
|
|
|
1
|
|
|
|
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
|
|
|
|
COUNT(*) = 0
|
|
|
|
1
|
|
|
|
COMMIT;
|
|
|
|
SET AUTOCOMMIT=ON;
|
2018-11-22 09:16:58 +01:00
|
|
|
connection node_1;
|
2018-09-28 16:35:28 +02:00
|
|
|
SELECT COUNT(*) = 35 FROM t1;
|
|
|
|
COUNT(*) = 35
|
|
|
|
1
|
|
|
|
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
|
|
|
|
COUNT(*) = 0
|
|
|
|
1
|
|
|
|
DROP TABLE t1;
|
|
|
|
COMMIT;
|
|
|
|
SET AUTOCOMMIT=ON;
|
|
|
|
Performing State Transfer on a server that has been killed and restarted
|
2018-11-22 09:16:58 +01:00
|
|
|
connection node_1;
|
2018-09-28 16:35:28 +02:00
|
|
|
CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
|
|
|
|
SET AUTOCOMMIT=OFF;
|
|
|
|
START TRANSACTION;
|
|
|
|
INSERT INTO t1 VALUES ('node1_committed_before');
|
|
|
|
INSERT INTO t1 VALUES ('node1_committed_before');
|
|
|
|
INSERT INTO t1 VALUES ('node1_committed_before');
|
|
|
|
INSERT INTO t1 VALUES ('node1_committed_before');
|
|
|
|
INSERT INTO t1 VALUES ('node1_committed_before');
|
|
|
|
COMMIT;
|
2018-11-22 09:16:58 +01:00
|
|
|
connection node_2;
|
2018-09-28 16:35:28 +02:00
|
|
|
SET AUTOCOMMIT=OFF;
|
|
|
|
START TRANSACTION;
|
|
|
|
INSERT INTO t1 VALUES ('node2_committed_before');
|
|
|
|
INSERT INTO t1 VALUES ('node2_committed_before');
|
|
|
|
INSERT INTO t1 VALUES ('node2_committed_before');
|
|
|
|
INSERT INTO t1 VALUES ('node2_committed_before');
|
|
|
|
INSERT INTO t1 VALUES ('node2_committed_before');
|
|
|
|
COMMIT;
|
|
|
|
Killing server ...
|
2018-11-22 09:16:58 +01:00
|
|
|
connection node_1;
|
2018-09-28 16:35:28 +02:00
|
|
|
SET AUTOCOMMIT=OFF;
|
|
|
|
START TRANSACTION;
|
|
|
|
INSERT INTO t1 VALUES ('node1_committed_during');
|
|
|
|
INSERT INTO t1 VALUES ('node1_committed_during');
|
|
|
|
INSERT INTO t1 VALUES ('node1_committed_during');
|
|
|
|
INSERT INTO t1 VALUES ('node1_committed_during');
|
|
|
|
INSERT INTO t1 VALUES ('node1_committed_during');
|
|
|
|
COMMIT;
|
|
|
|
START TRANSACTION;
|
|
|
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
|
|
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
|
|
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
|
|
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
|
|
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
2018-11-22 09:16:58 +01:00
|
|
|
connect node_1a_galera_st_kill_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
2018-09-28 16:35:28 +02:00
|
|
|
SET AUTOCOMMIT=OFF;
|
|
|
|
START TRANSACTION;
|
|
|
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
|
|
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
|
|
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
|
|
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
|
|
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
2018-11-22 09:16:58 +01:00
|
|
|
connection node_2;
|
2018-09-28 16:35:28 +02:00
|
|
|
Performing --wsrep-recover ...
|
|
|
|
Starting server ...
|
|
|
|
Using --wsrep-start-position when starting mysqld ...
|
|
|
|
SET AUTOCOMMIT=OFF;
|
|
|
|
START TRANSACTION;
|
|
|
|
INSERT INTO t1 VALUES ('node2_committed_after');
|
|
|
|
INSERT INTO t1 VALUES ('node2_committed_after');
|
|
|
|
INSERT INTO t1 VALUES ('node2_committed_after');
|
|
|
|
INSERT INTO t1 VALUES ('node2_committed_after');
|
|
|
|
INSERT INTO t1 VALUES ('node2_committed_after');
|
|
|
|
COMMIT;
|
2018-11-22 09:16:58 +01:00
|
|
|
connection node_1;
|
2018-09-28 16:35:28 +02:00
|
|
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
|
|
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
|
|
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
|
|
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
|
|
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
|
|
|
COMMIT;
|
|
|
|
SET AUTOCOMMIT=OFF;
|
|
|
|
START TRANSACTION;
|
|
|
|
INSERT INTO t1 VALUES ('node1_committed_after');
|
|
|
|
INSERT INTO t1 VALUES ('node1_committed_after');
|
|
|
|
INSERT INTO t1 VALUES ('node1_committed_after');
|
|
|
|
INSERT INTO t1 VALUES ('node1_committed_after');
|
|
|
|
INSERT INTO t1 VALUES ('node1_committed_after');
|
|
|
|
COMMIT;
|
2018-11-22 09:16:58 +01:00
|
|
|
connection node_1a_galera_st_kill_slave;
|
2018-09-28 16:35:28 +02:00
|
|
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
|
|
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
|
|
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
|
|
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
|
|
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
|
|
|
ROLLBACK;
|
|
|
|
SELECT COUNT(*) = 35 FROM t1;
|
|
|
|
COUNT(*) = 35
|
|
|
|
1
|
|
|
|
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
|
|
|
|
COUNT(*) = 0
|
|
|
|
1
|
|
|
|
COMMIT;
|
|
|
|
SET AUTOCOMMIT=ON;
|
2018-11-22 09:16:58 +01:00
|
|
|
connection node_1;
|
2018-09-28 16:35:28 +02:00
|
|
|
SELECT COUNT(*) = 35 FROM t1;
|
|
|
|
COUNT(*) = 35
|
|
|
|
1
|
|
|
|
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
|
|
|
|
COUNT(*) = 0
|
|
|
|
1
|
|
|
|
DROP TABLE t1;
|
|
|
|
COMMIT;
|
|
|
|
SET AUTOCOMMIT=ON;
|