Commit 491f42d5 authored by Nirbhay Choubey's avatar Nirbhay Choubey

Fix/disable some failing galera tests.

parent 9b6bd3f1
...@@ -30,3 +30,9 @@ galera_gcs_fragment : Incorrect arguments to SET ...@@ -30,3 +30,9 @@ galera_gcs_fragment : Incorrect arguments to SET
galera_flush_local : Fails sporadically galera_flush_local : Fails sporadically
galera_binlog_stmt_autoinc : TODO: investigate galera_binlog_stmt_autoinc : TODO: investigate
galera_concurrent_ctas : Test times out, investigate galera_concurrent_ctas : Test times out, investigate
galera_var_innodb_disallow_writes : MDEV-11035
MW-286 : TODO: investigate
galera_sst_xtrabackup-v2-options : TODO: Fix test case
galera_sst_xtrabackup-v2 : MDEV-11208
galera_sst_xtrabackup-v2_encrypt_with_key : MDEV-11208
mysql-wsrep#33 : TODO: investigate
...@@ -32,4 +32,10 @@ if ($node_3) ...@@ -32,4 +32,10 @@ if ($node_3)
--connection $node_3 --connection $node_3
--eval SET @@global.auto_increment_offset = $auto_increment_offset_node_3; --eval SET @@global.auto_increment_offset = $auto_increment_offset_node_3;
} }
if ($node_4)
{
--connection $node_4
--eval SET @@global.auto_increment_offset = $auto_increment_offset_node_4;
}
--enable_query_log --enable_query_log
...@@ -13,6 +13,8 @@ ...@@ -13,6 +13,8 @@
# Connection handle for 2nd node # Connection handle for 2nd node
# $node_3 (optional) # $node_3 (optional)
# Connection handle for 3rd node # Connection handle for 3rd node
# $node_4 (optional)
# Connection handle for 4th node
if (!$node_1) if (!$node_1)
{ {
...@@ -35,3 +37,9 @@ if ($node_3) ...@@ -35,3 +37,9 @@ if ($node_3)
let $auto_increment_offset_node_3 = `SELECT @@global.auto_increment_offset`; let $auto_increment_offset_node_3 = `SELECT @@global.auto_increment_offset`;
} }
if ($node_4)
{
--connection $node_4
let $auto_increment_offset_node_4 = `SELECT @@global.auto_increment_offset`;
}
connection node_1;
CREATE TABLE t1 (f1 INTEGER); CREATE TABLE t1 (f1 INTEGER);
LOCK TABLE t1 WRITE; LOCK TABLE t1 WRITE;
value prior to RSU: value prior to RSU:
...@@ -7,12 +8,17 @@ wsrep_desync_count 0 ...@@ -7,12 +8,17 @@ wsrep_desync_count 0
SHOW VARIABLES LIKE 'wsrep_desync'; SHOW VARIABLES LIKE 'wsrep_desync';
Variable_name Value Variable_name Value
wsrep_desync OFF wsrep_desync OFF
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
connection node_1a;
SET SESSION wsrep_sync_wait = 0; SET SESSION wsrep_sync_wait = 0;
SET SESSION wsrep_osu_method = RSU; SET SESSION wsrep_osu_method = RSU;
ALTER TABLE t1 ADD COLUMN f2 INTEGER;; ALTER TABLE t1 ADD COLUMN f2 INTEGER;;
connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1;
connection node_1b;
SET SESSION wsrep_sync_wait = 0; SET SESSION wsrep_sync_wait = 0;
SET SESSION wsrep_osu_method = RSU; SET SESSION wsrep_osu_method = RSU;
ALTER TABLE t1 ADD COLUMN f3 INTEGER;; ALTER TABLE t1 ADD COLUMN f3 INTEGER;;
connection node_1;
value during RSU: value during RSU:
SHOW STATUS LIKE 'wsrep_desync_count'; SHOW STATUS LIKE 'wsrep_desync_count';
Variable_name Value Variable_name Value
...@@ -21,6 +27,9 @@ SHOW VARIABLES LIKE 'wsrep_desync'; ...@@ -21,6 +27,9 @@ SHOW VARIABLES LIKE 'wsrep_desync';
Variable_name Value Variable_name Value
wsrep_desync OFF wsrep_desync OFF
UNLOCK TABLES; UNLOCK TABLES;
connection node_1a;
connection node_1b;
connection node_1;
value after RSU: value after RSU:
SHOW STATUS LIKE 'wsrep_desync_count'; SHOW STATUS LIKE 'wsrep_desync_count';
Variable_name Value Variable_name Value
......
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1;
connection node_1;
CREATE TABLE t1 (f1 INTEGER) Engine=InnoDB; CREATE TABLE t1 (f1 INTEGER) Engine=InnoDB;
SET GLOBAL wsrep_desync=0; SET GLOBAL wsrep_desync=0;
Warnings: Warnings:
...@@ -5,8 +8,12 @@ Warning 1231 'wsrep_desync' is already OFF. ...@@ -5,8 +8,12 @@ Warning 1231 'wsrep_desync' is already OFF.
SET wsrep_OSU_method=RSU; SET wsrep_OSU_method=RSU;
SET DEBUG_SYNC = 'alter_table_before_open_tables WAIT_FOR continue'; SET DEBUG_SYNC = 'alter_table_before_open_tables WAIT_FOR continue';
ALTER TABLE t1 ADD COLUMN f2 INTEGER;; ALTER TABLE t1 ADD COLUMN f2 INTEGER;;
connection node_1a;
SET GLOBAL wsrep_desync=1;; SET GLOBAL wsrep_desync=1;;
connection node_1b;
SET DEBUG_SYNC= 'now SIGNAL continue'; SET DEBUG_SYNC= 'now SIGNAL continue';
DROP TABLE t1; DROP TABLE t1;
SET GLOBAL wsrep_desync=0; SET GLOBAL wsrep_desync=0;
connection node_1;
connection node_1a;
SET DEBUG_SYNC= 'RESET'; SET DEBUG_SYNC= 'RESET';
connection node_2;
connection node_1;
SET SESSION wsrep_sync_wait = 0; SET SESSION wsrep_sync_wait = 0;
SET SESSION wsrep_on = OFF; SET SESSION wsrep_on = OFF;
connection node_2;
connection node_1;
SET SESSION wsrep_on = ON; SET SESSION wsrep_on = ON;
connection node_1;
CALL mtr.add_suppression("Failed to set packet size"); CALL mtr.add_suppression("Failed to set packet size");
connection node_2;
CALL mtr.add_suppression("Failed to set packet size"); CALL mtr.add_suppression("Failed to set packet size");
connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB; CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
CREATE PROCEDURE p1 () CREATE PROCEDURE p1 ()
BEGIN BEGIN
...@@ -9,12 +10,21 @@ COMMIT; ...@@ -9,12 +10,21 @@ COMMIT;
END WHILE; END WHILE;
END| END|
CALL p1();; CALL p1();;
connection node_2;
CALL p1();; CALL p1();;
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
connection node_2a;
Killing server ... Killing server ...
INSERT INTO t1 VALUES (DEFAULT); INSERT INTO t1 VALUES (DEFAULT);
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
connection node_1a;
INSERT INTO t1 VALUES (DEFAULT); INSERT INTO t1 VALUES (DEFAULT);
connection node_1;
Got one of the listed errors Got one of the listed errors
connection node_2;
Got one of the listed errors Got one of the listed errors
connection node_1a;
connection node_2a;
count_equal count_equal
1 1
CALL mtr.add_suppression("WSREP: Action message in non-primary configuration from member 0"); CALL mtr.add_suppression("WSREP: Action message in non-primary configuration from member 0");
...@@ -24,6 +34,7 @@ VARIABLE_VALUE ...@@ -24,6 +34,7 @@ VARIABLE_VALUE
SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE = 2 VARIABLE_VALUE = 2
1 1
connection node_1a;
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE VARIABLE_VALUE
2 2
......
...@@ -2,6 +2,7 @@ CREATE TABLE ten (f1 INTEGER); ...@@ -2,6 +2,7 @@ CREATE TABLE ten (f1 INTEGER);
INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
CREATE TABLE t1 (f1 VARCHAR(1000)); CREATE TABLE t1 (f1 VARCHAR(1000));
INSERT INTO t1 SELECT REPEAT('x', 1000) FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4; INSERT INTO t1 SELECT REPEAT('x', 1000) FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4;
connection node_2;
SELECT COUNT(*) = 10000 FROM t1; SELECT COUNT(*) = 10000 FROM t1;
COUNT(*) = 10000 COUNT(*) = 10000
1 1
......
CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB; CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
connection node_1;
CREATE TABLE t1 (f1 INT PRIMARY KEY AUTO_INCREMENT, f2 VARCHAR(100), FULLTEXT (f2)) ENGINE=InnoDB; CREATE TABLE t1 (f1 INT PRIMARY KEY AUTO_INCREMENT, f2 VARCHAR(100), FULLTEXT (f2)) ENGINE=InnoDB;
connection node_2;
SELECT COUNT(*) = 13 FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE name LIKE 'test/%'; SELECT COUNT(*) = 13 FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE name LIKE 'test/%';
COUNT(*) = 13 COUNT(*) = 13
1 1
connection node_1;
INSERT INTO t1 (f2) SELECT 'foobarbaz' FROM ten AS a1, ten AS a2, ten AS a3; INSERT INTO t1 (f2) SELECT 'foobarbaz' FROM ten AS a1, ten AS a2, ten AS a3;
connection node_2;
SELECT COUNT(f2) = 1000 FROM t1 WHERE MATCH(f2) AGAINST ('foobarbaz'); SELECT COUNT(f2) = 1000 FROM t1 WHERE MATCH(f2) AGAINST ('foobarbaz');
COUNT(f2) = 1000 COUNT(f2) = 1000
1 1
UPDATE t1 SET f2 = 'abcdefjhk'; UPDATE t1 SET f2 = 'abcdefjhk';
connection node_1;
SELECT COUNT(f2) = 1000 FROM t1 WHERE MATCH(f2) AGAINST ('abcdefjhk'); SELECT COUNT(f2) = 1000 FROM t1 WHERE MATCH(f2) AGAINST ('abcdefjhk');
COUNT(f2) = 1000 COUNT(f2) = 1000
1 1
connection node_2;
DROP TABLE t1; DROP TABLE t1;
connection node_1;
CREATE TABLE t1 (f1 VARCHAR(100), FULLTEXT (f1)) ENGINE=InnoDB; CREATE TABLE t1 (f1 VARCHAR(100), FULLTEXT (f1)) ENGINE=InnoDB;
connection node_2;
INSERT INTO t1 (f1) SELECT 'foobarbaz' FROM ten AS a1, ten AS a2, ten AS a3; INSERT INTO t1 (f1) SELECT 'foobarbaz' FROM ten AS a1, ten AS a2, ten AS a3;
connection node_1;
SELECT COUNT(f1) = 1000 FROM t1 WHERE MATCH(f1) AGAINST ('foobarbaz'); SELECT COUNT(f1) = 1000 FROM t1 WHERE MATCH(f1) AGAINST ('foobarbaz');
COUNT(f1) = 1000 COUNT(f1) = 1000
1 1
UPDATE t1 SET f1 = 'abcdefjhk'; UPDATE t1 SET f1 = 'abcdefjhk';
connection node_2;
SELECT COUNT(f1) = 1000 FROM t1 WHERE MATCH(f1) AGAINST ('abcdefjhk'); SELECT COUNT(f1) = 1000 FROM t1 WHERE MATCH(f1) AGAINST ('abcdefjhk');
COUNT(f1) = 1000 COUNT(f1) = 1000
1 1
......
...@@ -4,6 +4,7 @@ CREATE TABLE t1 (f1 INT PRIMARY KEY AUTO_INCREMENT, f2 INTEGER) ENGINE=InnoDB; ...@@ -4,6 +4,7 @@ CREATE TABLE t1 (f1 INT PRIMARY KEY AUTO_INCREMENT, f2 INTEGER) ENGINE=InnoDB;
CREATE TABLE t2 (f1 VARCHAR(512) UNIQUE) ENGINE=InnoDB; CREATE TABLE t2 (f1 VARCHAR(512) UNIQUE) ENGINE=InnoDB;
INSERT INTO t1 (f2) SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4; INSERT INTO t1 (f2) SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4;
INSERT INTO t2 VALUES (REPEAT('x', 512)); INSERT INTO t2 VALUES (REPEAT('x', 512));
connection node_2;
SELECT COUNT(*) = 10000 FROM t1; SELECT COUNT(*) = 10000 FROM t1;
COUNT(*) = 10000 COUNT(*) = 10000
1 1
......
connection node_1;
SELECT @@wsrep_provider_options LIKE '%ist.recv_bind = 127.0.0.1%'; SELECT @@wsrep_provider_options LIKE '%ist.recv_bind = 127.0.0.1%';
@@wsrep_provider_options LIKE '%ist.recv_bind = 127.0.0.1%' @@wsrep_provider_options LIKE '%ist.recv_bind = 127.0.0.1%'
1 1
connection node_2;
SELECT @@wsrep_provider_options LIKE '%ist.recv_bind = 127.0.0.1%'; SELECT @@wsrep_provider_options LIKE '%ist.recv_bind = 127.0.0.1%';
@@wsrep_provider_options LIKE '%ist.recv_bind = 127.0.0.1%' @@wsrep_provider_options LIKE '%ist.recv_bind = 127.0.0.1%'
1 1
SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 1'; SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 1';
connection node_1;
connection node_2;
SET SESSION wsrep_on = OFF; SET SESSION wsrep_on = OFF;
SET SESSION wsrep_on = ON; SET SESSION wsrep_on = ON;
connection node_1;
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1); INSERT INTO t1 VALUES (1);
connection node_2;
SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 0'; SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 0';
connection node_1;
connection node_2;
DROP TABLE t1; DROP TABLE t1;
Performing State Transfer on a server that has been temporarily disconnected Performing State Transfer on a server that has been temporarily disconnected
connection node_1;
CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB; CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF; SET AUTOCOMMIT=OFF;
START TRANSACTION; START TRANSACTION;
...@@ -8,6 +9,7 @@ INSERT INTO t1 VALUES ('node1_committed_before'); ...@@ -8,6 +9,7 @@ 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; COMMIT;
connection node_2;
SET AUTOCOMMIT=OFF; SET AUTOCOMMIT=OFF;
START TRANSACTION; START TRANSACTION;
INSERT INTO t1 VALUES ('node2_committed_before'); INSERT INTO t1 VALUES ('node2_committed_before');
...@@ -18,6 +20,7 @@ INSERT INTO t1 VALUES ('node2_committed_before'); ...@@ -18,6 +20,7 @@ INSERT INTO t1 VALUES ('node2_committed_before');
COMMIT; COMMIT;
Unloading wsrep provider ... Unloading wsrep provider ...
SET GLOBAL wsrep_provider = 'none'; SET GLOBAL wsrep_provider = 'none';
connection node_1;
SET AUTOCOMMIT=OFF; SET AUTOCOMMIT=OFF;
START TRANSACTION; START TRANSACTION;
INSERT INTO t1 VALUES ('node1_committed_during'); INSERT INTO t1 VALUES ('node1_committed_during');
...@@ -32,6 +35,7 @@ INSERT INTO t1 VALUES ('node1_to_be_committed_after'); ...@@ -32,6 +35,7 @@ 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');
INSERT INTO t1 VALUES ('node1_to_be_committed_after'); INSERT INTO t1 VALUES ('node1_to_be_committed_after');
connect node_1a_galera_st_disconnect_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
SET AUTOCOMMIT=OFF; SET AUTOCOMMIT=OFF;
START TRANSACTION; START TRANSACTION;
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
...@@ -39,6 +43,7 @@ INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); ...@@ -39,6 +43,7 @@ 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');
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
connection node_2;
Loading wsrep provider ... Loading wsrep provider ...
SET AUTOCOMMIT=OFF; SET AUTOCOMMIT=OFF;
START TRANSACTION; START TRANSACTION;
...@@ -48,6 +53,7 @@ INSERT INTO t1 VALUES ('node2_committed_after'); ...@@ -48,6 +53,7 @@ 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; COMMIT;
connection node_1;
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'); INSERT INTO t1 VALUES ('node1_to_be_committed_after');
...@@ -62,6 +68,7 @@ INSERT INTO t1 VALUES ('node1_committed_after'); ...@@ -62,6 +68,7 @@ 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; COMMIT;
connection node_1a_galera_st_disconnect_slave;
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'); INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
...@@ -76,6 +83,7 @@ COUNT(*) = 0 ...@@ -76,6 +83,7 @@ COUNT(*) = 0
1 1
COMMIT; COMMIT;
SET AUTOCOMMIT=ON; SET AUTOCOMMIT=ON;
connection node_1;
SELECT COUNT(*) = 35 FROM t1; SELECT COUNT(*) = 35 FROM t1;
COUNT(*) = 35 COUNT(*) = 35
1 1
...@@ -86,6 +94,7 @@ DROP TABLE t1; ...@@ -86,6 +94,7 @@ DROP TABLE t1;
COMMIT; COMMIT;
SET AUTOCOMMIT=ON; SET AUTOCOMMIT=ON;
Performing State Transfer on a server that has been shut down cleanly and restarted Performing State Transfer on a server that has been shut down cleanly and restarted
connection node_1;
CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB; CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF; SET AUTOCOMMIT=OFF;
START TRANSACTION; START TRANSACTION;
...@@ -95,6 +104,7 @@ INSERT INTO t1 VALUES ('node1_committed_before'); ...@@ -95,6 +104,7 @@ 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; COMMIT;
connection node_2;
SET AUTOCOMMIT=OFF; SET AUTOCOMMIT=OFF;
START TRANSACTION; START TRANSACTION;
INSERT INTO t1 VALUES ('node2_committed_before'); INSERT INTO t1 VALUES ('node2_committed_before');
...@@ -104,6 +114,7 @@ INSERT INTO t1 VALUES ('node2_committed_before'); ...@@ -104,6 +114,7 @@ INSERT INTO t1 VALUES ('node2_committed_before');
INSERT INTO t1 VALUES ('node2_committed_before'); INSERT INTO t1 VALUES ('node2_committed_before');
COMMIT; COMMIT;
Shutting down server ... Shutting down server ...
connection node_1;
SET AUTOCOMMIT=OFF; SET AUTOCOMMIT=OFF;
START TRANSACTION; START TRANSACTION;
INSERT INTO t1 VALUES ('node1_committed_during'); INSERT INTO t1 VALUES ('node1_committed_during');
...@@ -118,6 +129,7 @@ INSERT INTO t1 VALUES ('node1_to_be_committed_after'); ...@@ -118,6 +129,7 @@ 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');
INSERT INTO t1 VALUES ('node1_to_be_committed_after'); INSERT INTO t1 VALUES ('node1_to_be_committed_after');
connect node_1a_galera_st_shutdown_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
SET AUTOCOMMIT=OFF; SET AUTOCOMMIT=OFF;
START TRANSACTION; START TRANSACTION;
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
...@@ -125,6 +137,7 @@ INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); ...@@ -125,6 +137,7 @@ 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');
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
connection node_2;
Starting server ... Starting server ...
SET AUTOCOMMIT=OFF; SET AUTOCOMMIT=OFF;
START TRANSACTION; START TRANSACTION;
...@@ -134,6 +147,7 @@ INSERT INTO t1 VALUES ('node2_committed_after'); ...@@ -134,6 +147,7 @@ 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; COMMIT;
connection node_1;
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'); INSERT INTO t1 VALUES ('node1_to_be_committed_after');
...@@ -148,6 +162,7 @@ INSERT INTO t1 VALUES ('node1_committed_after'); ...@@ -148,6 +162,7 @@ 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; COMMIT;
connection node_1a_galera_st_shutdown_slave;
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'); INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
...@@ -162,6 +177,7 @@ COUNT(*) = 0 ...@@ -162,6 +177,7 @@ COUNT(*) = 0
1 1
COMMIT; COMMIT;
SET AUTOCOMMIT=ON; SET AUTOCOMMIT=ON;
connection node_1;
SELECT COUNT(*) = 35 FROM t1; SELECT COUNT(*) = 35 FROM t1;
COUNT(*) = 35 COUNT(*) = 35
1 1
...@@ -172,6 +188,7 @@ DROP TABLE t1; ...@@ -172,6 +188,7 @@ DROP TABLE t1;
COMMIT; COMMIT;
SET AUTOCOMMIT=ON; SET AUTOCOMMIT=ON;
Performing State Transfer on a server that has been killed and restarted Performing State Transfer on a server that has been killed and restarted
connection node_1;
CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB; CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF; SET AUTOCOMMIT=OFF;
START TRANSACTION; START TRANSACTION;
...@@ -181,6 +198,7 @@ INSERT INTO t1 VALUES ('node1_committed_before'); ...@@ -181,6 +198,7 @@ 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; COMMIT;
connection node_2;
SET AUTOCOMMIT=OFF; SET AUTOCOMMIT=OFF;
START TRANSACTION; START TRANSACTION;
INSERT INTO t1 VALUES ('node2_committed_before'); INSERT INTO t1 VALUES ('node2_committed_before');
...@@ -190,6 +208,7 @@ INSERT INTO t1 VALUES ('node2_committed_before'); ...@@ -190,6 +208,7 @@ INSERT INTO t1 VALUES ('node2_committed_before');
INSERT INTO t1 VALUES ('node2_committed_before'); INSERT INTO t1 VALUES ('node2_committed_before');
COMMIT; COMMIT;
Killing server ... Killing server ...
connection node_1;
SET AUTOCOMMIT=OFF; SET AUTOCOMMIT=OFF;
START TRANSACTION; START TRANSACTION;
INSERT INTO t1 VALUES ('node1_committed_during'); INSERT INTO t1 VALUES ('node1_committed_during');
...@@ -204,6 +223,7 @@ INSERT INTO t1 VALUES ('node1_to_be_committed_after'); ...@@ -204,6 +223,7 @@ 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');
INSERT INTO t1 VALUES ('node1_to_be_committed_after'); INSERT INTO t1 VALUES ('node1_to_be_committed_after');
connect node_1a_galera_st_kill_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
SET AUTOCOMMIT=OFF; SET AUTOCOMMIT=OFF;
START TRANSACTION; START TRANSACTION;
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
...@@ -211,6 +231,7 @@ INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); ...@@ -211,6 +231,7 @@ 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');
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
connection node_2;
Performing --wsrep-recover ... Performing --wsrep-recover ...
Starting server ... Starting server ...
Using --wsrep-start-position when starting mysqld ... Using --wsrep-start-position when starting mysqld ...
...@@ -222,6 +243,7 @@ INSERT INTO t1 VALUES ('node2_committed_after'); ...@@ -222,6 +243,7 @@ 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; COMMIT;
connection node_1;
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'); INSERT INTO t1 VALUES ('node1_to_be_committed_after');
...@@ -236,6 +258,7 @@ INSERT INTO t1 VALUES ('node1_committed_after'); ...@@ -236,6 +258,7 @@ 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; COMMIT;
connection node_1a_galera_st_kill_slave;
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'); INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
...@@ -250,6 +273,7 @@ COUNT(*) = 0 ...@@ -250,6 +273,7 @@ COUNT(*) = 0
1 1
COMMIT; COMMIT;
SET AUTOCOMMIT=ON; SET AUTOCOMMIT=ON;
connection node_1;
SELECT COUNT(*) = 35 FROM t1; SELECT COUNT(*) = 35 FROM t1;
COUNT(*) = 35 COUNT(*) = 35
1 1
...@@ -261,6 +285,7 @@ COMMIT; ...@@ -261,6 +285,7 @@ COMMIT;
SET AUTOCOMMIT=ON; SET AUTOCOMMIT=ON;
Performing State Transfer on a server that has been killed and restarted Performing State Transfer on a server that has been killed and restarted
while a DDL was in progress on it while a DDL was in progress on it
connection node_1;
CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB; CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF; SET AUTOCOMMIT=OFF;
START TRANSACTION; START TRANSACTION;
...@@ -269,6 +294,7 @@ INSERT INTO t1 VALUES ('node1_committed_before'); ...@@ -269,6 +294,7 @@ 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');
INSERT INTO t1 VALUES ('node1_committed_before'); INSERT INTO t1 VALUES ('node1_committed_before');
connection node_2;
START TRANSACTION; 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');
...@@ -277,9 +303,12 @@ INSERT INTO t1 VALUES ('node2_committed_before'); ...@@ -277,9 +303,12 @@ INSERT INTO t1 VALUES ('node2_committed_before');
INSERT INTO t1 VALUES ('node2_committed_before'); INSERT INTO t1 VALUES ('node2_committed_before');
COMMIT; COMMIT;
SET GLOBAL debug_dbug = 'd,sync.alter_opened_table'; SET GLOBAL debug_dbug = 'd,sync.alter_opened_table';
connection node_1;
ALTER TABLE t1 ADD COLUMN f2 INTEGER; ALTER TABLE t1 ADD COLUMN f2 INTEGER;
connection node_2;
SET wsrep_sync_wait = 0; SET wsrep_sync_wait = 0;
Killing server ... Killing server ...
connection node_1;
SET AUTOCOMMIT=OFF; SET AUTOCOMMIT=OFF;
START TRANSACTION; START TRANSACTION;
INSERT INTO t1 (f1) VALUES ('node1_committed_during'); INSERT INTO t1 (f1) VALUES ('node1_committed_during');
...@@ -294,6 +323,7 @@ INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ...@@ -294,6 +323,7 @@ INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
connect node_1a_galera_st_kill_slave_ddl, 127.0.0.1, root, , test, $NODE_MYPORT_1;
SET AUTOCOMMIT=OFF; SET AUTOCOMMIT=OFF;
START TRANSACTION; START TRANSACTION;
INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
...@@ -301,7 +331,9 @@ INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ...@@ -301,7 +331,9 @@ INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
connection node_2;
Performing --wsrep-recover ... Performing --wsrep-recover ...
connection node_2;
Starting server ... Starting server ...
Using --wsrep-start-position when starting mysqld ... Using --wsrep-start-position when starting mysqld ...
SET AUTOCOMMIT=OFF; SET AUTOCOMMIT=OFF;
...@@ -312,6 +344,7 @@ INSERT INTO t1 (f1) VALUES ('node2_committed_after'); ...@@ -312,6 +344,7 @@ INSERT INTO t1 (f1) VALUES ('node2_committed_after');
INSERT INTO t1 (f1) VALUES ('node2_committed_after'); INSERT INTO t1 (f1) VALUES ('node2_committed_after');
INSERT INTO t1 (f1) VALUES ('node2_committed_after'); INSERT INTO t1 (f1) VALUES ('node2_committed_after');
COMMIT; COMMIT;
connection node_1;
INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
...@@ -326,6 +359,7 @@ INSERT INTO t1 (f1) VALUES ('node1_committed_after'); ...@@ -326,6 +359,7 @@ INSERT INTO t1 (f1) VALUES ('node1_committed_after');
INSERT INTO t1 (f1) VALUES ('node1_committed_after'); INSERT INTO t1 (f1) VALUES ('node1_committed_after');
INSERT INTO t1 (f1) VALUES ('node1_committed_after'); INSERT INTO t1 (f1) VALUES ('node1_committed_after');
COMMIT; COMMIT;
connection node_1a_galera_st_kill_slave_ddl;
INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
...@@ -343,6 +377,7 @@ COUNT(*) = 0 ...@@ -343,6 +377,7 @@ COUNT(*) = 0
1 1
COMMIT; COMMIT;
SET AUTOCOMMIT=ON; SET AUTOCOMMIT=ON;
connection node_1;
SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1'; SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
COUNT(*) = 2 COUNT(*) = 2
1 1
......
connection node_1;
SET GLOBAL wsrep_provider_options = 'pc.ignore_sb=true'; SET GLOBAL wsrep_provider_options = 'pc.ignore_sb=true';
CREATE TABLE ten (f1 INTEGER); CREATE TABLE ten (f1 INTEGER);
INSERT INTO ten VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10); INSERT INTO ten VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
CREATE TABLE t1 (f1 VARCHAR(128)) ENGINE=InnoDB; CREATE TABLE t1 (f1 VARCHAR(128)) ENGINE=InnoDB;
connection node_2;
Killing server ... Killing server ...
connection node_1;
INSERT INTO t1 SELECT REPEAT('a', 128) FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5, ten AS a6; INSERT INTO t1 SELECT REPEAT('a', 128) FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5, ten AS a6;
connection node_2;
connection node_2a;
SELECT COUNT(*) = 1000000 FROM t1; SELECT COUNT(*) = 1000000 FROM t1;
COUNT(*) = 1000000 COUNT(*) = 1000000
1 1
SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE = 2 VARIABLE_VALUE = 2
1 1
connection node_1;
DROP TABLE t1; DROP TABLE t1;
DROP TABLE ten; DROP TABLE ten;
INSERT INTO t1 (f1) VALUES (DEFAULT); INSERT INTO t1 (f1) VALUES (DEFAULT);
connection node_2;
SELECT f1 = 'ABC', f1017 = 'ABC' FROM t1; SELECT f1 = 'ABC', f1017 = 'ABC' FROM t1;
f1 = 'ABC' f1017 = 'ABC' f1 = 'ABC' f1017 = 'ABC'
1 1 1 1
UPDATE t1 SET f1 = 'XYZ', f1017 = 'XYZ' ; UPDATE t1 SET f1 = 'XYZ', f1017 = 'XYZ' ;
connection node_1;
SELECT f1 = 'XYZ', f1017 = 'XYZ' FROM t1 WHERE f1 = 'XYZ' AND f1017 = 'XYZ'; SELECT f1 = 'XYZ', f1017 = 'XYZ' FROM t1 WHERE f1 = 'XYZ' AND f1017 = 'XYZ';
f1 = 'XYZ' f1017 = 'XYZ' f1 = 'XYZ' f1017 = 'XYZ'
1 1 1 1
connection node_1;
SET AUTOCOMMIT=OFF; SET AUTOCOMMIT=OFF;
START TRANSACTION; START TRANSACTION;
UPDATE t1 SET f2 = 'KLM' WHERE f1 = 'XYZ' AND f1017 = 'XYZ'; UPDATE t1 SET f2 = 'KLM' WHERE f1 = 'XYZ' AND f1017 = 'XYZ';
connection node_2;
SET AUTOCOMMIT=OFF; SET AUTOCOMMIT=OFF;
START TRANSACTION; START TRANSACTION;
UPDATE t1 SET f2 = 'CDE' WHERE f1 = 'XYZ' AND f1017 = 'XYZ'; UPDATE t1 SET f2 = 'CDE' WHERE f1 = 'XYZ' AND f1017 = 'XYZ';
COMMIT; COMMIT;
connection node_1;
COMMIT; COMMIT;
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
ROLLBACK; ROLLBACK;
connection node_2;
ROLLBACK; ROLLBACK;
connection node_1;
START TRANSACTION; START TRANSACTION;
INSERT INTO t1 (f1, f1017) VALUES ('BCE','BCE'); INSERT INTO t1 (f1, f1017) VALUES ('BCE','BCE');
INSERT INTO t1 (f1, f1017) VALUES ('CED','CED'); INSERT INTO t1 (f1, f1017) VALUES ('CED','CED');
...@@ -26,6 +33,7 @@ ROLLBACK; ...@@ -26,6 +33,7 @@ ROLLBACK;
SELECT COUNT(*) = 1 FROM t1; SELECT COUNT(*) = 1 FROM t1;
COUNT(*) = 1 COUNT(*) = 1
1 1
connection node_2;
SELECT COUNT(*) = 1 FROM t1; SELECT COUNT(*) = 1 FROM t1;
COUNT(*) = 1 COUNT(*) = 1
1 1
......
connection node_1;
SET SESSION innodb_lock_wait_timeout=600; SET SESSION innodb_lock_wait_timeout=600;
SET SESSION lock_wait_timeout=600; SET SESSION lock_wait_timeout=600;
CREATE TABLE ten (f1 INTEGER); CREATE TABLE ten (f1 INTEGER);
INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 INTEGER) Engine=InnoDB; CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 INTEGER) Engine=InnoDB;
INSERT INTO t1 (f2) SELECT a1.f1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5; INSERT INTO t1 (f2) SELECT a1.f1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5;
connection node_2;
SET SESSION wsrep_sync_wait = 0; SET SESSION wsrep_sync_wait = 0;
SET SESSION wsrep_sync_wait = 7; SET SESSION wsrep_sync_wait = 7;
SET GLOBAL wsrep_provider_options = 'repl.causal_read_timeout=PT1H'; SET GLOBAL wsrep_provider_options = 'repl.causal_read_timeout=PT1H';
...@@ -11,21 +13,27 @@ SELECT COUNT(*) = 100000 FROM t1; ...@@ -11,21 +13,27 @@ SELECT COUNT(*) = 100000 FROM t1;
COUNT(*) = 100000 COUNT(*) = 100000
1 1
INSERT INTO t1 (f2) SELECT a1.f1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5; INSERT INTO t1 (f2) SELECT a1.f1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5;
connection node_1;
SELECT COUNT(*) = 200000 FROM t1; SELECT COUNT(*) = 200000 FROM t1;
COUNT(*) = 200000 COUNT(*) = 200000
1 1
UPDATE t1 SET f2 = 1; UPDATE t1 SET f2 = 1;
connection node_2;
SELECT COUNT(*) = 200000 FROM t1 WHERE f2 = 1; SELECT COUNT(*) = 200000 FROM t1 WHERE f2 = 1;
COUNT(*) = 200000 COUNT(*) = 200000
1 1
connection node_1;
START TRANSACTION; START TRANSACTION;
SELECT COUNT(*) = 200000 FROM t1; SELECT COUNT(*) = 200000 FROM t1;
COUNT(*) = 200000 COUNT(*) = 200000
1 1
UPDATE t1 SET f2 = 3; UPDATE t1 SET f2 = 3;
connection node_2;
START TRANSACTION; START TRANSACTION;
UPDATE t1 SET f2 = 4; UPDATE t1 SET f2 = 4;
connection node_1;
COMMIT; COMMIT;
connection node_2;
COMMIT; COMMIT;
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
DROP TABLE t1; DROP TABLE t1;
......
connection node_1;
SET AUTOCOMMIT=OFF; SET AUTOCOMMIT=OFF;
START TRANSACTION; START TRANSACTION;
COMMIT; COMMIT;
connection node_2;
CREATE TABLE sum_table (f1 INTEGER); CREATE TABLE sum_table (f1 INTEGER);
SELECT SUM(f1) = 900 FROM sum_table; SELECT SUM(f1) = 900 FROM sum_table;
SUM(f1) = 900 SUM(f1) = 900
1 1
connection node_1;
SET AUTOCOMMIT=OFF; SET AUTOCOMMIT=OFF;
START TRANSACTION; START TRANSACTION;
connection node_2;
SET AUTOCOMMIT=OFF; SET AUTOCOMMIT=OFF;
START TRANSACTION; START TRANSACTION;
UPDATE t900 SET f1 = 3; UPDATE t900 SET f1 = 3;
connection node_1;
COMMIT; COMMIT;
connection node_2;
COMMIT; COMMIT;
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
DROP SCHEMA test; DROP SCHEMA test;
......
connection node_1;
connection node_2;
SELECT COUNT(*) = 900 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'test' AND TABLE_NAME LIKE 't%'; SELECT COUNT(*) = 900 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'test' AND TABLE_NAME LIKE 't%';
COUNT(*) = 900 COUNT(*) = 900
1 1
connection node_1;
SET AUTOCOMMIT=OFF; SET AUTOCOMMIT=OFF;
START TRANSACTION; START TRANSACTION;
COMMIT; COMMIT;
connection node_2;
CREATE TABLE sum_table (f1 INTEGER); CREATE TABLE sum_table (f1 INTEGER);
SELECT SUM(f1) = 900 FROM sum_table; SELECT SUM(f1) = 900 FROM sum_table;
SUM(f1) = 900 SUM(f1) = 900
1 1
connection node_1;
SET AUTOCOMMIT=OFF; SET AUTOCOMMIT=OFF;
START TRANSACTION; START TRANSACTION;
connection node_2;
SET AUTOCOMMIT=OFF; SET AUTOCOMMIT=OFF;
START TRANSACTION; START TRANSACTION;
UPDATE t900 SET f1 = 3; UPDATE t900 SET f1 = 3;
connection node_1;
COMMIT; COMMIT;
connection node_2;
COMMIT; COMMIT;
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
DROP SCHEMA test; DROP SCHEMA test;
......
connection node_1;
CREATE TABLE ten (f1 INTEGER); CREATE TABLE ten (f1 INTEGER);
INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 INTEGER) Engine=InnoDB; CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 INTEGER) Engine=InnoDB;
connection node_2;
SET GLOBAL wsrep_slave_threads = 4; SET GLOBAL wsrep_slave_threads = 4;
connection node_1;
INSERT INTO t1 (f2) SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4;; INSERT INTO t1 (f2) SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4;;
connection node_1a;
INSERT INTO t1 (f2) SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4;; INSERT INTO t1 (f2) SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4;;
connection node_2;
INSERT INTO t1 (f2) SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4;; INSERT INTO t1 (f2) SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4;;
connection node_1;
connection node_1a;
connection node_2;
SELECT COUNT(*) = 30000 FROM t1; SELECT COUNT(*) = 30000 FROM t1;
COUNT(*) = 30000 COUNT(*) = 30000
1 1
...@@ -14,5 +22,6 @@ COUNT(DISTINCT f1) = 30000 ...@@ -14,5 +22,6 @@ COUNT(DISTINCT f1) = 30000
SELECT COUNT(*) = 5 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user'; SELECT COUNT(*) = 5 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user';
COUNT(*) = 5 COUNT(*) = 5
1 1
connection default;
DROP TABLE t1; DROP TABLE t1;
DROP TABLE ten; DROP TABLE ten;
connection node_1;
CREATE TABLE ten (f1 INTEGER); CREATE TABLE ten (f1 INTEGER);
INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 INTEGER) Engine=InnoDB; CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 INTEGER) Engine=InnoDB;
connection node_2;
SET GLOBAL wsrep_slave_threads = 4; SET GLOBAL wsrep_slave_threads = 4;
connection node_1;
connection node_2;
SELECT COUNT(*) = 20000 FROM t1; SELECT COUNT(*) = 20000 FROM t1;
COUNT(*) = 20000 COUNT(*) = 20000
1 1
...@@ -11,5 +15,6 @@ COUNT(DISTINCT f1) = 20000 ...@@ -11,5 +15,6 @@ COUNT(DISTINCT f1) = 20000
SELECT COUNT(*) = 4 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE 'committed%'; SELECT COUNT(*) = 4 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE 'committed%';
COUNT(*) = 4 COUNT(*) = 4
1 1
connection default;
DROP TABLE t1; DROP TABLE t1;
DROP TABLE ten; DROP TABLE ten;
connection node_1;
CREATE TABLE ten (f1 INTEGER); CREATE TABLE ten (f1 INTEGER);
INSERT INTO ten VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO ten VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
CREATE TABLE t1 (f1 INTEGER) Engine=InnoDB; CREATE TABLE t1 (f1 INTEGER) Engine=InnoDB;
INSERT INTO t1 (f1) SELECT 000000 + (10000 * a1.f1) + (1000 * a2.f1) + (100 * a3.f1) + (10 * a4.f1) + a5.f1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5; INSERT INTO t1 (f1) SELECT 000000 + (10000 * a1.f1) + (1000 * a2.f1) + (100 * a3.f1) + (10 * a4.f1) + a5.f1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5;
INSERT INTO t1 (f1) SELECT 100000 + (10000 * a1.f1) + (1000 * a2.f1) + (100 * a3.f1) + (10 * a4.f1) + a5.f1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5;; INSERT INTO t1 (f1) SELECT 100000 + (10000 * a1.f1) + (1000 * a2.f1) + (100 * a3.f1) + (10 * a4.f1) + a5.f1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5;;
connection node_2;
SET SESSION wsrep_OSU_method = "RSU"; SET SESSION wsrep_OSU_method = "RSU";
ALTER TABLE t1 ADD PRIMARY KEY (f1); ALTER TABLE t1 ADD PRIMARY KEY (f1);
SET SESSION wsrep_OSU_method = "TOI"; SET SESSION wsrep_OSU_method = "TOI";
...@@ -13,6 +15,7 @@ COUNT(*) = 300000 ...@@ -13,6 +15,7 @@ COUNT(*) = 300000
SELECT MAX(f1) = 299999 FROM t1; SELECT MAX(f1) = 299999 FROM t1;
MAX(f1) = 299999 MAX(f1) = 299999
1 1
connection node_1;
SELECT COUNT(*) = 300000 FROM t1; SELECT COUNT(*) = 300000 FROM t1;
COUNT(*) = 300000 COUNT(*) = 300000
1 1
......
connection node_1;
CREATE TABLE ten (f1 INTEGER); CREATE TABLE ten (f1 INTEGER);
INSERT INTO ten VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO ten VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) Engine=InnoDB; CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) Engine=InnoDB;
INSERT INTO t1 (f1) SELECT 000000 + (10000 * a1.f1) + (1000 * a2.f1) + (100 * a3.f1) + (10 * a4.f1) + a5.f1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5; INSERT INTO t1 (f1) SELECT 000000 + (10000 * a1.f1) + (1000 * a2.f1) + (100 * a3.f1) + (10 * a4.f1) + a5.f1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5;
INSERT INTO t1 (f1) SELECT 100000 + (10000 * a1.f1) + (1000 * a2.f1) + (100 * a3.f1) + (10 * a4.f1) + a5.f1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5;; INSERT INTO t1 (f1) SELECT 100000 + (10000 * a1.f1) + (1000 * a2.f1) + (100 * a3.f1) + (10 * a4.f1) + a5.f1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5;;
connection node_2;
SET SESSION wsrep_OSU_method = "RSU"; SET SESSION wsrep_OSU_method = "RSU";
ALTER TABLE t1 DROP PRIMARY KEY; ALTER TABLE t1 DROP PRIMARY KEY;
SET SESSION wsrep_OSU_method = "TOI"; SET SESSION wsrep_OSU_method = "TOI";
...@@ -13,6 +15,7 @@ COUNT(*) = 300000 ...@@ -13,6 +15,7 @@ COUNT(*) = 300000
SELECT MAX(f1) = 299999 FROM t1; SELECT MAX(f1) = 299999 FROM t1;
MAX(f1) = 299999 MAX(f1) = 299999
1 1
connection node_1;
SELECT COUNT(*) = 300000 FROM t1; SELECT COUNT(*) = 300000 FROM t1;
COUNT(*) = 300000 COUNT(*) = 300000
1 1
...@@ -22,8 +25,10 @@ MAX(f1) = 299999 ...@@ -22,8 +25,10 @@ MAX(f1) = 299999
SET SESSION wsrep_OSU_method = "RSU"; SET SESSION wsrep_OSU_method = "RSU";
ALTER TABLE t1 DROP PRIMARY KEY; ALTER TABLE t1 DROP PRIMARY KEY;
SET SESSION wsrep_OSU_method = "TOI"; SET SESSION wsrep_OSU_method = "TOI";
connection node_2;
INSERT INTO t1 (f1) VALUES (1); INSERT INTO t1 (f1) VALUES (1);
INSERT INTO t1 (f1) VALUES (10); INSERT INTO t1 (f1) VALUES (10);
connection node_1;
SELECT COUNT(*) = 2 FROM t1 WHERE f1 = 1; SELECT COUNT(*) = 2 FROM t1 WHERE f1 = 1;
COUNT(*) = 2 COUNT(*) = 2
1 1
...@@ -32,6 +37,7 @@ COUNT(*) = 2 ...@@ -32,6 +37,7 @@ COUNT(*) = 2
1 1
INSERT INTO t1 (f1) VALUES (100); INSERT INTO t1 (f1) VALUES (100);
INSERT INTO t1 (f1) VALUES (1000); INSERT INTO t1 (f1) VALUES (1000);
connection node_2;
SELECT COUNT(*) = 2 FROM t1 WHERE f1 = 100; SELECT COUNT(*) = 2 FROM t1 WHERE f1 = 100;
COUNT(*) = 2 COUNT(*) = 2
1 1
......
...@@ -5,6 +5,7 @@ SET wsrep_OSU_method=RSU; ...@@ -5,6 +5,7 @@ SET wsrep_OSU_method=RSU;
SET DEBUG_SYNC = 'alter_table_before_open_tables WAIT_FOR continue'; SET DEBUG_SYNC = 'alter_table_before_open_tables WAIT_FOR continue';
ALTER TABLE t1 ADD COLUMN f2 INTEGER;; ALTER TABLE t1 ADD COLUMN f2 INTEGER;;
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1; connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1;
connection node_1a; connection node_1a;
SET GLOBAL wsrep_desync=0; SET GLOBAL wsrep_desync=0;
SET DEBUG_SYNC= 'now SIGNAL continue'; SET DEBUG_SYNC= 'now SIGNAL continue';
...@@ -31,9 +32,11 @@ SET DEBUG_SYNC = 'alter_table_before_create_table_no_lock WAIT_FOR continue'; ...@@ -31,9 +32,11 @@ SET DEBUG_SYNC = 'alter_table_before_create_table_no_lock WAIT_FOR continue';
ALTER TABLE t1 ADD COLUMN f2 INTEGER;; ALTER TABLE t1 ADD COLUMN f2 INTEGER;;
connection node_1a; connection node_1a;
SET GLOBAL wsrep_desync=1;; SET GLOBAL wsrep_desync=1;;
connection node_1b;
SET DEBUG_SYNC= 'now SIGNAL continue'; SET DEBUG_SYNC= 'now SIGNAL continue';
SET GLOBAL wsrep_desync=0;
connection node_1; connection node_1;
connection node_1a;
SET GLOBAL wsrep_desync=0;
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
......
Performing State Transfer on a server that has been shut down cleanly and restarted Performing State Transfer on a server that has been shut down cleanly and restarted
connection node_1;
CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB; CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF; SET AUTOCOMMIT=OFF;
START TRANSACTION; START TRANSACTION;
...@@ -8,6 +9,7 @@ INSERT INTO t1 VALUES ('node1_committed_before'); ...@@ -8,6 +9,7 @@ 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; COMMIT;
connection node_2;
SET AUTOCOMMIT=OFF; SET AUTOCOMMIT=OFF;
START TRANSACTION; START TRANSACTION;
INSERT INTO t1 VALUES ('node2_committed_before'); INSERT INTO t1 VALUES ('node2_committed_before');
...@@ -17,6 +19,7 @@ INSERT INTO t1 VALUES ('node2_committed_before'); ...@@ -17,6 +19,7 @@ INSERT INTO t1 VALUES ('node2_committed_before');
INSERT INTO t1 VALUES ('node2_committed_before'); INSERT INTO t1 VALUES ('node2_committed_before');
COMMIT; COMMIT;
Shutting down server ... Shutting down server ...
connection node_1;
SET AUTOCOMMIT=OFF; SET AUTOCOMMIT=OFF;
START TRANSACTION; START TRANSACTION;
INSERT INTO t1 VALUES ('node1_committed_during'); INSERT INTO t1 VALUES ('node1_committed_during');
...@@ -31,6 +34,7 @@ INSERT INTO t1 VALUES ('node1_to_be_committed_after'); ...@@ -31,6 +34,7 @@ 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');
INSERT INTO t1 VALUES ('node1_to_be_committed_after'); INSERT INTO t1 VALUES ('node1_to_be_committed_after');
connect node_1a_galera_st_shutdown_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
SET AUTOCOMMIT=OFF; SET AUTOCOMMIT=OFF;
START TRANSACTION; START TRANSACTION;
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
...@@ -38,6 +42,7 @@ INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); ...@@ -38,6 +42,7 @@ 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');
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
connection node_2;
Starting server ... Starting server ...
SET AUTOCOMMIT=OFF; SET AUTOCOMMIT=OFF;
START TRANSACTION; START TRANSACTION;
...@@ -47,6 +52,7 @@ INSERT INTO t1 VALUES ('node2_committed_after'); ...@@ -47,6 +52,7 @@ 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; COMMIT;
connection node_1;
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'); INSERT INTO t1 VALUES ('node1_to_be_committed_after');
...@@ -61,6 +67,7 @@ INSERT INTO t1 VALUES ('node1_committed_after'); ...@@ -61,6 +67,7 @@ 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; COMMIT;
connection node_1a_galera_st_shutdown_slave;
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'); INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
...@@ -75,6 +82,7 @@ COUNT(*) = 0 ...@@ -75,6 +82,7 @@ COUNT(*) = 0
1 1
COMMIT; COMMIT;
SET AUTOCOMMIT=ON; SET AUTOCOMMIT=ON;
connection node_1;
SELECT COUNT(*) = 35 FROM t1; SELECT COUNT(*) = 35 FROM t1;
COUNT(*) = 35 COUNT(*) = 35
1 1
...@@ -86,6 +94,7 @@ COMMIT; ...@@ -86,6 +94,7 @@ COMMIT;
SET AUTOCOMMIT=ON; SET AUTOCOMMIT=ON;
Performing State Transfer on a server that starts from a clean var directory Performing State Transfer on a server that starts from a clean var directory
This is accomplished by shutting down node #2 and removing its var directory before restarting it This is accomplished by shutting down node #2 and removing its var directory before restarting it
connection node_1;
CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB; CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF; SET AUTOCOMMIT=OFF;
START TRANSACTION; START TRANSACTION;
...@@ -95,6 +104,7 @@ INSERT INTO t1 VALUES ('node1_committed_before'); ...@@ -95,6 +104,7 @@ 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; COMMIT;
connection node_2;
SET AUTOCOMMIT=OFF; SET AUTOCOMMIT=OFF;
START TRANSACTION; START TRANSACTION;
INSERT INTO t1 VALUES ('node2_committed_before'); INSERT INTO t1 VALUES ('node2_committed_before');
...@@ -104,6 +114,7 @@ INSERT INTO t1 VALUES ('node2_committed_before'); ...@@ -104,6 +114,7 @@ INSERT INTO t1 VALUES ('node2_committed_before');
INSERT INTO t1 VALUES ('node2_committed_before'); INSERT INTO t1 VALUES ('node2_committed_before');
COMMIT; COMMIT;
Shutting down server ... Shutting down server ...
connection node_1;
Cleaning var directory ... Cleaning var directory ...
SET AUTOCOMMIT=OFF; SET AUTOCOMMIT=OFF;
START TRANSACTION; START TRANSACTION;
...@@ -119,6 +130,7 @@ INSERT INTO t1 VALUES ('node1_to_be_committed_after'); ...@@ -119,6 +130,7 @@ 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');
INSERT INTO t1 VALUES ('node1_to_be_committed_after'); INSERT INTO t1 VALUES ('node1_to_be_committed_after');
connect node_1a_galera_st_clean_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
SET AUTOCOMMIT=OFF; SET AUTOCOMMIT=OFF;
START TRANSACTION; START TRANSACTION;
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
...@@ -126,6 +138,7 @@ INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); ...@@ -126,6 +138,7 @@ 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');
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
connection node_2;
Starting server ... Starting server ...
SET AUTOCOMMIT=OFF; SET AUTOCOMMIT=OFF;
START TRANSACTION; START TRANSACTION;
...@@ -135,6 +148,7 @@ INSERT INTO t1 VALUES ('node2_committed_after'); ...@@ -135,6 +148,7 @@ 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; COMMIT;
connection node_1;
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'); INSERT INTO t1 VALUES ('node1_to_be_committed_after');
...@@ -149,6 +163,7 @@ INSERT INTO t1 VALUES ('node1_committed_after'); ...@@ -149,6 +163,7 @@ 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; COMMIT;
connection node_1a_galera_st_clean_slave;
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'); INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
...@@ -163,6 +178,7 @@ COUNT(*) = 0 ...@@ -163,6 +178,7 @@ COUNT(*) = 0
1 1
COMMIT; COMMIT;
SET AUTOCOMMIT=ON; SET AUTOCOMMIT=ON;
connection node_1;
SELECT COUNT(*) = 35 FROM t1; SELECT COUNT(*) = 35 FROM t1;
COUNT(*) = 35 COUNT(*) = 35
1 1
...@@ -173,6 +189,7 @@ DROP TABLE t1; ...@@ -173,6 +189,7 @@ DROP TABLE t1;
COMMIT; COMMIT;
SET AUTOCOMMIT=ON; SET AUTOCOMMIT=ON;
Performing State Transfer on a server that has been killed and restarted Performing State Transfer on a server that has been killed and restarted
connection node_1;
CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB; CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF; SET AUTOCOMMIT=OFF;
START TRANSACTION; START TRANSACTION;
...@@ -182,6 +199,7 @@ INSERT INTO t1 VALUES ('node1_committed_before'); ...@@ -182,6 +199,7 @@ 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; COMMIT;
connection node_2;
SET AUTOCOMMIT=OFF; SET AUTOCOMMIT=OFF;
START TRANSACTION; START TRANSACTION;
INSERT INTO t1 VALUES ('node2_committed_before'); INSERT INTO t1 VALUES ('node2_committed_before');
...@@ -191,6 +209,7 @@ INSERT INTO t1 VALUES ('node2_committed_before'); ...@@ -191,6 +209,7 @@ INSERT INTO t1 VALUES ('node2_committed_before');
INSERT INTO t1 VALUES ('node2_committed_before'); INSERT INTO t1 VALUES ('node2_committed_before');
COMMIT; COMMIT;
Killing server ... Killing server ...
connection node_1;
SET AUTOCOMMIT=OFF; SET AUTOCOMMIT=OFF;
START TRANSACTION; START TRANSACTION;
INSERT INTO t1 VALUES ('node1_committed_during'); INSERT INTO t1 VALUES ('node1_committed_during');
...@@ -205,6 +224,7 @@ INSERT INTO t1 VALUES ('node1_to_be_committed_after'); ...@@ -205,6 +224,7 @@ 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');
INSERT INTO t1 VALUES ('node1_to_be_committed_after'); INSERT INTO t1 VALUES ('node1_to_be_committed_after');
connect node_1a_galera_st_kill_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
SET AUTOCOMMIT=OFF; SET AUTOCOMMIT=OFF;
START TRANSACTION; START TRANSACTION;
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
...@@ -212,6 +232,7 @@ INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); ...@@ -212,6 +232,7 @@ 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');
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
connection node_2;
Performing --wsrep-recover ... Performing --wsrep-recover ...
Starting server ... Starting server ...
Using --wsrep-start-position when starting mysqld ... Using --wsrep-start-position when starting mysqld ...
...@@ -223,6 +244,7 @@ INSERT INTO t1 VALUES ('node2_committed_after'); ...@@ -223,6 +244,7 @@ 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; COMMIT;
connection node_1;
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'); INSERT INTO t1 VALUES ('node1_to_be_committed_after');
...@@ -237,6 +259,7 @@ INSERT INTO t1 VALUES ('node1_committed_after'); ...@@ -237,6 +259,7 @@ 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; COMMIT;
connection node_1a_galera_st_kill_slave;
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'); INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
...@@ -251,6 +274,7 @@ COUNT(*) = 0 ...@@ -251,6 +274,7 @@ COUNT(*) = 0
1 1
COMMIT; COMMIT;
SET AUTOCOMMIT=ON; SET AUTOCOMMIT=ON;
connection node_1;
SELECT COUNT(*) = 35 FROM t1; SELECT COUNT(*) = 35 FROM t1;
COUNT(*) = 35 COUNT(*) = 35
1 1
...@@ -262,6 +286,7 @@ COMMIT; ...@@ -262,6 +286,7 @@ COMMIT;
SET AUTOCOMMIT=ON; SET AUTOCOMMIT=ON;
Performing State Transfer on a server that has been killed and restarted Performing State Transfer on a server that has been killed and restarted
while a DDL was in progress on it while a DDL was in progress on it
connection node_1;
CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB; CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF; SET AUTOCOMMIT=OFF;
START TRANSACTION; START TRANSACTION;
...@@ -270,6 +295,7 @@ INSERT INTO t1 VALUES ('node1_committed_before'); ...@@ -270,6 +295,7 @@ 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');
INSERT INTO t1 VALUES ('node1_committed_before'); INSERT INTO t1 VALUES ('node1_committed_before');
connection node_2;
START TRANSACTION; 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');
...@@ -278,9 +304,12 @@ INSERT INTO t1 VALUES ('node2_committed_before'); ...@@ -278,9 +304,12 @@ INSERT INTO t1 VALUES ('node2_committed_before');
INSERT INTO t1 VALUES ('node2_committed_before'); INSERT INTO t1 VALUES ('node2_committed_before');
COMMIT; COMMIT;
SET GLOBAL debug_dbug = 'd,sync.alter_opened_table'; SET GLOBAL debug_dbug = 'd,sync.alter_opened_table';
connection node_1;
ALTER TABLE t1 ADD COLUMN f2 INTEGER; ALTER TABLE t1 ADD COLUMN f2 INTEGER;
connection node_2;
SET wsrep_sync_wait = 0; SET wsrep_sync_wait = 0;
Killing server ... Killing server ...
connection node_1;
SET AUTOCOMMIT=OFF; SET AUTOCOMMIT=OFF;
START TRANSACTION; START TRANSACTION;
INSERT INTO t1 (f1) VALUES ('node1_committed_during'); INSERT INTO t1 (f1) VALUES ('node1_committed_during');
...@@ -295,6 +324,7 @@ INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ...@@ -295,6 +324,7 @@ INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
connect node_1a_galera_st_kill_slave_ddl, 127.0.0.1, root, , test, $NODE_MYPORT_1;
SET AUTOCOMMIT=OFF; SET AUTOCOMMIT=OFF;
START TRANSACTION; START TRANSACTION;
INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
...@@ -302,7 +332,9 @@ INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ...@@ -302,7 +332,9 @@ INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
connection node_2;
Performing --wsrep-recover ... Performing --wsrep-recover ...
connection node_2;
Starting server ... Starting server ...
Using --wsrep-start-position when starting mysqld ... Using --wsrep-start-position when starting mysqld ...
SET AUTOCOMMIT=OFF; SET AUTOCOMMIT=OFF;
...@@ -313,6 +345,7 @@ INSERT INTO t1 (f1) VALUES ('node2_committed_after'); ...@@ -313,6 +345,7 @@ INSERT INTO t1 (f1) VALUES ('node2_committed_after');
INSERT INTO t1 (f1) VALUES ('node2_committed_after'); INSERT INTO t1 (f1) VALUES ('node2_committed_after');
INSERT INTO t1 (f1) VALUES ('node2_committed_after'); INSERT INTO t1 (f1) VALUES ('node2_committed_after');
COMMIT; COMMIT;
connection node_1;
INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
...@@ -327,6 +360,7 @@ INSERT INTO t1 (f1) VALUES ('node1_committed_after'); ...@@ -327,6 +360,7 @@ INSERT INTO t1 (f1) VALUES ('node1_committed_after');
INSERT INTO t1 (f1) VALUES ('node1_committed_after'); INSERT INTO t1 (f1) VALUES ('node1_committed_after');
INSERT INTO t1 (f1) VALUES ('node1_committed_after'); INSERT INTO t1 (f1) VALUES ('node1_committed_after');
COMMIT; COMMIT;
connection node_1a_galera_st_kill_slave_ddl;
INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
...@@ -344,6 +378,7 @@ COUNT(*) = 0 ...@@ -344,6 +378,7 @@ COUNT(*) = 0
1 1
COMMIT; COMMIT;
SET AUTOCOMMIT=ON; SET AUTOCOMMIT=ON;
connection node_1;
SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1'; SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
COUNT(*) = 2 COUNT(*) = 2
1 1
......
...@@ -42,8 +42,8 @@ CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; ...@@ -42,8 +42,8 @@ CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
CREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW SET NEW.f1 = 'a'; CREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW SET NEW.f1 = 'a';
connection node_2; connection node_2;
SHOW CREATE TRIGGER tr1; SHOW CREATE TRIGGER tr1;
Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation Created
tr1 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW SET NEW.f1 = 'a' latin1 latin1_swedish_ci latin1_swedish_ci tr1 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW SET NEW.f1 = 'a' latin1 latin1_swedish_ci latin1_swedish_ci #
DROP TABLE t1; DROP TABLE t1;
connection node_1; connection node_1;
CREATE EVENT event1 ON SCHEDULE AT '2038-01-01 23:59:59' DO SELECT 1; CREATE EVENT event1 ON SCHEDULE AT '2038-01-01 23:59:59' DO SELECT 1;
......
...@@ -3,6 +3,7 @@ INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); ...@@ -3,6 +3,7 @@ INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t1 (f1) SELECT (10000 * a1.f1) + (1000 * a2.f1) + (100 * a3.f1) + (10 * a4.f1) + a5.f1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5; INSERT INTO t1 (f1) SELECT (10000 * a1.f1) + (1000 * a2.f1) + (100 * a3.f1) + (10 * a4.f1) + a5.f1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5;
INSERT INTO t1 (f1) SELECT MAX(f1) FROM t1; INSERT INTO t1 (f1) SELECT MAX(f1) FROM t1;
connection node_2;
ALTER TABLE t1 ADD PRIMARY KEY (f1); ALTER TABLE t1 ADD PRIMARY KEY (f1);
ERROR 23000: Duplicate entry '111110' for key 'PRIMARY' ERROR 23000: Duplicate entry '111110' for key 'PRIMARY'
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
...@@ -10,6 +11,7 @@ Table Create Table ...@@ -10,6 +11,7 @@ Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`f1` int(11) DEFAULT NULL `f1` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ) ENGINE=InnoDB DEFAULT CHARSET=latin1
connection node_1;
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
......
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB; CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
connection node_2;
SET GLOBAL wsrep_load_data_splitting = TRUE; SET GLOBAL wsrep_load_data_splitting = TRUE;
connection node_2;
SELECT COUNT(*) = 95000 FROM t1; SELECT COUNT(*) = 95000 FROM t1;
COUNT(*) = 95000 COUNT(*) = 95000
1 1
wsrep_last_committed_diff wsrep_last_committed_diff
1 1
connection node_1;
SET GLOBAL wsrep_load_data_splitting = 1;; SET GLOBAL wsrep_load_data_splitting = 1;;
DROP TABLE t1; DROP TABLE t1;
connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
connect node_4, 127.0.0.1, root, , test, $NODE_MYPORT_4;
connection node_1;
connection node_2;
connection node_3;
connection node_4;
SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE = 4 VARIABLE_VALUE = 4
1 1
connection node_1;
CREATE TABLE t1 (f1 INTEGER); CREATE TABLE t1 (f1 INTEGER);
INSERT INTO t1 VALUES (1); INSERT INTO t1 VALUES (1);
connection node_2;
INSERT INTO t1 VALUES (2); INSERT INTO t1 VALUES (2);
connection node_3;
INSERT INTO t1 VALUES (3); INSERT INTO t1 VALUES (3);
connection node_4;
INSERT INTO t1 VALUES (4); INSERT INTO t1 VALUES (4);
connection node_3;
INSERT INTO t1 VALUES (13); INSERT INTO t1 VALUES (13);
Shutting down server ... Shutting down server ...
connection node_1;
INSERT INTO t1 VALUES (11); INSERT INTO t1 VALUES (11);
connection node_2;
INSERT INTO t1 VALUES (12); INSERT INTO t1 VALUES (12);
connection node_4;
INSERT INTO t1 VALUES (14); INSERT INTO t1 VALUES (14);
connection node_3;
INSERT INTO t1 VALUES (131); INSERT INTO t1 VALUES (131);
connection node_2;
INSERT INTO t1 VALUES (22); INSERT INTO t1 VALUES (22);
Shutting down server ... Shutting down server ...
connection node_1;
INSERT INTO t1 VALUES (21); INSERT INTO t1 VALUES (21);
connection node_3;
INSERT INTO t1 VALUES (23); INSERT INTO t1 VALUES (23);
connection node_4;
INSERT INTO t1 VALUES (24); INSERT INTO t1 VALUES (24);
connection node_2;
INSERT INTO t1 VALUES (221); INSERT INTO t1 VALUES (221);
connection node_4;
INSERT INTO t1 VALUES (34); INSERT INTO t1 VALUES (34);
Shutting down server ... Shutting down server ...
connection node_1;
INSERT INTO t1 VALUES (31); INSERT INTO t1 VALUES (31);
connection node_2;
INSERT INTO t1 VALUES (32); INSERT INTO t1 VALUES (32);
connection node_3;
INSERT INTO t1 VALUES (33); INSERT INTO t1 VALUES (33);
connection node_4;
INSERT INTO t1 VALUES (341); INSERT INTO t1 VALUES (341);
connection node_1;
SELECT COUNT(*) = 19 FROM t1; SELECT COUNT(*) = 19 FROM t1;
COUNT(*) = 19 COUNT(*) = 19
1 1
connection node_2;
SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE = 4 VARIABLE_VALUE = 4
1 1
SELECT COUNT(*) = 19 FROM t1; SELECT COUNT(*) = 19 FROM t1;
COUNT(*) = 19 COUNT(*) = 19
1 1
connection node_3;
SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE = 4 VARIABLE_VALUE = 4
1 1
SELECT COUNT(*) = 19 FROM t1; SELECT COUNT(*) = 19 FROM t1;
COUNT(*) = 19 COUNT(*) = 19
1 1
connection node_4;
SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE = 4 VARIABLE_VALUE = 4
1 1
SELECT COUNT(*) = 19 FROM t1; SELECT COUNT(*) = 19 FROM t1;
COUNT(*) = 19 COUNT(*) = 19
1 1
connection node_1;
DROP TABLE t1; DROP TABLE t1;
CALL mtr.add_suppression("There are no nodes in the same segment that will ever be able to become donors, yet there is a suitable donor outside"); CALL mtr.add_suppression("There are no nodes in the same segment that will ever be able to become donors, yet there is a suitable donor outside");
connection node_2;
CALL mtr.add_suppression("Action message in non-primary configuration from member 0"); CALL mtr.add_suppression("Action message in non-primary configuration from member 0");
connection node_3;
CALL mtr.add_suppression("There are no nodes in the same segment that will ever be able to become donors, yet there is a suitable donor outside"); CALL mtr.add_suppression("There are no nodes in the same segment that will ever be able to become donors, yet there is a suitable donor outside");
CALL mtr.add_suppression("Action message in non-primary configuration from member 0"); CALL mtr.add_suppression("Action message in non-primary configuration from member 0");
connection node_4;
CALL mtr.add_suppression("Action message in non-primary configuration from member 0"); CALL mtr.add_suppression("Action message in non-primary configuration from member 0");
disconnect node_2;
disconnect node_1;
SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE = 4 VARIABLE_VALUE = 4
1 1
connection node_1;
CREATE TABLE t1 (f1 INTEGER); CREATE TABLE t1 (f1 INTEGER);
INSERT INTO t1 VALUES (1); INSERT INTO t1 VALUES (1);
connection node_2;
INSERT INTO t1 VALUES (2); INSERT INTO t1 VALUES (2);
connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
connection node_3;
INSERT INTO t1 VALUES (3); INSERT INTO t1 VALUES (3);
connect node_4, 127.0.0.1, root, , test, $NODE_MYPORT_4;
connection node_4;
INSERT INTO t1 VALUES (4); INSERT INTO t1 VALUES (4);
connection node_3;
INSERT INTO t1 VALUES (13); INSERT INTO t1 VALUES (13);
Killing server ... Killing server ...
connection node_1;
INSERT INTO t1 VALUES (11); INSERT INTO t1 VALUES (11);
connection node_2;
INSERT INTO t1 VALUES (12); INSERT INTO t1 VALUES (12);
connection node_4;
INSERT INTO t1 VALUES (14); INSERT INTO t1 VALUES (14);
connection node_3;
INSERT INTO t1 VALUES (131); INSERT INTO t1 VALUES (131);
connection node_2;
INSERT INTO t1 VALUES (22); INSERT INTO t1 VALUES (22);
Killing server ... Killing server ...
connection node_1;
INSERT INTO t1 VALUES (21); INSERT INTO t1 VALUES (21);
connection node_3;
INSERT INTO t1 VALUES (23); INSERT INTO t1 VALUES (23);
connection node_4;
INSERT INTO t1 VALUES (24); INSERT INTO t1 VALUES (24);
connection node_2;
INSERT INTO t1 VALUES (221); INSERT INTO t1 VALUES (221);
connection node_4;
INSERT INTO t1 VALUES (34); INSERT INTO t1 VALUES (34);
Killing server ... Killing server ...
connection node_1;
INSERT INTO t1 VALUES (31); INSERT INTO t1 VALUES (31);
connection node_2;
INSERT INTO t1 VALUES (32); INSERT INTO t1 VALUES (32);
connection node_3;
INSERT INTO t1 VALUES (33); INSERT INTO t1 VALUES (33);
connection node_4;
INSERT INTO t1 VALUES (341); INSERT INTO t1 VALUES (341);
connection node_1;
SELECT COUNT(*) = 19 FROM t1; SELECT COUNT(*) = 19 FROM t1;
COUNT(*) = 19 COUNT(*) = 19
1 1
connection node_2;
SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE = 4 VARIABLE_VALUE = 4
1 1
SELECT COUNT(*) = 19 FROM t1; SELECT COUNT(*) = 19 FROM t1;
COUNT(*) = 19 COUNT(*) = 19
1 1
connection node_3;
SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE = 4 VARIABLE_VALUE = 4
1 1
SELECT COUNT(*) = 19 FROM t1; SELECT COUNT(*) = 19 FROM t1;
COUNT(*) = 19 COUNT(*) = 19
1 1
connection node_4;
SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE = 4 VARIABLE_VALUE = 4
1 1
SELECT COUNT(*) = 19 FROM t1; SELECT COUNT(*) = 19 FROM t1;
COUNT(*) = 19 COUNT(*) = 19
1 1
connection node_1;
DROP TABLE t1; DROP TABLE t1;
CALL mtr.add_suppression("There are no nodes in the same segment that will ever be able to become donors, yet there is a suitable donor outside"); CALL mtr.add_suppression("There are no nodes in the same segment that will ever be able to become donors, yet there is a suitable donor outside");
CALL mtr.add_suppression("WSREP: gcs_caused\\(\\) returned -1 \\(Operation not permitted\\)"); CALL mtr.add_suppression("WSREP: gcs_caused\\(\\) returned -1 \\(Operation not permitted\\)");
connection node_2;
CALL mtr.add_suppression("Action message in non-primary configuration from member 0"); CALL mtr.add_suppression("Action message in non-primary configuration from member 0");
connection node_3;
CALL mtr.add_suppression("There are no nodes in the same segment that will ever be able to become donors, yet there is a suitable donor outside"); CALL mtr.add_suppression("There are no nodes in the same segment that will ever be able to become donors, yet there is a suitable donor outside");
CALL mtr.add_suppression("Action message in non-primary configuration from member 0"); CALL mtr.add_suppression("Action message in non-primary configuration from member 0");
connection node_4;
CALL mtr.add_suppression("Action message in non-primary configuration from member 0"); CALL mtr.add_suppression("Action message in non-primary configuration from member 0");
connection node_1;
CREATE TABLE ten (f1 INTEGER); CREATE TABLE ten (f1 INTEGER);
INSERT INTO ten VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO ten VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
CREATE TABLE t1 (f1 INTEGER) Engine=InnoDB; CREATE TABLE t1 (f1 INTEGER) Engine=InnoDB;
INSERT INTO t1 (f1) SELECT 000000 + (10000 * a1.f1) + (1000 * a2.f1) + (100 * a3.f1) + (10 * a4.f1) + a5.f1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5; INSERT INTO t1 (f1) SELECT 000000 + (10000 * a1.f1) + (1000 * a2.f1) + (100 * a3.f1) + (10 * a4.f1) + a5.f1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5;
connection node_2;
SET GLOBAL wsrep_desync = TRUE; SET GLOBAL wsrep_desync = TRUE;
SET SESSION wsrep_on = FALSE; SET SESSION wsrep_on = FALSE;
ALTER TABLE t1 ADD PRIMARY KEY (f1); ALTER TABLE t1 ADD PRIMARY KEY (f1);
...@@ -14,6 +16,7 @@ COUNT(*) = 200000 ...@@ -14,6 +16,7 @@ COUNT(*) = 200000
SELECT MAX(f1) = 199999 FROM t1; SELECT MAX(f1) = 199999 FROM t1;
MAX(f1) = 199999 MAX(f1) = 199999
1 1
connection node_1;
SELECT COUNT(*) = 200000 FROM t1; SELECT COUNT(*) = 200000 FROM t1;
COUNT(*) = 200000 COUNT(*) = 200000
1 1
...@@ -25,8 +28,10 @@ SET SESSION wsrep_on = FALSE; ...@@ -25,8 +28,10 @@ SET SESSION wsrep_on = FALSE;
ALTER TABLE t1 ADD PRIMARY KEY (f1); ALTER TABLE t1 ADD PRIMARY KEY (f1);
SET SESSION wsrep_on = TRUE; SET SESSION wsrep_on = TRUE;
SET GLOBAL wsrep_desync = FALSE; SET GLOBAL wsrep_desync = FALSE;
connection node_2;
INSERT INTO t1 (f1) VALUES (1); INSERT INTO t1 (f1) VALUES (1);
ERROR 23000: Duplicate entry '1' for key 'PRIMARY' ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
connection node_1;
INSERT INTO t1 (f1) VALUES (100); INSERT INTO t1 (f1) VALUES (100);
ERROR 23000: Duplicate entry '100' for key 'PRIMARY' ERROR 23000: Duplicate entry '100' for key 'PRIMARY'
DROP TABLE t1; DROP TABLE t1;
......
...@@ -57,6 +57,7 @@ CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; ...@@ -57,6 +57,7 @@ CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
CREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW SET NEW.f1 = 'a'; CREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW SET NEW.f1 = 'a';
--connection node_2 --connection node_2
--replace_column 7 #
SHOW CREATE TRIGGER tr1; SHOW CREATE TRIGGER tr1;
DROP TABLE t1; DROP TABLE t1;
......
...@@ -12,6 +12,16 @@ ...@@ -12,6 +12,16 @@
--source include/galera_cluster.inc --source include/galera_cluster.inc
--source include/have_innodb.inc --source include/have_innodb.inc
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
--connect node_4, 127.0.0.1, root, , test, $NODE_MYPORT_4
# Save original auto_increment_offset values.
--let $node_1=node_1
--let $node_2=node_2
--let $node_3=node_3
--let $node_4=node_4
--source include/auto_increment_offset_save.inc
SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
--connection node_1 --connection node_1
...@@ -21,11 +31,9 @@ INSERT INTO t1 VALUES (1); ...@@ -21,11 +31,9 @@ INSERT INTO t1 VALUES (1);
--connection node_2 --connection node_2
INSERT INTO t1 VALUES (2); INSERT INTO t1 VALUES (2);
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
--connection node_3 --connection node_3
INSERT INTO t1 VALUES (3); INSERT INTO t1 VALUES (3);
--connect node_4, 127.0.0.1, root, , test, $NODE_MYPORT_4
--connection node_4 --connection node_4
INSERT INTO t1 VALUES (4); INSERT INTO t1 VALUES (4);
...@@ -146,3 +154,8 @@ CALL mtr.add_suppression("Action message in non-primary configuration from membe ...@@ -146,3 +154,8 @@ CALL mtr.add_suppression("Action message in non-primary configuration from membe
--connection node_4 --connection node_4
CALL mtr.add_suppression("Action message in non-primary configuration from member 0"); CALL mtr.add_suppression("Action message in non-primary configuration from member 0");
# Restore original auto_increment_offset values.
--source include/auto_increment_offset_restore.inc
--source include/galera_end.inc
...@@ -3,3 +3,5 @@ galera_evs_suspect_timeout : TODO: investigate ...@@ -3,3 +3,5 @@ galera_evs_suspect_timeout : TODO: investigate
galera_innobackupex_backup : TODO: investigate galera_innobackupex_backup : TODO: investigate
galera_slave_options_do :MDEV-8798 galera_slave_options_do :MDEV-8798
galera_slave_options_ignore : MDEV-8798 galera_slave_options_ignore : MDEV-8798
galera_pc_bootstrap : TODO: Investigate: Timeout in wait_condition.inc
galera_pc_weight : Test times out
# On node 1 # On node 1
connection node_1;
SELECT * FROM INFORMATION_SCHEMA.WSREP_STATUS; SELECT * FROM INFORMATION_SCHEMA.WSREP_STATUS;
NODE_INDEX NODE_STATUS CLUSTER_STATUS CLUSTER_SIZE CLUSTER_STATE_UUID CLUSTER_STATE_SEQNO CLUSTER_CONF_ID GAP PROTOCOL_VERSION NODE_INDEX NODE_STATUS CLUSTER_STATUS CLUSTER_SIZE CLUSTER_STATE_UUID CLUSTER_STATE_SEQNO CLUSTER_CONF_ID GAP PROTOCOL_VERSION
<IDX> Synced Primary 2 <CLUSTER_STATE_UUID> 0 2 NO 3 <IDX> Synced Primary 2 <CLUSTER_STATE_UUID> 0 2 NO 3
...@@ -7,6 +8,7 @@ INDEX UUID NAME ADDRESS ...@@ -7,6 +8,7 @@ INDEX UUID NAME ADDRESS
<IDX> <MEMBER_ID> test-node-1 <ADDRESS> <IDX> <MEMBER_ID> test-node-1 <ADDRESS>
<IDX> <MEMBER_ID> test-node-2 <ADDRESS> <IDX> <MEMBER_ID> test-node-2 <ADDRESS>
# On node 2 # On node 2
connection node_2;
SELECT * FROM INFORMATION_SCHEMA.WSREP_STATUS; SELECT * FROM INFORMATION_SCHEMA.WSREP_STATUS;
NODE_INDEX NODE_STATUS CLUSTER_STATUS CLUSTER_SIZE CLUSTER_STATE_UUID CLUSTER_STATE_SEQNO CLUSTER_CONF_ID GAP PROTOCOL_VERSION NODE_INDEX NODE_STATUS CLUSTER_STATUS CLUSTER_SIZE CLUSTER_STATE_UUID CLUSTER_STATE_SEQNO CLUSTER_CONF_ID GAP PROTOCOL_VERSION
<IDX> Synced Primary 2 <CLUSTER_STATE_UUID> 0 2 YES 3 <IDX> Synced Primary 2 <CLUSTER_STATE_UUID> 0 2 YES 3
...@@ -14,4 +16,6 @@ SELECT * FROM INFORMATION_SCHEMA.WSREP_MEMBERSHIP ORDER BY NAME; ...@@ -14,4 +16,6 @@ SELECT * FROM INFORMATION_SCHEMA.WSREP_MEMBERSHIP ORDER BY NAME;
INDEX UUID NAME ADDRESS INDEX UUID NAME ADDRESS
<IDX> <MEMBER_ID> test-node-1 <ADDRESS> <IDX> <MEMBER_ID> test-node-1 <ADDRESS>
<IDX> <MEMBER_ID> test-node-2 <ADDRESS> <IDX> <MEMBER_ID> test-node-2 <ADDRESS>
disconnect node_2;
disconnect node_1;
# End of test # End of test
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment