diff options
Diffstat (limited to 'mysql-test/suite/galera_3nodes_sr/r')
19 files changed, 1519 insertions, 0 deletions
diff --git a/mysql-test/suite/galera_3nodes_sr/r/GCF-336.result b/mysql-test/suite/galera_3nodes_sr/r/GCF-336.result new file mode 100644 index 00000000..bb6c11ed --- /dev/null +++ b/mysql-test/suite/galera_3nodes_sr/r/GCF-336.result @@ -0,0 +1,26 @@ +CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; +SET SESSION wsrep_trx_fragment_size = 1; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES (1); +SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log; +COUNT(*) > 0 +1 +SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log; +COUNT(*) > 0 +1 +SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; +SELECT COUNT(*) > 0 FROM t1; +COUNT(*) > 0 +1 +SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1'; +SET SESSION wsrep_sync_wait=0; +INSERT INTO t1 VALUES (2); +ERROR 40001: Deadlock found when trying to get lock; try restarting transaction +COMMIT; +ERROR 08S01: WSREP has not yet prepared node for application use +SET GLOBAL wsrep_provider_options = 'gmcast.isolate=0'; +DROP TABLE t1; +CALL mtr.add_suppression("replication aborted"); +CALL mtr.add_suppression("WSREP: fragment replication failed: 3"); +CALL mtr.add_suppression("WSREP: failed to send SR rollback for "); diff --git a/mysql-test/suite/galera_3nodes_sr/r/GCF-582.result b/mysql-test/suite/galera_3nodes_sr/r/GCF-582.result new file mode 100644 index 00000000..9e2a4823 --- /dev/null +++ b/mysql-test/suite/galera_3nodes_sr/r/GCF-582.result @@ -0,0 +1,23 @@ +CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB; +SET SESSION wsrep_trx_fragment_size = 1; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (2); +INSERT INTO t1 VALUES (3); +INSERT INTO t1 VALUES (4); +INSERT INTO t1 VALUES (5); +SELECT COUNT(*) FROM mysql.wsrep_streaming_log; +COUNT(*) +5 +SELECT COUNT(*) FROM mysql.wsrep_streaming_log; +COUNT(*) +5 +COMMIT; +SELECT COUNT(*) FROM t1; +COUNT(*) +5 +SELECT COUNT(*) FROM t1; +COUNT(*) +5 +DROP TABLE t1; diff --git a/mysql-test/suite/galera_3nodes_sr/r/GCF-606.result b/mysql-test/suite/galera_3nodes_sr/r/GCF-606.result new file mode 100644 index 00000000..775f7ee0 --- /dev/null +++ b/mysql-test/suite/galera_3nodes_sr/r/GCF-606.result @@ -0,0 +1,38 @@ +connection node_2; +connection node_1; +connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2; +connection node_1; +CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; +connection node_2; +SET SESSION wsrep_trx_fragment_size = 1; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES (20); +INSERT INTO t1 VALUES (21); +INSERT INTO t1 VALUES (22); +INSERT INTO t1 VALUES (23); +INSERT INTO t1 VALUES (24); +connection node_1; +connection node_2a; +SET GLOBAL wsrep_provider_options='gmcast.isolate=1'; +SET WSREP_ON=ON; +connection node_1; +connection node_2a; +SET GLOBAL wsrep_provider_options='gmcast.isolate=0'; +connection node_1; +connection node_1; +SELECT COUNT(DISTINCT node_uuid) = 1 FROM mysql.wsrep_streaming_log; +COUNT(DISTINCT node_uuid) = 1 +0 +connection node_2; +COMMIT; +ERROR 40001: Deadlock found when trying to get lock; try restarting transaction +SELECT * FROM t1; +f1 +COMMIT; +connection node_1; +SELECT * FROM t1; +f1 +DROP TABLE t1; +connection node_2; +CALL mtr.add_suppression("WSREP: failed to send SR rollback for "); diff --git a/mysql-test/suite/galera_3nodes_sr/r/GCF-609.result b/mysql-test/suite/galera_3nodes_sr/r/GCF-609.result new file mode 100644 index 00000000..db7da93c --- /dev/null +++ b/mysql-test/suite/galera_3nodes_sr/r/GCF-609.result @@ -0,0 +1,78 @@ +connection node_2; +connection node_1; +CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB; +connection node_1; +SET SESSION wsrep_trx_fragment_size=1; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); +connection node_2; +SET SESSION wsrep_trx_fragment_size=1; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES (11),(12),(13),(14),(15),(16),(17),(18),(19),(20); +INSERT INTO t1 VALUES (11),(12),(13),(14),(15),(16),(17),(18),(19),(20); +ERROR 23000: Duplicate entry '11' for key 'PRIMARY' +INSERT INTO t1 VALUES (31),(32),(33); +SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log; +COUNT(*) = 0 +0 +connection node_1; +SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log; +COUNT(*) = 0 +0 +COMMIT; +connection node_2; +COMMIT; +SELECT * FROM t1; +f1 +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +31 +32 +33 +connection node_1; +SELECT * FROM t1; +f1 +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +31 +32 +33 +DROP TABLE t1; diff --git a/mysql-test/suite/galera_3nodes_sr/r/GCF-810A.result b/mysql-test/suite/galera_3nodes_sr/r/GCF-810A.result new file mode 100644 index 00000000..9a83ff3c --- /dev/null +++ b/mysql-test/suite/galera_3nodes_sr/r/GCF-810A.result @@ -0,0 +1,256 @@ +SET GLOBAL debug="d,crash_last_fragment_commit_before_fragment_removal"; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (f1 VARCHAR(10)) ENGINE = InnoDB; +SET AUTOCOMMIT=OFF; +SET SESSION wsrep_trx_fragment_size=1; +START TRANSACTION; +INSERT INTO t1 VALUES ('primary'),('primary'),('primary'),('primary'),('primary'); +SET AUTOCOMMIT=OFF; +SET SESSION wsrep_trx_fragment_size=1; +START TRANSACTION; +INSERT INTO t1 VALUES ('secondary'),('secondary'),('secondary'),('secondary'),('secondary'); +INSERT INTO t1 VALUES ('primary'),('primary'),('primary'),('primary'),('primary'); +INSERT INTO t1 VALUES ('secondary'),('secondary'),('secondary'),('secondary'),('secondary'); +crash_last_fragment_commit_before_fragment_removal +COMMIT; +Got one of the listed errors +SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'primary'; +COUNT(*) = 0 +1 +SELECT COUNT(DISTINCT node_uuid) = 1 FROM mysql.wsrep_streaming_log; +COUNT(DISTINCT node_uuid) = 1 +1 +SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'primary'; +COUNT(*) = 0 +1 +SELECT COUNT(DISTINCT node_uuid) = 1 FROM mysql.wsrep_streaming_log; +COUNT(DISTINCT node_uuid) = 1 +1 +COMMIT; +SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'primary'; +COUNT(*) = 0 +1 +SELECT COUNT(*) > 0 FROM t1 WHERE f1 = 'secondary'; +COUNT(*) > 0 +1 +SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'primary'; +COUNT(*) = 0 +1 +SELECT COUNT(*) > 0 FROM t1 WHERE f1 = 'secondary'; +COUNT(*) > 0 +1 +SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log; +COUNT(*) = 0 +1 +SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log; +COUNT(*) = 0 +1 +SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log; +COUNT(*) = 0 +1 +SET GLOBAL debug = ''; +SET GLOBAL debug="d,crash_last_fragment_commit_after_fragment_removal"; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (f1 VARCHAR(10)) ENGINE = InnoDB; +SET AUTOCOMMIT=OFF; +SET SESSION wsrep_trx_fragment_size=1; +START TRANSACTION; +INSERT INTO t1 VALUES ('primary'),('primary'),('primary'),('primary'),('primary'); +SET AUTOCOMMIT=OFF; +SET SESSION wsrep_trx_fragment_size=1; +START TRANSACTION; +INSERT INTO t1 VALUES ('secondary'),('secondary'),('secondary'),('secondary'),('secondary'); +INSERT INTO t1 VALUES ('primary'),('primary'),('primary'),('primary'),('primary'); +INSERT INTO t1 VALUES ('secondary'),('secondary'),('secondary'),('secondary'),('secondary'); +crash_last_fragment_commit_after_fragment_removal +COMMIT; +Got one of the listed errors +SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'primary'; +COUNT(*) = 0 +1 +SELECT COUNT(DISTINCT node_uuid) = 1 FROM mysql.wsrep_streaming_log; +COUNT(DISTINCT node_uuid) = 1 +1 +SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'primary'; +COUNT(*) = 0 +1 +SELECT COUNT(DISTINCT node_uuid) = 1 FROM mysql.wsrep_streaming_log; +COUNT(DISTINCT node_uuid) = 1 +1 +COMMIT; +SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'primary'; +COUNT(*) = 0 +1 +SELECT COUNT(*) > 0 FROM t1 WHERE f1 = 'secondary'; +COUNT(*) > 0 +1 +SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'primary'; +COUNT(*) = 0 +1 +SELECT COUNT(*) > 0 FROM t1 WHERE f1 = 'secondary'; +COUNT(*) > 0 +1 +SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log; +COUNT(*) = 0 +1 +SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log; +COUNT(*) = 0 +1 +SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log; +COUNT(*) = 0 +1 +SET GLOBAL debug = ''; +SET GLOBAL debug="d,crash_replicate_fragment_success"; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (f1 VARCHAR(10)) ENGINE = InnoDB; +SET AUTOCOMMIT=OFF; +SET SESSION wsrep_trx_fragment_size=1; +START TRANSACTION; +INSERT INTO t1 VALUES ('primary'),('primary'),('primary'),('primary'),('primary'); +SET AUTOCOMMIT=OFF; +SET SESSION wsrep_trx_fragment_size=1; +START TRANSACTION; +INSERT INTO t1 VALUES ('secondary'),('secondary'),('secondary'),('secondary'),('secondary'); +INSERT INTO t1 VALUES ('primary'),('primary'),('primary'),('primary'),('primary'); +INSERT INTO t1 VALUES ('secondary'),('secondary'),('secondary'),('secondary'),('secondary'); +crash_replicate_fragment_success +COMMIT; +Got one of the listed errors +SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'primary'; +COUNT(*) = 0 +1 +SELECT COUNT(DISTINCT node_uuid) = 1 FROM mysql.wsrep_streaming_log; +COUNT(DISTINCT node_uuid) = 1 +1 +SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'primary'; +COUNT(*) = 0 +1 +SELECT COUNT(DISTINCT node_uuid) = 1 FROM mysql.wsrep_streaming_log; +COUNT(DISTINCT node_uuid) = 1 +1 +COMMIT; +SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'primary'; +COUNT(*) = 0 +1 +SELECT COUNT(*) > 0 FROM t1 WHERE f1 = 'secondary'; +COUNT(*) > 0 +1 +SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'primary'; +COUNT(*) = 0 +1 +SELECT COUNT(*) > 0 FROM t1 WHERE f1 = 'secondary'; +COUNT(*) > 0 +1 +SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log; +COUNT(*) = 0 +1 +SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log; +COUNT(*) = 0 +1 +SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log; +COUNT(*) = 0 +1 +SET GLOBAL debug = ''; +SET GLOBAL debug="d,crash_replicate_fragment_after_certify"; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (f1 VARCHAR(10)) ENGINE = InnoDB; +SET AUTOCOMMIT=OFF; +SET SESSION wsrep_trx_fragment_size=1; +START TRANSACTION; +INSERT INTO t1 VALUES ('primary'),('primary'),('primary'),('primary'),('primary'); +SET AUTOCOMMIT=OFF; +SET SESSION wsrep_trx_fragment_size=1; +START TRANSACTION; +INSERT INTO t1 VALUES ('secondary'),('secondary'),('secondary'),('secondary'),('secondary'); +INSERT INTO t1 VALUES ('primary'),('primary'),('primary'),('primary'),('primary'); +INSERT INTO t1 VALUES ('secondary'),('secondary'),('secondary'),('secondary'),('secondary'); +crash_replicate_fragment_after_certify +COMMIT; +Got one of the listed errors +SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'primary'; +COUNT(*) = 0 +1 +SELECT COUNT(DISTINCT node_uuid) = 1 FROM mysql.wsrep_streaming_log; +COUNT(DISTINCT node_uuid) = 1 +1 +SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'primary'; +COUNT(*) = 0 +1 +SELECT COUNT(DISTINCT node_uuid) = 1 FROM mysql.wsrep_streaming_log; +COUNT(DISTINCT node_uuid) = 1 +1 +COMMIT; +SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'primary'; +COUNT(*) = 0 +1 +SELECT COUNT(*) > 0 FROM t1 WHERE f1 = 'secondary'; +COUNT(*) > 0 +1 +SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'primary'; +COUNT(*) = 0 +1 +SELECT COUNT(*) > 0 FROM t1 WHERE f1 = 'secondary'; +COUNT(*) > 0 +1 +SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log; +COUNT(*) = 0 +1 +SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log; +COUNT(*) = 0 +1 +SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log; +COUNT(*) = 0 +1 +SET GLOBAL debug = ''; +SET GLOBAL debug="d,crash_replicate_fragment_before_certify"; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (f1 VARCHAR(10)) ENGINE = InnoDB; +SET AUTOCOMMIT=OFF; +SET SESSION wsrep_trx_fragment_size=1; +START TRANSACTION; +INSERT INTO t1 VALUES ('primary'),('primary'),('primary'),('primary'),('primary'); +SET AUTOCOMMIT=OFF; +SET SESSION wsrep_trx_fragment_size=1; +START TRANSACTION; +INSERT INTO t1 VALUES ('secondary'),('secondary'),('secondary'),('secondary'),('secondary'); +INSERT INTO t1 VALUES ('primary'),('primary'),('primary'),('primary'),('primary'); +INSERT INTO t1 VALUES ('secondary'),('secondary'),('secondary'),('secondary'),('secondary'); +crash_replicate_fragment_before_certify +COMMIT; +Got one of the listed errors +SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'primary'; +COUNT(*) = 0 +1 +SELECT COUNT(DISTINCT node_uuid) = 1 FROM mysql.wsrep_streaming_log; +COUNT(DISTINCT node_uuid) = 1 +1 +SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'primary'; +COUNT(*) = 0 +1 +SELECT COUNT(DISTINCT node_uuid) = 1 FROM mysql.wsrep_streaming_log; +COUNT(DISTINCT node_uuid) = 1 +1 +COMMIT; +SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'primary'; +COUNT(*) = 0 +1 +SELECT COUNT(*) > 0 FROM t1 WHERE f1 = 'secondary'; +COUNT(*) > 0 +1 +SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'primary'; +COUNT(*) = 0 +1 +SELECT COUNT(*) > 0 FROM t1 WHERE f1 = 'secondary'; +COUNT(*) > 0 +1 +SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log; +COUNT(*) = 0 +1 +SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log; +COUNT(*) = 0 +1 +SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log; +COUNT(*) = 0 +1 +SET GLOBAL debug = ''; +DROP TABLE t1; diff --git a/mysql-test/suite/galera_3nodes_sr/r/GCF-810B.result b/mysql-test/suite/galera_3nodes_sr/r/GCF-810B.result new file mode 100644 index 00000000..bbec3531 --- /dev/null +++ b/mysql-test/suite/galera_3nodes_sr/r/GCF-810B.result @@ -0,0 +1,100 @@ +SET GLOBAL debug="d,crash_apply_cb_before_append_frag"; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (f1 VARCHAR(10)) ENGINE = InnoDB; +SET AUTOCOMMIT=OFF; +SET SESSION wsrep_trx_fragment_size=1; +START TRANSACTION; +INSERT INTO t1 VALUES ('secondary'),('secondary'),('secondary'),('secondary'),('secondary'); +SET AUTOCOMMIT=OFF; +SET SESSION wsrep_trx_fragment_size=1; +START TRANSACTION; +INSERT INTO t1 VALUES ('primary'),('primary'),('primary'),('primary'),('primary'); +INSERT INTO t1 VALUES ('secondary'),('secondary'),('secondary'),('secondary'),('secondary'); +INSERT INTO t1 VALUES ('primary'),('primary'),('primary'),('primary'),('primary'); +COMMIT; +SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'secondary'; +COUNT(*) = 0 +1 +SELECT COUNT(DISTINCT node_uuid) = 1 FROM mysql.wsrep_streaming_log; +COUNT(DISTINCT node_uuid) = 1 +1 +SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'secondary'; +COUNT(*) = 0 +1 +SELECT COUNT(DISTINCT node_uuid) = 1 FROM mysql.wsrep_streaming_log; +COUNT(DISTINCT node_uuid) = 1 +1 +COMMIT; +SELECT COUNT(*) > 0 FROM t1 WHERE f1 = 'primary'; +COUNT(*) > 0 +1 +SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'secondary'; +COUNT(*) = 0 +1 +SELECT COUNT(*) > 0 FROM t1 WHERE f1 = 'primary'; +COUNT(*) > 0 +1 +SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'secondary'; +COUNT(*) = 0 +1 +SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log; +COUNT(*) = 0 +1 +SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log; +COUNT(*) = 0 +1 +SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log; +COUNT(*) = 0 +1 +SET GLOBAL debug = ''; +SET GLOBAL debug="d,crash_apply_cb_after_append_frag"; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (f1 VARCHAR(10)) ENGINE = InnoDB; +SET AUTOCOMMIT=OFF; +SET SESSION wsrep_trx_fragment_size=1; +START TRANSACTION; +INSERT INTO t1 VALUES ('secondary'),('secondary'),('secondary'),('secondary'),('secondary'); +SET AUTOCOMMIT=OFF; +SET SESSION wsrep_trx_fragment_size=1; +START TRANSACTION; +INSERT INTO t1 VALUES ('primary'),('primary'),('primary'),('primary'),('primary'); +INSERT INTO t1 VALUES ('secondary'),('secondary'),('secondary'),('secondary'),('secondary'); +INSERT INTO t1 VALUES ('primary'),('primary'),('primary'),('primary'),('primary'); +COMMIT; +SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'secondary'; +COUNT(*) = 0 +1 +SELECT COUNT(DISTINCT node_uuid) = 1 FROM mysql.wsrep_streaming_log; +COUNT(DISTINCT node_uuid) = 1 +1 +SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'secondary'; +COUNT(*) = 0 +1 +SELECT COUNT(DISTINCT node_uuid) = 1 FROM mysql.wsrep_streaming_log; +COUNT(DISTINCT node_uuid) = 1 +1 +COMMIT; +SELECT COUNT(*) > 0 FROM t1 WHERE f1 = 'primary'; +COUNT(*) > 0 +1 +SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'secondary'; +COUNT(*) = 0 +1 +SELECT COUNT(*) > 0 FROM t1 WHERE f1 = 'primary'; +COUNT(*) > 0 +1 +SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'secondary'; +COUNT(*) = 0 +1 +SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log; +COUNT(*) = 0 +1 +SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log; +COUNT(*) = 0 +1 +SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log; +COUNT(*) = 0 +1 +SET GLOBAL debug = ''; +CALL mtr.add_suppression("WSREP: Action message in non-primary configuration from member"); +DROP TABLE t1; diff --git a/mysql-test/suite/galera_3nodes_sr/r/GCF-810C.result b/mysql-test/suite/galera_3nodes_sr/r/GCF-810C.result new file mode 100644 index 00000000..1a6dcbfd --- /dev/null +++ b/mysql-test/suite/galera_3nodes_sr/r/GCF-810C.result @@ -0,0 +1,177 @@ +SET GLOBAL debug="d,crash_commit_cb_last_fragment_commit_success"; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (f1 VARCHAR(10)) ENGINE = InnoDB; +SET AUTOCOMMIT=OFF; +SET SESSION wsrep_trx_fragment_size=1; +START TRANSACTION; +INSERT INTO t1 VALUES ('secondary'),('secondary'),('secondary'),('secondary'),('secondary'); +SET SESSION wsrep_trx_fragment_size=1; +INSERT INTO t1 VALUES ('primary'),('primary'),('primary'),('primary'),('primary'),('primary'),('primary'),('primary'),('primary'),('primary'); +SELECT 1 FROM t1; +Got one of the listed errors +SELECT * FROM mysql.wsrep_streaming_log; +node_uuid trx_id seqno flags frag +SELECT COUNT(*) > 0 FROM t1 WHERE f1 = 'primary'; +COUNT(*) > 0 +1 +SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'secondary'; +COUNT(*) = 0 +1 +SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log; +COUNT(*) = 0 +1 +SELECT * FROM mysql.wsrep_streaming_log; +node_uuid trx_id seqno flags frag +SELECT COUNT(*) > 0 FROM t1 WHERE f1 = 'primary'; +COUNT(*) > 0 +1 +SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'secondary'; +COUNT(*) = 0 +1 +SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log; +COUNT(*) = 0 +1 +SELECT * FROM mysql.wsrep_streaming_log; +node_uuid trx_id seqno flags frag +SELECT COUNT(*) > 0 FROM t1 WHERE f1 = 'primary'; +COUNT(*) > 0 +1 +SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'secondary'; +COUNT(*) = 0 +1 +SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log; +COUNT(*) = 0 +1 +SET GLOBAL debug="d,crash_commit_cb_before_last_fragment_commit"; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (f1 VARCHAR(10)) ENGINE = InnoDB; +SET AUTOCOMMIT=OFF; +SET SESSION wsrep_trx_fragment_size=1; +START TRANSACTION; +INSERT INTO t1 VALUES ('secondary'),('secondary'),('secondary'),('secondary'),('secondary'); +SET SESSION wsrep_trx_fragment_size=1; +INSERT INTO t1 VALUES ('primary'),('primary'),('primary'),('primary'),('primary'),('primary'),('primary'),('primary'),('primary'),('primary'); +SELECT 1 FROM t1; +Got one of the listed errors +SELECT * FROM mysql.wsrep_streaming_log; +node_uuid trx_id seqno flags frag +SELECT COUNT(*) > 0 FROM t1 WHERE f1 = 'primary'; +COUNT(*) > 0 +1 +SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'secondary'; +COUNT(*) = 0 +1 +SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log; +COUNT(*) = 0 +1 +SELECT * FROM mysql.wsrep_streaming_log; +node_uuid trx_id seqno flags frag +SELECT COUNT(*) > 0 FROM t1 WHERE f1 = 'primary'; +COUNT(*) > 0 +1 +SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'secondary'; +COUNT(*) = 0 +1 +SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log; +COUNT(*) = 0 +1 +SELECT * FROM mysql.wsrep_streaming_log; +node_uuid trx_id seqno flags frag +SELECT COUNT(*) > 0 FROM t1 WHERE f1 = 'primary'; +COUNT(*) > 0 +1 +SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'secondary'; +COUNT(*) = 0 +1 +SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log; +COUNT(*) = 0 +1 +SET GLOBAL debug="d,crash_apply_cb_after_fragment_removal"; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (f1 VARCHAR(10)) ENGINE = InnoDB; +SET AUTOCOMMIT=OFF; +SET SESSION wsrep_trx_fragment_size=1; +START TRANSACTION; +INSERT INTO t1 VALUES ('secondary'),('secondary'),('secondary'),('secondary'),('secondary'); +SET SESSION wsrep_trx_fragment_size=1; +INSERT INTO t1 VALUES ('primary'),('primary'),('primary'),('primary'),('primary'),('primary'),('primary'),('primary'),('primary'),('primary'); +SELECT 1 FROM t1; +Got one of the listed errors +SELECT * FROM mysql.wsrep_streaming_log; +node_uuid trx_id seqno flags frag +SELECT COUNT(*) > 0 FROM t1 WHERE f1 = 'primary'; +COUNT(*) > 0 +1 +SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'secondary'; +COUNT(*) = 0 +1 +SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log; +COUNT(*) = 0 +1 +SELECT * FROM mysql.wsrep_streaming_log; +node_uuid trx_id seqno flags frag +SELECT COUNT(*) > 0 FROM t1 WHERE f1 = 'primary'; +COUNT(*) > 0 +1 +SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'secondary'; +COUNT(*) = 0 +1 +SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log; +COUNT(*) = 0 +1 +SELECT * FROM mysql.wsrep_streaming_log; +node_uuid trx_id seqno flags frag +SELECT COUNT(*) > 0 FROM t1 WHERE f1 = 'primary'; +COUNT(*) > 0 +1 +SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'secondary'; +COUNT(*) = 0 +1 +SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log; +COUNT(*) = 0 +1 +SET GLOBAL debug="d,crash_apply_cb_before_fragment_removal"; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (f1 VARCHAR(10)) ENGINE = InnoDB; +SET AUTOCOMMIT=OFF; +SET SESSION wsrep_trx_fragment_size=1; +START TRANSACTION; +INSERT INTO t1 VALUES ('secondary'),('secondary'),('secondary'),('secondary'),('secondary'); +SET SESSION wsrep_trx_fragment_size=1; +INSERT INTO t1 VALUES ('primary'),('primary'),('primary'),('primary'),('primary'),('primary'),('primary'),('primary'),('primary'),('primary'); +SELECT 1 FROM t1; +Got one of the listed errors +SELECT * FROM mysql.wsrep_streaming_log; +node_uuid trx_id seqno flags frag +SELECT COUNT(*) > 0 FROM t1 WHERE f1 = 'primary'; +COUNT(*) > 0 +1 +SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'secondary'; +COUNT(*) = 0 +1 +SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log; +COUNT(*) = 0 +1 +SELECT * FROM mysql.wsrep_streaming_log; +node_uuid trx_id seqno flags frag +SELECT COUNT(*) > 0 FROM t1 WHERE f1 = 'primary'; +COUNT(*) > 0 +1 +SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'secondary'; +COUNT(*) = 0 +1 +SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log; +COUNT(*) = 0 +1 +SELECT * FROM mysql.wsrep_streaming_log; +node_uuid trx_id seqno flags frag +SELECT COUNT(*) > 0 FROM t1 WHERE f1 = 'primary'; +COUNT(*) > 0 +1 +SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 'secondary'; +COUNT(*) = 0 +1 +SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log; +COUNT(*) = 0 +1 +DROP TABLE t1; diff --git a/mysql-test/suite/galera_3nodes_sr/r/GCF-817.result b/mysql-test/suite/galera_3nodes_sr/r/GCF-817.result new file mode 100644 index 00000000..4eb0ebca --- /dev/null +++ b/mysql-test/suite/galera_3nodes_sr/r/GCF-817.result @@ -0,0 +1,54 @@ +connection node_2; +connection node_1; +connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3; +connection node_1; +connection node_2; +connection node_3; +connection node_1; +CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; +SET SESSION wsrep_trx_fragment_size = 1; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (2); +INSERT INTO t1 VALUES (3); +INSERT INTO t1 VALUES (4); +INSERT INTO t1 VALUES (5); +INSERT INTO t1 VALUES (6); +INSERT INTO t1 VALUES (7); +connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1; +SET SESSION wsrep_sync_wait = 0; +SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log; +COUNT(*) > 0 +1 +connection node_2; +connection node_1a; +SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1'; +SET SESSION wsrep_on = OFF; +SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log; +COUNT(*) > 0 +1 +connection node_2; +connection node_3; +connection node_1a; +connection node_1a; +SET GLOBAL wsrep_provider_options = 'gmcast.isolate=0'; +connection node_3; +connection node_1a; +connection node_2; +SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log; +COUNT(*) = 0 +1 +connection node_1; +COMMIT; +ERROR 40001: Deadlock found when trying to get lock; try restarting transaction +connection node_1a; +SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log; +COUNT(*) = 0 +1 +connection node_2; +SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log; +COUNT(*) = 0 +1 +connection node_2; +DROP TABLE t1; diff --git a/mysql-test/suite/galera_3nodes_sr/r/GCF-832.result b/mysql-test/suite/galera_3nodes_sr/r/GCF-832.result new file mode 100644 index 00000000..8333fff9 --- /dev/null +++ b/mysql-test/suite/galera_3nodes_sr/r/GCF-832.result @@ -0,0 +1,25 @@ +connection node_2; +connection node_1; +connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3; +connection node_1; +connection node_2; +connection node_3; +connection node_2; +SET GLOBAL debug_dbug="d,crash_last_fragment_commit_after_fragment_removal"; +CREATE TABLE t1 (f1 VARCHAR(30)) ENGINE=InnoDB; +SET AUTOCOMMIT=OFF; +SET SESSION wsrep_trx_fragment_size=1; +START TRANSACTION; +INSERT INTO t1 VALUES ('primary'),('primary'),('primary'),('primary'),('primary'); +COMMIT; +ERROR HY000: Lost connection to MySQL server during query +# restart +connection node_1; +SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log; +COUNT(*) = 0 +1 +connection node_2; +SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log; +COUNT(*) = 0 +1 +DROP TABLE t1; diff --git a/mysql-test/suite/galera_3nodes_sr/r/galera_sr_isolate_master.result b/mysql-test/suite/galera_3nodes_sr/r/galera_sr_isolate_master.result new file mode 100644 index 00000000..bb4eb829 --- /dev/null +++ b/mysql-test/suite/galera_3nodes_sr/r/galera_sr_isolate_master.result @@ -0,0 +1,80 @@ +connection node_2; +connection node_1; +connection node_1; +CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; +SET SESSION wsrep_trx_fragment_size = 1; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (2); +INSERT INTO t1 VALUES (3); +INSERT INTO t1 VALUES (4); +INSERT INTO t1 VALUES (5); +SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log; +COUNT(*) > 0 +1 +connection node_2; +SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; +SELECT COUNT(*) > 0 FROM t1; +COUNT(*) > 0 +1 +connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1; +connection node_1a; +SET GLOBAL wsrep_provider_options='gmcast.isolate=1'; +connection node_2; +connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3; +connection node_2; +SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; +SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log; +COUNT(*) = 0 +1 +SELECT COUNT(*) = 0 FROM t1; +COUNT(*) = 0 +1 +connection node_3; +SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; +SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log; +COUNT(*) = 0 +1 +SELECT COUNT(*) = 0 FROM t1; +COUNT(*) = 0 +1 +connection node_1a; +SET GLOBAL wsrep_provider_options='gmcast.isolate=0'; +connection node_2; +connection node_3; +connection node_1a; +connection node_1; +COMMIT; +ERROR 40001: Deadlock found when trying to get lock; try restarting transaction +SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; +SELECT COUNT(*) = 0 FROM t1; +COUNT(*) = 0 +1 +SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log; +COUNT(*) = 0 +1 +START TRANSACTION; +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (2); +INSERT INTO t1 VALUES (3); +INSERT INTO t1 VALUES (4); +INSERT INTO t1 VALUES (5); +COMMIT; +connection node_2; +SELECT COUNT(*) = 5 FROM t1; +COUNT(*) = 5 +1 +SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log; +COUNT(*) = 0 +1 +connection node_3; +SELECT COUNT(*) = 5 FROM t1; +COUNT(*) = 5 +1 +SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log; +COUNT(*) = 0 +1 +connection node_1; +CALL mtr.add_suppression("failed to send SR rollback for"); +DROP TABLE t1; diff --git a/mysql-test/suite/galera_3nodes_sr/r/galera_sr_join_slave.result b/mysql-test/suite/galera_3nodes_sr/r/galera_sr_join_slave.result new file mode 100644 index 00000000..dbdd95f8 --- /dev/null +++ b/mysql-test/suite/galera_3nodes_sr/r/galera_sr_join_slave.result @@ -0,0 +1,40 @@ +connection node_2; +connection node_1; +connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3; +connection node_1; +connection node_1; +connection node_2; +connection node_3; +CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB; +connection node_2; +connection node_1; +SET SESSION wsrep_trx_fragment_size = 1; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (2); +INSERT INTO t1 VALUES (3); +INSERT INTO t1 VALUES (4); +INSERT INTO t1 VALUES (5); +connection node_2; +# restart +connection node_1; +INSERT INTO t1 VALUES (6); +INSERT INTO t1 VALUES (7); +INSERT INTO t1 VALUES (8); +INSERT INTO t1 VALUES (9); +INSERT INTO t1 VALUES (10); +COMMIT; +SELECT COUNT(*) = 10 FROM t1; +COUNT(*) = 10 +1 +connection node_2; +SELECT COUNT(*) = 10 FROM t1; +COUNT(*) = 10 +1 +connection node_3; +SELECT COUNT(*) = 10 FROM t1; +COUNT(*) = 10 +1 +connection node_1; +DROP TABLE t1; diff --git a/mysql-test/suite/galera_3nodes_sr/r/galera_sr_kill_master.result b/mysql-test/suite/galera_3nodes_sr/r/galera_sr_kill_master.result new file mode 100644 index 00000000..4547d06d --- /dev/null +++ b/mysql-test/suite/galera_3nodes_sr/r/galera_sr_kill_master.result @@ -0,0 +1,34 @@ +connection node_2; +connection node_1; +connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3; +connection node_1; +connection node_2; +connection node_3; +connection node_2; +CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB; +SET SESSION wsrep_trx_fragment_size = 1; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (2); +INSERT INTO t1 VALUES (3); +INSERT INTO t1 VALUES (4); +INSERT INTO t1 VALUES (5); +connection node_3; +SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; +connection node_2; +Killing server ... +connection node_3; +SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log; +COUNT(*) = 0 +1 +INSERT INTO t1 VALUES (1); +connection node_2; +# restart +SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log; +COUNT(*) = 0 +1 +SELECT COUNT(*) = 1 FROM t1; +COUNT(*) = 1 +1 +DROP TABLE t1; diff --git a/mysql-test/suite/galera_3nodes_sr/r/galera_sr_kill_slave_after_apply.result b/mysql-test/suite/galera_3nodes_sr/r/galera_sr_kill_slave_after_apply.result new file mode 100644 index 00000000..db04c24b --- /dev/null +++ b/mysql-test/suite/galera_3nodes_sr/r/galera_sr_kill_slave_after_apply.result @@ -0,0 +1,54 @@ +connection node_2; +connection node_1; +connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3; +connection node_1; +connection node_2; +connection node_3; +connection node_1; +SET SESSION wsrep_trx_fragment_size = 1; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (2); +INSERT INTO t1 VALUES (3); +INSERT INTO t1 VALUES (4); +INSERT INTO t1 VALUES (5); +connection node_2; +SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; +Killing server ... +connection node_1; +INSERT INTO t1 VALUES (6); +INSERT INTO t1 VALUES (7); +INSERT INTO t1 VALUES (8); +INSERT INTO t1 VALUES (9); +INSERT INTO t1 VALUES (10); +connection node_2; +# restart +connection node_1; +INSERT INTO t1 VALUES (11); +INSERT INTO t1 VALUES (12); +INSERT INTO t1 VALUES (13); +INSERT INTO t1 VALUES (14); +INSERT INTO t1 VALUES (15); +connection node_2; +SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; +SELECT COUNT(*) = 15 FROM mysql.wsrep_streaming_log; +COUNT(*) = 15 +1 +connection node_1; +COMMIT; +SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log; +COUNT(*) = 0 +1 +connection node_2; +SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED; +SELECT COUNT(*) = 15 FROM t1; +COUNT(*) = 15 +1 +SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log; +COUNT(*) = 0 +1 +DROP TABLE t1; +connection node_3; +CALL mtr.add_suppression("WSREP: Action message in non-primary configuration from member"); diff --git a/mysql-test/suite/galera_3nodes_sr/r/galera_sr_kill_slave_after_apply_rollback.result b/mysql-test/suite/galera_3nodes_sr/r/galera_sr_kill_slave_after_apply_rollback.result new file mode 100644 index 00000000..ff9215cf --- /dev/null +++ b/mysql-test/suite/galera_3nodes_sr/r/galera_sr_kill_slave_after_apply_rollback.result @@ -0,0 +1,59 @@ +connection node_2; +connection node_1; +connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3; +connection node_1; +connection node_2; +connection node_3; +connection node_1; +SET SESSION wsrep_trx_fragment_size = 1; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (2); +INSERT INTO t1 VALUES (3); +INSERT INTO t1 VALUES (4); +INSERT INTO t1 VALUES (5); +connection node_2; +SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; +Killing server ... +connection node_1; +INSERT INTO t1 VALUES (6); +INSERT INTO t1 VALUES (7); +INSERT INTO t1 VALUES (8); +INSERT INTO t1 VALUES (9); +INSERT INTO t1 VALUES (10); +connection node_2; +# restart +connection node_1; +INSERT INTO t1 VALUES (11); +INSERT INTO t1 VALUES (12); +INSERT INTO t1 VALUES (13); +INSERT INTO t1 VALUES (14); +INSERT INTO t1 VALUES (15); +connection node_2; +SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; +SELECT COUNT(*) = 15 FROM mysql.wsrep_streaming_log; +COUNT(*) = 15 +1 +connection node_1; +ROLLBACK; +SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log; +COUNT(*) = 0 +1 +connection node_2; +SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; +SELECT COUNT(*) = 0 FROM t1; +COUNT(*) = 0 +1 +SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log; +COUNT(*) = 0 +1 +SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED; +SELECT COUNT(*) = 0 FROM t1; +COUNT(*) = 0 +1 +SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log; +COUNT(*) = 0 +1 +DROP TABLE t1; diff --git a/mysql-test/suite/galera_3nodes_sr/r/galera_sr_kill_slave_after_apply_rollback2.result b/mysql-test/suite/galera_3nodes_sr/r/galera_sr_kill_slave_after_apply_rollback2.result new file mode 100644 index 00000000..21e301ed --- /dev/null +++ b/mysql-test/suite/galera_3nodes_sr/r/galera_sr_kill_slave_after_apply_rollback2.result @@ -0,0 +1,31 @@ +SET SESSION wsrep_trx_fragment_size = 1; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (2); +INSERT INTO t1 VALUES (3); +INSERT INTO t1 VALUES (4); +INSERT INTO t1 VALUES (5); +SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; +Killing server ... +INSERT INTO t1 VALUES (6); +ROLLBACK; +SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log; +COUNT(*) = 0 +1 +SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; +SELECT COUNT(*) = 0 FROM t1; +COUNT(*) = 0 +1 +SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log; +COUNT(*) = 0 +1 +SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED; +SELECT COUNT(*) = 0 FROM t1; +COUNT(*) = 0 +1 +SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log; +COUNT(*) = 0 +1 +DROP TABLE t1; diff --git a/mysql-test/suite/galera_3nodes_sr/r/galera_sr_kill_slave_before_apply.result b/mysql-test/suite/galera_3nodes_sr/r/galera_sr_kill_slave_before_apply.result new file mode 100644 index 00000000..e9dc5518 --- /dev/null +++ b/mysql-test/suite/galera_3nodes_sr/r/galera_sr_kill_slave_before_apply.result @@ -0,0 +1,45 @@ +connection node_2; +connection node_1; +connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3; +connection node_1; +connection node_2; +connection node_3; +connection node_1; +CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB; +connection node_2; +SELECT COUNT(*) = 0 FROM t1; +COUNT(*) = 0 +1 +connection node_1; +CREATE TABLE t2 (f1 INTEGER); +connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2; +LOCK TABLE t2 WRITE; +connection node_1; +INSERT INTO t2 VALUES (1); +connection node_2; +SET SESSION wsrep_sync_wait = 0; +connection node_1; +SET SESSION wsrep_trx_fragment_size = 1; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (2); +INSERT INTO t1 VALUES (3); +INSERT INTO t1 VALUES (4); +INSERT INTO t1 VALUES (5); +connection node_2; +Killing server ... +# restart +connection node_1; +COMMIT; +SELECT COUNT(*) = 5 FROM t1; +COUNT(*) = 5 +1 +connection node_2; +SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED; +SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log; +COUNT(*) = 0 +1 +connection node_1; +DROP TABLE t1; +DROP TABLE t2; diff --git a/mysql-test/suite/galera_3nodes_sr/r/galera_sr_threeway_split.result b/mysql-test/suite/galera_3nodes_sr/r/galera_sr_threeway_split.result new file mode 100644 index 00000000..1a50bace --- /dev/null +++ b/mysql-test/suite/galera_3nodes_sr/r/galera_sr_threeway_split.result @@ -0,0 +1,117 @@ +connection node_2; +connection node_1; +connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3; +connection node_1; +connection node_2; +connection node_3; +connection node_1; +CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB; +SET SESSION wsrep_trx_fragment_size = 1; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES (10); +INSERT INTO t1 VALUES (11); +INSERT INTO t1 VALUES (12); +INSERT INTO t1 VALUES (13); +INSERT INTO t1 VALUES (14); +SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log; +COUNT(*) > 0 +1 +connection node_2; +SET SESSION wsrep_trx_fragment_size = 1; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES (200); +INSERT INTO t1 VALUES (201); +INSERT INTO t1 VALUES (202); +INSERT INTO t1 VALUES (203); +INSERT INTO t1 VALUES (204); +connection node_3; +SET SESSION wsrep_trx_fragment_size = 1; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES (300); +INSERT INTO t1 VALUES (301); +INSERT INTO t1 VALUES (302); +INSERT INTO t1 VALUES (303); +INSERT INTO t1 VALUES (304); +connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1; +connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2; +connect node_3a, 127.0.0.1, root, , test, $NODE_MYPORT_3; +connection node_1a; +connection node_2a; +SET GLOBAL wsrep_provider_options='gmcast.isolate=1'; +connection node_3a; +SET GLOBAL wsrep_provider_options='gmcast.isolate=1'; +connection node_1a; +INSERT INTO t1 VALUES (20); +INSERT INTO t1 VALUES (21); +INSERT INTO t1 VALUES (22); +INSERT INTO t1 VALUES (23); +INSERT INTO t1 VALUES (24); +connection node_2a; +SET SESSION wsrep_on = ON; +SET SESSION wsrep_sync_wait = 15; +SET GLOBAL wsrep_provider_options='gmcast.isolate=0'; +connection node_3a; +SET SESSION wsrep_on = ON; +SET SESSION wsrep_sync_wait = 15; +SET GLOBAL wsrep_provider_options='gmcast.isolate=0'; +connection node_1a; +connection node_2a; +connection node_3a; +connection node_2; +COMMIT; +ERROR 40001: Deadlock found when trying to get lock; try restarting transaction +SELECT COUNT(DISTINCT node_uuid) = 1 FROM mysql.wsrep_streaming_log; +COUNT(DISTINCT node_uuid) = 1 +1 +wsrep_gcomm_uuid_match +1 +connection node_3; +COMMIT; +ERROR 40001: Deadlock found when trying to get lock; try restarting transaction +SELECT COUNT(DISTINCT node_uuid) = 1 FROM mysql.wsrep_streaming_log; +COUNT(DISTINCT node_uuid) = 1 +1 +wsrep_gcomm_uuid_match +1 +connection node_1; +INSERT INTO t1 VALUES (30); +INSERT INTO t1 VALUES (31); +INSERT INTO t1 VALUES (32); +INSERT INTO t1 VALUES (33); +INSERT INTO t1 VALUES (34); +COMMIT; +SELECT COUNT(*) = 15, MIN(f1) = 10, MAX(f1) = 34 FROM t1; +COUNT(*) = 15 MIN(f1) = 10 MAX(f1) = 34 +1 1 1 +SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log; +COUNT(*) = 0 +1 +SET AUTOCOMMIT=ON; +connection node_2; +COMMIT; +SELECT COUNT(*) = 15, MIN(f1) = 10, MAX(f1) = 34 FROM t1; +COUNT(*) = 15 MIN(f1) = 10 MAX(f1) = 34 +1 1 1 +SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log; +COUNT(*) = 0 +1 +SET AUTOCOMMIT=ON; +connection node_3; +COMMIT; +SELECT COUNT(*) = 15, MIN(f1) = 10, MAX(f1) = 34 FROM t1; +COUNT(*) = 15 MIN(f1) = 10 MAX(f1) = 34 +1 1 1 +SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log; +COUNT(*) = 0 +1 +SET AUTOCOMMIT=ON; +DROP TABLE t1; +connection node_1; +CALL mtr.add_suppression("WSREP: failed to send SR rollback for "); +connection node_2; +CALL mtr.add_suppression("WSREP: failed to send SR rollback for "); +connection node_3; +CALL mtr.add_suppression("WSREP: failed to send SR rollback for "); diff --git a/mysql-test/suite/galera_3nodes_sr/r/galera_sr_threeway_split_no_primary.result b/mysql-test/suite/galera_3nodes_sr/r/galera_sr_threeway_split_no_primary.result new file mode 100644 index 00000000..c634bac9 --- /dev/null +++ b/mysql-test/suite/galera_3nodes_sr/r/galera_sr_threeway_split_no_primary.result @@ -0,0 +1,85 @@ +connection node_2; +connection node_1; +connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1; +connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2; +connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3; +connect node_3a, 127.0.0.1, root, , test, $NODE_MYPORT_3; +connection node_1; +connection node_2; +connection node_3; +connection node_1; +CREATE TABLE t1 (f1 INTEGER PRIMARY KEY); +SET SESSION wsrep_trx_fragment_size=1; +BEGIN; +INSERT INTO t1 VALUES (11); +INSERT INTO t1 VALUES (12); +connection node_2; +SET SESSION wsrep_trx_fragment_size=1; +BEGIN; +INSERT INTO t1 VALUES (21); +INSERT INTO t1 VALUES (22); +connection node_3; +SET SESSION wsrep_trx_fragment_size=1; +BEGIN; +INSERT INTO t1 VALUES (31); +INSERT INTO t1 VALUES (32); +connection node_2a; +SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 1'; +connection node_3a; +SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 1'; +connection node_1a; +SET SESSION wsrep_sync_wait = 0; +SHOW STATUS LIKE 'wsrep_cluster_status'; +Variable_name Value +wsrep_cluster_status non-Primary +SET SESSION wsrep_sync_wait = DEFAULT; +connection node_2a; +SET SESSION wsrep_sync_wait = 0; +SHOW STATUS LIKE 'wsrep_cluster_status'; +Variable_name Value +wsrep_cluster_status non-Primary +SET SESSION wsrep_sync_wait = DEFAULT; +connection node_3a; +SET SESSION wsrep_sync_wait = 0; +SHOW STATUS LIKE 'wsrep_cluster_status'; +Variable_name Value +wsrep_cluster_status non-Primary +SET SESSION wsrep_sync_wait = DEFAULT; +connection node_2a; +SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 0'; +connection node_3a; +SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 0'; +connection node_1a; +connection node_2a; +connection node_3a; +connection node_1a; +SELECT COUNT(*) `expect 0` FROM mysql.wsrep_streaming_log; +expect 0 +0 +INSERT INTO t1 VALUES(11); +INSERT INTO t1 VALUES(21); +INSERT INTO t1 VALUES(31); +SELECT * FROM t1; +f1 +11 +21 +31 +connection node_2a; +SELECT COUNT(*) `expect 0` FROM mysql.wsrep_streaming_log; +expect 0 +0 +connection node_3a; +SELECT COUNT(*) `expect 0` FROM mysql.wsrep_streaming_log; +expect 0 +0 +connection node_1; +INSERT INTO t1 VALUES(103); +ERROR 40001: Deadlock found when trying to get lock; try restarting transaction +connection node_2; +INSERT INTO t1 VALUES(203); +ERROR 40001: Deadlock found when trying to get lock; try restarting transaction +connection node_3; +INSERT INTO t1 VALUES(303); +ERROR 40001: Deadlock found when trying to get lock; try restarting transaction +connection node_1; +DROP TABLE t1; diff --git a/mysql-test/suite/galera_3nodes_sr/r/galera_vote_sr.result b/mysql-test/suite/galera_3nodes_sr/r/galera_vote_sr.result new file mode 100644 index 00000000..678cfe4c --- /dev/null +++ b/mysql-test/suite/galera_3nodes_sr/r/galera_vote_sr.result @@ -0,0 +1,197 @@ +connection node_2; +connection node_1; +connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3; +connection node_1; +connection node_2; +connection node_3; +Inconsistency on the first fragment +connection node_1; +CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 BLOB) ENGINE=InnoDB; +connection node_2; +SET SESSION wsrep_on=OFF; +INSERT INTO t1 VALUES (1, 'X'); +SET SESSION wsrep_on=ON; +DELETE FROM t1 WHERE f1 = 2; +connection node_1; +SET AUTOCOMMIT=OFF; +SET SESSION wsrep_trx_fragment_size = 16384; +START TRANSACTION; +INSERT INTO t1 VALUES (1, REPEAT('A', 16384)); +INSERT INTO t1 VALUES (2, REPEAT('A', 16384)); +INSERT INTO t1 VALUES (3, REPEAT('A', 16384)); +INSERT INTO t1 VALUES (4, REPEAT('A', 16384)); +INSERT INTO t1 VALUES (5, REPEAT('A', 16384)); +COMMIT; +SELECT COUNT(*) AS expect_0 FROM mysql.wsrep_streaming_log; +expect_0 +0 +START TRANSACTION; +INSERT INTO t1 VALUES (11, REPEAT('A', 16384)); +INSERT INTO t1 VALUES (12, REPEAT('A', 16384)); +INSERT INTO t1 VALUES (13, REPEAT('A', 16384)); +INSERT INTO t1 VALUES (14, REPEAT('A', 16384)); +INSERT INTO t1 VALUES (15, REPEAT('A', 16384)); +connection node_2; +SET SESSION wsrep_on=OFF; +Starting mysqld +# restart +connection node_1; +connection node_2; +SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log; +COUNT(*) > 0 +1 +connection node_1; +COMMIT; +connection node_1; +SELECT COUNT(*) AS expect_0 FROM mysql.wsrep_streaming_log; +expect_0 +0 +SELECT COUNT(*) AS expect_10 FROM t1; +expect_10 +10 +connection node_2; +SELECT COUNT(*) AS expect_0 FROM mysql.wsrep_streaming_log; +expect_0 +0 +SELECT COUNT(*) AS expect_10 FROM t1; +expect_10 +10 +connection node_3; +SELECT COUNT(*) AS expect_0 FROM mysql.wsrep_streaming_log; +expect_0 +0 +SELECT COUNT(*) AS expect_10 FROM t1; +expect_10 +10 +connection node_1; +DROP TABLE t1; +Inconsistency on a middle fragment +connection node_1; +CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 BLOB) ENGINE=InnoDB; +connection node_2; +SET SESSION wsrep_on=OFF; +INSERT INTO t1 VALUES (3, 'X'); +SET SESSION wsrep_on=ON; +DELETE FROM t1 WHERE f1 = 2; +connection node_1; +SET AUTOCOMMIT=OFF; +SET SESSION wsrep_trx_fragment_size = 16384; +START TRANSACTION; +INSERT INTO t1 VALUES (1, REPEAT('A', 16384)); +INSERT INTO t1 VALUES (2, REPEAT('A', 16384)); +INSERT INTO t1 VALUES (3, REPEAT('A', 16384)); +INSERT INTO t1 VALUES (4, REPEAT('A', 16384)); +INSERT INTO t1 VALUES (5, REPEAT('A', 16384)); +COMMIT; +SELECT COUNT(*) AS expect_0 FROM mysql.wsrep_streaming_log; +expect_0 +0 +START TRANSACTION; +INSERT INTO t1 VALUES (11, REPEAT('A', 16384)); +INSERT INTO t1 VALUES (12, REPEAT('A', 16384)); +INSERT INTO t1 VALUES (13, REPEAT('A', 16384)); +INSERT INTO t1 VALUES (14, REPEAT('A', 16384)); +INSERT INTO t1 VALUES (15, REPEAT('A', 16384)); +connection node_2; +SET SESSION wsrep_on=OFF; +Starting mysqld +# restart +connection node_1; +connection node_2; +SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log; +COUNT(*) > 0 +1 +connection node_1; +COMMIT; +connection node_1; +SELECT COUNT(*) AS expect_0 FROM mysql.wsrep_streaming_log; +expect_0 +0 +SELECT COUNT(*) AS expect_10 FROM t1; +expect_10 +10 +connection node_2; +SELECT COUNT(*) AS expect_0 FROM mysql.wsrep_streaming_log; +expect_0 +0 +SELECT COUNT(*) AS expect_10 FROM t1; +expect_10 +10 +connection node_3; +SELECT COUNT(*) AS expect_0 FROM mysql.wsrep_streaming_log; +expect_0 +0 +SELECT COUNT(*) AS expect_10 FROM t1; +expect_10 +10 +connection node_1; +DROP TABLE t1; +Inconsistency on the commit fragment +connection node_1; +CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 BLOB) ENGINE=InnoDB; +connection node_2; +SET SESSION wsrep_on=OFF; +INSERT INTO t1 VALUES (5, 'X'); +SET SESSION wsrep_on=ON; +DELETE FROM t1 WHERE f1 = 2; +connection node_1; +SET AUTOCOMMIT=OFF; +SET SESSION wsrep_trx_fragment_size = 16384; +START TRANSACTION; +INSERT INTO t1 VALUES (1, REPEAT('A', 16384)); +INSERT INTO t1 VALUES (2, REPEAT('A', 16384)); +INSERT INTO t1 VALUES (3, REPEAT('A', 16384)); +INSERT INTO t1 VALUES (4, REPEAT('A', 16384)); +INSERT INTO t1 VALUES (5, REPEAT('A', 16384)); +COMMIT; +SELECT COUNT(*) AS expect_0 FROM mysql.wsrep_streaming_log; +expect_0 +0 +START TRANSACTION; +INSERT INTO t1 VALUES (11, REPEAT('A', 16384)); +INSERT INTO t1 VALUES (12, REPEAT('A', 16384)); +INSERT INTO t1 VALUES (13, REPEAT('A', 16384)); +INSERT INTO t1 VALUES (14, REPEAT('A', 16384)); +INSERT INTO t1 VALUES (15, REPEAT('A', 16384)); +connection node_2; +SET SESSION wsrep_on=OFF; +Starting mysqld +# restart +connection node_1; +connection node_2; +SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log; +COUNT(*) > 0 +1 +connection node_1; +COMMIT; +connection node_1; +SELECT COUNT(*) AS expect_0 FROM mysql.wsrep_streaming_log; +expect_0 +0 +SELECT COUNT(*) AS expect_10 FROM t1; +expect_10 +10 +connection node_2; +SELECT COUNT(*) AS expect_0 FROM mysql.wsrep_streaming_log; +expect_0 +0 +SELECT COUNT(*) AS expect_10 FROM t1; +expect_10 +10 +connection node_3; +SELECT COUNT(*) AS expect_0 FROM mysql.wsrep_streaming_log; +expect_0 +0 +SELECT COUNT(*) AS expect_10 FROM t1; +expect_10 +10 +connection node_1; +DROP TABLE t1; +connection node_2; +CALL mtr.add_suppression("Slave SQL: Could not execute Write_rows event on table test.t1; Duplicate entry '1' for key 'PRIMARY'"); +CALL mtr.add_suppression("Slave SQL: Could not execute Write_rows event on table test.t1; Duplicate entry '3' for key 'PRIMARY'"); +CALL mtr.add_suppression("Slave SQL: Could not execute Write_rows event on table test.t1; Duplicate entry '5' for key 'PRIMARY'"); +CALL mtr.add_suppression("Write_rows_v1 apply failed"); +CALL mtr.add_suppression("Inconsistent by consensus"); +CALL mtr.add_suppression("WSREP: Failed to apply write set: "); +CALL mtr.add_suppression("WSREP: Failed to report last committed"); |