diff options
Diffstat (limited to 'mysql-test/suite/galera_3nodes')
36 files changed, 321 insertions, 154 deletions
diff --git a/mysql-test/suite/galera_3nodes/galera_2x3nodes.cnf b/mysql-test/suite/galera_3nodes/galera_2x3nodes.cnf index df51920c13c..2707fb69f4d 100644 --- a/mysql-test/suite/galera_3nodes/galera_2x3nodes.cnf +++ b/mysql-test/suite/galera_3nodes/galera_2x3nodes.cnf @@ -10,7 +10,6 @@ default-storage-engine=innodb wsrep_gtid_mode=1 gtid_ignore_duplicates -wsrep-on=1 wsrep-provider=@ENV.WSREP_PROVIDER wsrep_node_address=127.0.0.1 # enforce read-committed characteristics across the cluster @@ -21,6 +20,7 @@ wsrep_node_address=127.0.0.1 #galera_port=@OPT.port #ist_port=@OPT.port #sst_port=@OPT.port +wsrep-on=1 wsrep-cluster-address='gcomm://' wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.1.#galera_port;evs.suspect_timeout=PT300S;evs.inactive_timeout=PT1000M;evs.install_timeout=PT155S;evs.keepalive_period = PT100S' @@ -32,6 +32,7 @@ wsrep_sst_receive_address='127.0.0.1:@mysqld.1.#sst_port' #galera_port=@OPT.port #ist_port=@OPT.port #sst_port=@OPT.port +wsrep-on=1 wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port' wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.2.#galera_port;evs.suspect_timeout=PT300S;evs.inactive_timeout=PT1000M;evs.install_timeout=PT155S;evs.keepalive_period = PT100S' @@ -43,6 +44,7 @@ wsrep_sst_receive_address='127.0.0.1:@mysqld.2.#sst_port' #galera_port=@OPT.port #ist_port=@OPT.port #sst_port=@OPT.port +wsrep-on=1 wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port' wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.3.#galera_port;evs.suspect_timeout=PT300S;evs.inactive_timeout=PT1000M;evs.install_timeout=PT155S;evs.keepalive_period = PT100S' @@ -56,7 +58,7 @@ wsrep_cluster_name=cluster2 #galera_port=@OPT.port #ist_port=@OPT.port #sst_port=@OPT.port - +wsrep-on=1 wsrep-cluster-address='gcomm://' wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.4.#galera_port;evs.suspect_timeout=PT300S;evs.inactive_timeout=PT1000M;evs.install_timeout=PT155S;evs.keepalive_period = PT100S' @@ -69,6 +71,7 @@ wsrep_cluster_name=cluster2 #galera_port=@OPT.port #ist_port=@OPT.port #sst_port=@OPT.port +wsrep-on=1 wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.4.#galera_port' wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.5.#galera_port;evs.suspect_timeout=PT300S;evs.inactive_timeout=PT1000M;evs.install_timeout=PT155S;evs.keepalive_period = PT100S' @@ -81,6 +84,7 @@ wsrep_cluster_name=cluster2 #galera_port=@OPT.port #ist_port=@OPT.port #sst_port=@OPT.port +wsrep-on=1 wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.4.#galera_port' wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.6.#galera_port;evs.suspect_timeout=PT300S;evs.inactive_timeout=PT1000M;evs.install_timeout=PT155S;evs.keepalive_period = PT100S' @@ -106,17 +110,3 @@ NODE_MYSOCK_5= @mysqld.5.socket NODE_MYPORT_6= @mysqld.6.port NODE_MYSOCK_6= @mysqld.6.socket - -NODE_GALERAPORT_1= @mysqld.1.#galera_port -NODE_GALERAPORT_2= @mysqld.2.#galera_port -NODE_GALERAPORT_3= @mysqld.3.#galera_port -NODE_GALERAPORT_4= @mysqld.4.#galera_port -NODE_GALERAPORT_5= @mysqld.5.#galera_port -NODE_GALERAPORT_6= @mysqld.6.#galera_port - -NODE_SSTPORT_1= @mysqld.1.#sst_port -NODE_SSTPORT_2= @mysqld.2.#sst_port -NODE_SSTPORT_3= @mysqld.3.#sst_port -NODE_SSTPORT_4= @mysqld.4.#sst_port -NODE_SSTPORT_5= @mysqld.5.#sst_port -NODE_SSTPORT_6= @mysqld.6.#sst_port diff --git a/mysql-test/suite/galera_3nodes/galera_3nodes.cnf b/mysql-test/suite/galera_3nodes/galera_3nodes.cnf index 7b68d36c04a..ab7493e313b 100644 --- a/mysql-test/suite/galera_3nodes/galera_3nodes.cnf +++ b/mysql-test/suite/galera_3nodes/galera_3nodes.cnf @@ -6,7 +6,6 @@ binlog-format=row innodb-autoinc-lock-mode=2 default-storage-engine=innodb -wsrep-on=1 wsrep-provider=@ENV.WSREP_PROVIDER wsrep_node_address=127.0.0.1 # enforce read-committed characteristics across the cluster @@ -17,6 +16,8 @@ wsrep-sync-wait=15 #galera_port=@OPT.port #ist_port=@OPT.port #sst_port=@OPT.port +#wsrep-new-cluster +wsrep-on=1 wsrep-cluster-address='gcomm://' wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.1.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S' @@ -28,6 +29,7 @@ wsrep_sst_receive_address='127.0.0.1:@mysqld.1.#sst_port' #galera_port=@OPT.port #ist_port=@OPT.port #sst_port=@OPT.port +wsrep-on=1 wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port' wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.2.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S' @@ -39,6 +41,7 @@ wsrep_sst_receive_address='127.0.0.1:@mysqld.2.#sst_port' #galera_port=@OPT.port #ist_port=@OPT.port #sst_port=@OPT.port +wsrep-on=1 wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port' wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.3.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S' @@ -55,12 +58,3 @@ NODE_MYSOCK_2= @mysqld.2.socket NODE_MYPORT_3= @mysqld.3.port NODE_MYSOCK_3= @mysqld.3.socket - -NODE_GALERAPORT_1= @mysqld.1.#galera_port -NODE_GALERAPORT_2= @mysqld.2.#galera_port -NODE_GALERAPORT_3= @mysqld.3.#galera_port - -NODE_SSTPORT_1= @mysqld.1.#sst_port -NODE_SSTPORT_2= @mysqld.2.#sst_port -NODE_SSTPORT_3= @mysqld.3.#sst_port - diff --git a/mysql-test/suite/galera_3nodes/include/galera_resume.inc b/mysql-test/suite/galera_3nodes/include/galera_resume.inc new file mode 100644 index 00000000000..af8f2b956fd --- /dev/null +++ b/mysql-test/suite/galera_3nodes/include/galera_resume.inc @@ -0,0 +1,9 @@ +--echo Resuming node ... +--perl + my $pid_filename = $ENV{'_SUSPEND_NODE_PIDFILE'}; + my $mysqld_pid = `cat $pid_filename`; + chomp($mysqld_pid); + system("kill -SIGCONT $mysqld_pid"); + exit(0); +EOF + diff --git a/mysql-test/suite/galera_3nodes/r/GAL-501.result b/mysql-test/suite/galera_3nodes/r/GAL-501.result index bcf74142144..063e88ec21a 100644 --- a/mysql-test/suite/galera_3nodes/r/GAL-501.result +++ b/mysql-test/suite/galera_3nodes/r/GAL-501.result @@ -1,3 +1,6 @@ +connection node_2; +connection node_1; +connection node_3; SELECT VARIABLE_VALUE LIKE '%[::1]%' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_incoming_addresses'; VARIABLE_VALUE LIKE '%[::1]%' 1 diff --git a/mysql-test/suite/galera_3nodes/r/galera_certification_ccc.result b/mysql-test/suite/galera_3nodes/r/galera_certification_ccc.result index b1bbb1406a1..6393a30da6f 100644 --- a/mysql-test/suite/galera_3nodes/r/galera_certification_ccc.result +++ b/mysql-test/suite/galera_3nodes/r/galera_certification_ccc.result @@ -1,3 +1,5 @@ +connection node_2; +connection node_1; connection node_1; connection node_2; connection node_3; diff --git a/mysql-test/suite/galera_3nodes/r/galera_certification_double_failure.result b/mysql-test/suite/galera_3nodes/r/galera_certification_double_failure.result index e1528c6f74f..d43b42bec45 100644 --- a/mysql-test/suite/galera_3nodes/r/galera_certification_double_failure.result +++ b/mysql-test/suite/galera_3nodes/r/galera_certification_double_failure.result @@ -1,3 +1,5 @@ +connection node_2; +connection node_1; connection node_1; CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB; CREATE TABLE t2 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB; @@ -11,6 +13,7 @@ connection node_3; INSERT INTO t2 VALUES (1); connection node_1; COMMIT; -ERROR 40001: Deadlock: wsrep aborted transaction +ERROR 40001: Deadlock found when trying to get lock; try restarting transaction +connection node_3; DROP TABLE t1; DROP TABLE t2; diff --git a/mysql-test/suite/galera_3nodes/r/galera_evs_suspect_timeout.result b/mysql-test/suite/galera_3nodes/r/galera_evs_suspect_timeout.result index 6a7eea94077..d612e9377a9 100644 --- a/mysql-test/suite/galera_3nodes/r/galera_evs_suspect_timeout.result +++ b/mysql-test/suite/galera_3nodes/r/galera_evs_suspect_timeout.result @@ -1,3 +1,5 @@ +connection node_2; +connection node_1; connection node_1; SET GLOBAL wsrep_provider_options = 'evs.inactive_timeout=PT100M; evs.suspect_timeout=PT1S'; connection node_2; @@ -21,6 +23,7 @@ SELECT COUNT(*) = 1 FROM t1; COUNT(*) = 1 1 DROP TABLE t1; +connection node_3; Resuming node ... connection node_3; CALL mtr.add_suppression("WSREP: gcs_caused() returned -1 \\(Operation not permitted\\)"); diff --git a/mysql-test/suite/galera_3nodes/r/galera_garbd.result b/mysql-test/suite/galera_3nodes/r/galera_garbd.result index 2d70b1742ab..88bb3ca2ff9 100644 --- a/mysql-test/suite/galera_3nodes/r/galera_garbd.result +++ b/mysql-test/suite/galera_3nodes/r/galera_garbd.result @@ -1,3 +1,9 @@ +connection node_2; +connection node_1; +connection node_1; +connection node_2; +connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3; +connection node_3; Killing node #3 to free ports for garbd ... connection node_1; Starting garbd ... diff --git a/mysql-test/suite/galera_3nodes/r/galera_innobackupex_backup.result b/mysql-test/suite/galera_3nodes/r/galera_innobackupex_backup.result deleted file mode 100644 index 6ed7587303d..00000000000 --- a/mysql-test/suite/galera_3nodes/r/galera_innobackupex_backup.result +++ /dev/null @@ -1,17 +0,0 @@ -connection node_1; -connection node_2; -connection node_3; -connection node_1; -CREATE TABLE t1 (f1 INTEGER); -INSERT INTO t1 VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); -connection node_2; -SELECT COUNT(*) = 10 FROM t1; -COUNT(*) = 10 -1 -Killing server ... -connection node_1; -INSERT INTO t1 VALUES (11),(12),(13),(14),(15),(16),(17),(18),(19),(20); -SELECT COUNT(*) = 20 FROM t1; -COUNT(*) = 20 -1 -DROP TABLE t1; diff --git a/mysql-test/suite/galera_3nodes/r/galera_ipv6_mariabackup.result b/mysql-test/suite/galera_3nodes/r/galera_ipv6_mariabackup.result index 5665ed5f46a..8ec1ff090ff 100644 --- a/mysql-test/suite/galera_3nodes/r/galera_ipv6_mariabackup.result +++ b/mysql-test/suite/galera_3nodes/r/galera_ipv6_mariabackup.result @@ -1,3 +1,5 @@ +connection node_2; +connection node_1; SELECT VARIABLE_VALUE LIKE '%[::1]%' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_incoming_addresses'; VARIABLE_VALUE LIKE '%[::1]%' 1 @@ -19,4 +21,4 @@ connection node_1; include/assert_grep.inc [Streaming the backup to joiner at \[::1\]] include/assert_grep.inc [async IST sender starting to serve tcp://\[::1\]:] include/assert_grep.inc [IST receiver addr using tcp://\[::1\]] -include/assert_grep.inc [Prepared IST receiver, listening at: tcp://\[::1\]] +include/assert_grep.inc [Prepared IST receiver for 3-6, listening at: tcp://\[::1\]] diff --git a/mysql-test/suite/galera_3nodes/r/galera_ipv6_mysqldump.result b/mysql-test/suite/galera_3nodes/r/galera_ipv6_mysqldump.result index 3564dc8c5a1..bfc210db2ba 100644 --- a/mysql-test/suite/galera_3nodes/r/galera_ipv6_mysqldump.result +++ b/mysql-test/suite/galera_3nodes/r/galera_ipv6_mysqldump.result @@ -1,3 +1,5 @@ +connection node_2; +connection node_1; call mtr.add_suppression("WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to'"); call mtr.add_suppression("Failed to load slave replication state from table mysql.gtid_slave_pos"); connection node_1; @@ -33,5 +35,6 @@ CALL mtr.add_suppression("Can't open and lock time zone table"); CALL mtr.add_suppression("Can't open and lock privilege tables"); CALL mtr.add_suppression("Info table is not ready to be used"); CALL mtr.add_suppression("Native table .* has the wrong structure"); +CALL mtr.add_suppression("Table \'mysql.gtid_slave_pos\' doesn\'t exist"); connection node_2; CALL mtr.add_suppression("Unsupported protocol downgrade: incremental data collection disabled. Expect abort"); diff --git a/mysql-test/suite/galera_3nodes/r/galera_ipv6_rsync.result b/mysql-test/suite/galera_3nodes/r/galera_ipv6_rsync.result index bcf74142144..3f810d3eb97 100644 --- a/mysql-test/suite/galera_3nodes/r/galera_ipv6_rsync.result +++ b/mysql-test/suite/galera_3nodes/r/galera_ipv6_rsync.result @@ -1,3 +1,5 @@ +connection node_2; +connection node_1; SELECT VARIABLE_VALUE LIKE '%[::1]%' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_incoming_addresses'; VARIABLE_VALUE LIKE '%[::1]%' 1 diff --git a/mysql-test/suite/galera_3nodes/r/galera_ist_gcache_rollover.result b/mysql-test/suite/galera_3nodes/r/galera_ist_gcache_rollover.result index aa3e349eda7..3b0c32547fe 100644 --- a/mysql-test/suite/galera_3nodes/r/galera_ist_gcache_rollover.result +++ b/mysql-test/suite/galera_3nodes/r/galera_ist_gcache_rollover.result @@ -1,3 +1,5 @@ +connection node_2; +connection node_1; connection node_1; connection node_2; connection node_3; diff --git a/mysql-test/suite/galera_3nodes/r/galera_parallel_apply_3nodes.result b/mysql-test/suite/galera_3nodes/r/galera_parallel_apply_3nodes.result index 4f9951c382f..8211fb8501e 100644 --- a/mysql-test/suite/galera_3nodes/r/galera_parallel_apply_3nodes.result +++ b/mysql-test/suite/galera_3nodes/r/galera_parallel_apply_3nodes.result @@ -1,3 +1,5 @@ +connection node_2; +connection node_1; CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB; INSERT INTO t1 VALUES (1); connection node_3; @@ -12,7 +14,7 @@ connection node_3; SELECT f1 = 111 FROM t1; f1 = 111 1 -SELECT COUNT(*) IN (1, 2) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE 'committed%'; +SELECT COUNT(*) IN (1, 2) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%committed%'; COUNT(*) IN (1, 2) 1 SET GLOBAL wsrep_slave_threads = 1;; diff --git a/mysql-test/suite/galera_3nodes/r/galera_pc_bootstrap.result b/mysql-test/suite/galera_3nodes/r/galera_pc_bootstrap.result index 3405beef12f..ee49330e892 100644 --- a/mysql-test/suite/galera_3nodes/r/galera_pc_bootstrap.result +++ b/mysql-test/suite/galera_3nodes/r/galera_pc_bootstrap.result @@ -1,3 +1,5 @@ +connection node_2; +connection node_1; CREATE TABLE t1 (f1 INTEGER); connection node_1; SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1'; diff --git a/mysql-test/suite/galera_3nodes/r/galera_pc_weight.result b/mysql-test/suite/galera_3nodes/r/galera_pc_weight.result index 240232d9c96..3ae983f9550 100644 --- a/mysql-test/suite/galera_3nodes/r/galera_pc_weight.result +++ b/mysql-test/suite/galera_3nodes/r/galera_pc_weight.result @@ -1,9 +1,13 @@ +connection node_2; +connection node_1; connection node_1; SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight'; VARIABLE_VALUE = 3 +1 SET GLOBAL wsrep_provider_options = 'pc.weight=3'; SELECT VARIABLE_VALUE = 5 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight'; VARIABLE_VALUE = 5 +1 SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1'; connection node_2; SET SESSION wsrep_sync_wait=0; @@ -14,6 +18,7 @@ Variable_name Value wsrep_cluster_size 2 SHOW STATUS LIKE 'wsrep_cluster_weight'; Variable_name Value +wsrep_cluster_weight 0 SHOW STATUS LIKE 'wsrep_cluster_status'; Variable_name Value wsrep_cluster_status non-Primary @@ -38,6 +43,7 @@ Variable_name Value wsrep_cluster_size 2 SHOW STATUS LIKE 'wsrep_cluster_weight'; Variable_name Value +wsrep_cluster_weight 0 SHOW STATUS LIKE 'wsrep_cluster_status'; Variable_name Value wsrep_cluster_status non-Primary @@ -56,6 +62,7 @@ wsrep_local_state_comment Initialized connection node_1; SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight'; VARIABLE_VALUE = 3 +1 SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status'; VARIABLE_VALUE = 'Primary' 1 @@ -74,6 +81,7 @@ VARIABLE_VALUE = 'Synced' SET GLOBAL wsrep_provider_options = 'pc.weight=1'; SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight'; VARIABLE_VALUE = 1 +1 connection node_1; SET GLOBAL wsrep_provider_options = 'gmcast.isolate=0'; connection node_2; @@ -84,6 +92,7 @@ VARIABLE_VALUE = 3 1 SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight'; VARIABLE_VALUE = 3 +1 SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status'; VARIABLE_VALUE = 'Primary' 1 @@ -105,6 +114,7 @@ VARIABLE_VALUE = 3 1 SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight'; VARIABLE_VALUE = 3 +1 SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status'; VARIABLE_VALUE = 'Primary' 1 @@ -126,6 +136,7 @@ VARIABLE_VALUE = 3 1 SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight'; VARIABLE_VALUE = 3 +1 SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status'; VARIABLE_VALUE = 'Primary' 1 diff --git a/mysql-test/suite/galera_3nodes/r/galera_safe_to_bootstrap.result b/mysql-test/suite/galera_3nodes/r/galera_safe_to_bootstrap.result index 45b4d63fb4f..4da24e8dbfb 100644 --- a/mysql-test/suite/galera_3nodes/r/galera_safe_to_bootstrap.result +++ b/mysql-test/suite/galera_3nodes/r/galera_safe_to_bootstrap.result @@ -1,3 +1,5 @@ +connection node_2; +connection node_1; connection node_1; connection node_2; connection node_3; @@ -38,6 +40,8 @@ CALL mtr.add_suppression("WSREP: wsrep::connect(.*) failed: 7"); CALL mtr.add_suppression("Aborting"); CALL mtr.add_suppression("WSREP: moving position backwards: [0-9]+ -> 0"); CALL mtr.add_suppression("Failed to prepare for incremental state transfer"); +CALL mtr.add_suppression("It may not be safe to bootstrap the cluster from this node"); +CALL mtr.add_suppression("Aborting"); connection node_3; CALL mtr.add_suppression("WSREP: no nodes coming from prim view, prim not possible"); CALL mtr.add_suppression("WSREP: It may not be safe to bootstrap the cluster from this node"); @@ -45,6 +49,8 @@ CALL mtr.add_suppression("WSREP: wsrep::connect(.*) failed: 7"); CALL mtr.add_suppression("Aborting"); CALL mtr.add_suppression("WSREP: moving position backwards: [0-9]+ -> 0"); CALL mtr.add_suppression("Failed to prepare for incremental state transfer"); +CALL mtr.add_suppression("It may not be safe to bootstrap the cluster from this node"); +CALL mtr.add_suppression("Aborting"); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( diff --git a/mysql-test/suite/galera_3nodes/r/galera_var_dirty_reads2.result b/mysql-test/suite/galera_3nodes/r/galera_var_dirty_reads2.result index c6756bce210..8e6d27823f6 100644 --- a/mysql-test/suite/galera_3nodes/r/galera_var_dirty_reads2.result +++ b/mysql-test/suite/galera_3nodes/r/galera_var_dirty_reads2.result @@ -1,3 +1,5 @@ +connection node_2; +connection node_1; CREATE TABLE t1 (f1 INTEGER); INSERT INTO t1 VALUES (1); connection node_2; diff --git a/mysql-test/suite/galera_3nodes/r/galera_wsrep_schema.result b/mysql-test/suite/galera_3nodes/r/galera_wsrep_schema.result new file mode 100644 index 00000000000..23ced3ba734 --- /dev/null +++ b/mysql-test/suite/galera_3nodes/r/galera_wsrep_schema.result @@ -0,0 +1,82 @@ +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; +SHOW CREATE TABLE mysql.wsrep_cluster; +Table Create Table +wsrep_cluster CREATE TABLE `wsrep_cluster` ( + `cluster_uuid` char(36) NOT NULL, + `view_id` bigint(20) NOT NULL, + `view_seqno` bigint(20) NOT NULL, + `protocol_version` int(11) NOT NULL, + `capabilities` int(11) NOT NULL, + PRIMARY KEY (`cluster_uuid`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +SHOW CREATE TABLE mysql.wsrep_cluster_members; +Table Create Table +wsrep_cluster_members CREATE TABLE `wsrep_cluster_members` ( + `node_uuid` char(36) NOT NULL, + `cluster_uuid` char(36) NOT NULL, + `node_name` char(32) NOT NULL, + `node_incoming_address` varchar(256) NOT NULL, + PRIMARY KEY (`node_uuid`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +SELECT COUNT(*) = 1 FROM mysql.wsrep_cluster; +COUNT(*) = 1 +1 +SELECT cluster_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_state_uuid') FROM mysql.wsrep_cluster; +cluster_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_state_uuid') +1 +SELECT COUNT(*) = 3 FROM mysql.wsrep_cluster_members; +COUNT(*) = 3 +1 +SELECT COUNT(*) = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size') FROM mysql.wsrep_cluster_members; +COUNT(*) = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size') +1 +SELECT COUNT(*) = 1 FROM mysql.wsrep_cluster_members WHERE node_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_gcomm_uuid'); +COUNT(*) = 1 +1 +SELECT node_incoming_address LIKE '127.0.0.1:%' from mysql.wsrep_cluster_members; +node_incoming_address LIKE '127.0.0.1:%' +1 +1 +1 +SELECT cluster_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_state_uuid') FROM mysql.wsrep_cluster_members; +cluster_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_state_uuid') +1 +1 +1 +SELECT COUNT(*) = 1 FROM mysql.wsrep_cluster_members WHERE node_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_gcomm_uuid'); +COUNT(*) = 1 +1 +connection node_2; +connection node_1; +SELECT cluster_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_state_uuid') FROM mysql.wsrep_cluster; +cluster_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_state_uuid') +1 +SELECT COUNT(*) = 2 FROM mysql.wsrep_cluster_members; +COUNT(*) = 2 +1 +connection node_2; +SELECT cluster_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_state_uuid') FROM mysql.wsrep_cluster; +cluster_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_state_uuid') +1 +SELECT COUNT(*) = 3 FROM mysql.wsrep_cluster_members; +COUNT(*) = 3 +1 +connection node_1; +SELECT cluster_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_state_uuid') FROM mysql.wsrep_cluster; +cluster_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_state_uuid') +1 +SELECT COUNT(*) = 3 FROM mysql.wsrep_cluster_members; +COUNT(*) = 3 +1 +connection node_1; +CALL mtr.add_suppression("SYNC message from member"); +connection node_2; +CALL mtr.add_suppression("SYNC message from member"); +connection node_3; +CALL mtr.add_suppression("SYNC message from member"); diff --git a/mysql-test/suite/galera_3nodes/suite.pm b/mysql-test/suite/galera_3nodes/suite.pm index 0c098bfc9f9..9882793cb20 100644 --- a/mysql-test/suite/galera_3nodes/suite.pm +++ b/mysql-test/suite/galera_3nodes/suite.pm @@ -9,9 +9,9 @@ return "Not run for embedded server" if $::opt_embedded_server; return "WSREP is not compiled in" unless defined $::mysqld_variables{'wsrep-on'}; my ($provider) = grep { -f $_ } $ENV{WSREP_PROVIDER}, - "/usr/lib64/galera-3/libgalera_smm.so", + "/usr/lib64/galera-4/libgalera_smm.so", "/usr/lib64/galera/libgalera_smm.so", - "/usr/lib/galera-3/libgalera_smm.so", + "/usr/lib/galera-4/libgalera_smm.so", "/usr/lib/galera/libgalera_smm.so"; return "No wsrep provider library" unless -f $provider; diff --git a/mysql-test/suite/galera_3nodes/t/GAL-501.test b/mysql-test/suite/galera_3nodes/t/GAL-501.test index a36f21630ac..c4b17cdb21e 100644 --- a/mysql-test/suite/galera_3nodes/t/GAL-501.test +++ b/mysql-test/suite/galera_3nodes/t/GAL-501.test @@ -7,6 +7,12 @@ --source include/galera_cluster.inc --source include/check_ipv6.inc +--let $galera_connection_name = node_3 +--let $galera_server_number = 3 +--source include/galera_connect.inc +--connection node_3 +--source include/galera_wait_ready.inc + # Confirm that initial handshake happened over ipv6 SELECT VARIABLE_VALUE LIKE '%[::1]%' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_incoming_addresses'; diff --git a/mysql-test/suite/galera_3nodes/t/galera_certification_double_failure.test b/mysql-test/suite/galera_3nodes/t/galera_certification_double_failure.test index a2ad0765028..5366d2a4a6e 100644 --- a/mysql-test/suite/galera_3nodes/t/galera_certification_double_failure.test +++ b/mysql-test/suite/galera_3nodes/t/galera_certification_double_failure.test @@ -29,5 +29,7 @@ INSERT INTO t2 VALUES (1); --error ER_LOCK_DEADLOCK COMMIT; +--connection node_3 +--source include/galera_wait_ready.inc DROP TABLE t1; DROP TABLE t2; diff --git a/mysql-test/suite/galera_3nodes/t/galera_evs_suspect_timeout.test b/mysql-test/suite/galera_3nodes/t/galera_evs_suspect_timeout.test index 4dab936c343..aa733442b92 100644 --- a/mysql-test/suite/galera_3nodes/t/galera_evs_suspect_timeout.test +++ b/mysql-test/suite/galera_3nodes/t/galera_evs_suspect_timeout.test @@ -60,9 +60,9 @@ DROP TABLE t1; --connection node_3 --source include/wait_until_connected_again.inc -CALL mtr.add_suppression("WSREP: gcs_caused() returned -1 \\(Operation not permitted\\)"); - --disable_query_log --eval SET GLOBAL wsrep_cluster_address = '$wsrep_cluster_address_node3'; --enable_query_log ---source include/wait_until_connected_again.inc +--source include/galera_wait_ready.inc + +CALL mtr.add_suppression("WSREP: gcs_caused() returned -1 \\(Operation not permitted\\)"); diff --git a/mysql-test/suite/galera_3nodes/t/galera_garbd.test b/mysql-test/suite/galera_3nodes/t/galera_garbd.test index 5509c4628c9..d66c4a75ab7 100644 --- a/mysql-test/suite/galera_3nodes/t/galera_garbd.test +++ b/mysql-test/suite/galera_3nodes/t/galera_garbd.test @@ -7,12 +7,21 @@ --source include/have_innodb.inc --source include/big_test.inc +# Save galera ports +--connection node_1 +--source suite/galera/include/galera_base_port.inc +--let $NODE_GALERAPORT_1 = $_NODE_GALERAPORT + +--connection node_2 +--source suite/galera/include/galera_base_port.inc +--let $NODE_GALERAPORT_2 = $_NODE_GALERAPORT + +--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3 +--source suite/galera/include/galera_base_port.inc +--let $NODE_GALERAPORT_3 = $_NODE_GALERAPORT + +--connection node_3 --echo Killing node #3 to free ports for garbd ... ---let $galera_connection_name = node_3 ---let $galera_server_number = 3 ---source include/galera_connect.inc ---let $gp3 = `SELECT SUBSTR(@@wsrep_provider_options, LOCATE('base_port =', @@wsrep_provider_options) + LENGTH('base_port = '))` ---let $galera_port_3 = `SELECT SUBSTR('$gp3', 1, LOCATE(';', '$gp3') - 1)` --source include/shutdown_mysqld.inc --connection node_1 @@ -36,7 +45,10 @@ INSERT INTO t1 VALUES (1); SELECT COUNT(*) = 1 FROM t1; --echo Killing garbd ... ---exec pkill --oldest --full garbd.*$galera_port_3 +# FreeBSD's /bin/pkill only supports short versions of the options: +# -o Select only the oldest (least recently started) +# -f Match against full argument lists +--exec pkill -o -f garbd.*$NODE_GALERAPORT_3 --sleep 5 diff --git a/mysql-test/suite/galera_3nodes/t/galera_innobackupex_backup.test b/mysql-test/suite/galera_3nodes/t/galera_innobackupex_backup.test deleted file mode 100644 index 8dfb4660f3e..00000000000 --- a/mysql-test/suite/galera_3nodes/t/galera_innobackupex_backup.test +++ /dev/null @@ -1,80 +0,0 @@ -# -# This test uses innobackupex to take a backup on node #2 and then restores that node from backup -# - ---source include/galera_cluster.inc ---source include/have_innodb.inc ---source include/have_mariabackup.inc - ---let $galera_connection_name = node_3 ---let $galera_server_number = 3 ---source include/galera_connect.inc - -# Save original auto_increment_offset values. ---let $node_1=node_1 ---let $node_2=node_2 ---let $node_3=node_3 ---source ../galera/include/auto_increment_offset_save.inc - ---connection node_1 -CREATE TABLE t1 (f1 INTEGER); -INSERT INTO t1 VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); - ---connection node_2 -SELECT COUNT(*) = 10 FROM t1; - ---exec rm -rf $MYSQL_TMP_DIR/innobackupex_backup ---exec mariabackup --innobackupex --defaults-file=$MYSQLTEST_VARDIR/my.cnf --defaults-group=mysqld.2 --galera-info --port=$NODE_MYPORT_2 --host=127.0.0.1 --no-timestamp $MYSQL_TMP_DIR/innobackupex_backup &> $MYSQL_TMP_DIR/innobackupex-backup.log ---exec mariabackup --innobackupex --defaults-file=$MYSQLTEST_VARDIR/my.cnf --defaults-group=mysqld.2 --apply-log --galera-info --port=$NODE_MYPORT_2 --host=127.0.0.1 --no-timestamp $MYSQL_TMP_DIR/innobackupex_backup &> $MYSQL_TMP_DIR/innobackupex-apply.log - ---source ../galera/include/kill_galera.inc ---sleep 1 - ---connection node_1 -INSERT INTO t1 VALUES (11),(12),(13),(14),(15),(16),(17),(18),(19),(20); - ---exec rm -rf $MYSQLTEST_VARDIR/mysqld.2/data/* ---exec mariabackup --innobackupex --defaults-file=$MYSQLTEST_VARDIR/my.cnf --defaults-group=mysqld.2 --copy-back --port=$NODE_MYPORT_2 --host=127.0.0.1 $MYSQL_TMP_DIR/innobackupex_backup &> $MYSQL_TMP_DIR/innobackupex-restore.log - -# -# Convert the xtrabackup_galera_info into a grastate.dat file -# - ---perl - use strict; - my $xtrabackup_galera_info_file = $ENV{'MYSQL_TMP_DIR'}.'/innobackupex_backup/xtrabackup_galera_info'; - open(XTRABACKUP_GALERA_INFO, $xtrabackup_galera_info_file) or die "Can not open $xtrabackup_galera_info_file: $!"; - my $xtrabackup_galera_info = <XTRABACKUP_GALERA_INFO>; - my ($uuid, $seqno) = split(':', $xtrabackup_galera_info); - - my $grastate_dat_file = $ENV{'MYSQLTEST_VARDIR'}.'/mysqld.2/data/grastate.dat'; - die "grastate.dat already exists" if -e $grastate_dat_file; - - open(GRASTATE_DAT, ">$grastate_dat_file") or die "Can not write to $grastate_dat_file: $!"; - print GRASTATE_DAT "version: 2.1\n"; - print GRASTATE_DAT "uuid: $uuid\n"; - print GRASTATE_DAT "seqno: $seqno\n"; - print GRASTATE_DAT "cert_index:\n"; - exit(0); -EOF - ---source include/start_mysqld.inc ---sleep 5 - ---source include/wait_until_connected_again.inc ---let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; ---source include/wait_condition.inc - -SELECT COUNT(*) = 20 FROM t1; - -DROP TABLE t1; - ---sleep 10 - ---let $galera_connection_name = node_2a ---let $galera_server_number = 2 ---source include/galera_connect.inc ---let $node_2=node_2a - -# Restore original auto_increment_offset values. ---source ../galera/include/auto_increment_offset_restore.inc diff --git a/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup.cnf b/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup.cnf index 5ac00fa056b..969f364a1ec 100644 --- a/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup.cnf +++ b/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup.cnf @@ -10,18 +10,23 @@ wsrep-cluster-address=gcomm:// wsrep_provider_options='base_host=[::1];base_port=@mysqld.1.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.1.#galera_port;ist.recv_addr=[::1]:@mysqld.1.#ist_port' wsrep_sst_receive_address='[::1]:@mysqld.1.#sst_port' wsrep_node_incoming_address='[::1]:@mysqld.1.port' +wsrep_node_name=node_1 [mysqld.2] wsrep_cluster_address='gcomm://[::1]:@mysqld.1.#galera_port' wsrep_provider_options='base_host=[::1];base_port=@mysqld.2.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.2.#galera_port;ist.recv_addr=[::1]:@mysqld.2.#ist_port' wsrep_sst_receive_address='[::1]:@mysqld.2.#sst_port' wsrep_node_incoming_address='[::1]:@mysqld.2.port' +wsrep_node_name=node_2 +wsrep_sst_donor=node_1 [mysqld.3] wsrep_cluster_address='gcomm://[::1]:@mysqld.1.#galera_port' wsrep_provider_options='base_host=[::1];base_port=@mysqld.3.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.3.#galera_port;ist.recv_addr=[::1]:@mysqld.3.#ist_port' wsrep_sst_receive_address='[::1]:@mysqld.3.#sst_port' wsrep_node_incoming_address='[::1]:@mysqld.3.port' +wsrep_node_name=node_3 +wsrep_sst_donor=node_1 [SST] transferfmt=@ENV.MTR_GALERA_TFMT diff --git a/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup.test b/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup.test index 8cbd8cf2454..2abb67421c8 100644 --- a/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup.test +++ b/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup.test @@ -38,22 +38,31 @@ DROP TABLE t1; --let $assert_file = $MYSQLTEST_VARDIR/log/mysqld.1.err --let $assert_only_after = CURRENT_TEST +# The SSTs happen when nodes are started first time --let $assert_count = 2 --let $assert_text = Streaming the backup to joiner at \[::1\] --let $assert_select = Streaming the backup to joiner at \[::1\] --source include/assert_grep.inc ---let $assert_count = 1 +# There will be 3 ISTs donated from node_1 in Galera 4. +# Two first happen at the initial startup to populate the certification +# index. The third one is from the IST which happens during the actual test. +--let $assert_count = 3 --let $assert_text = async IST sender starting to serve tcp://\[::1\]: --let $assert_select = async IST sender starting to serve tcp://\[::1\]: --source include/assert_grep.inc --let $assert_file = $MYSQLTEST_VARDIR/log/mysqld.2.err +# There are two ISTs on joiner, the first at the initial startup, the second +# during the actual test. +--let $assert_count = 2 --let $assert_text = IST receiver addr using tcp://\[::1\] --let $assert_select = IST receiver addr using tcp://\[::1\] --source include/assert_grep.inc ---let $assert_text = Prepared IST receiver, listening at: tcp://\[::1\] ---let $assert_select = Prepared IST receiver, listening at: tcp://\[::1\] +# The receiver expects seqnos 3-6 only once. +--let $assert_count = 1 +--let $assert_text = Prepared IST receiver for 3-6, listening at: tcp://\[::1\] +--let $assert_select = Prepared IST receiver for 3-6, listening at: tcp://\[::1\] --source include/assert_grep.inc diff --git a/mysql-test/suite/galera_3nodes/t/galera_ipv6_mysqldump.test b/mysql-test/suite/galera_3nodes/t/galera_ipv6_mysqldump.test index 4a6de8abb9c..4733b686e93 100644 --- a/mysql-test/suite/galera_3nodes/t/galera_ipv6_mysqldump.test +++ b/mysql-test/suite/galera_3nodes/t/galera_ipv6_mysqldump.test @@ -77,6 +77,11 @@ DROP TABLE t1; SELECT VARIABLE_VALUE LIKE '%[::1]%' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_incoming_addresses'; +# restart node so we don't fail on WSREP_START_POSITION internal check +--source include/restart_mysqld.inc +--source include/wait_until_connected_again.inc + +--source ../galera/include/auto_increment_offset_restore.inc --source suite/galera/include/galera_sst_restore.inc --connection node_2 CALL mtr.add_suppression("Unsupported protocol downgrade: incremental data collection disabled. Expect abort"); diff --git a/mysql-test/suite/galera_3nodes/t/galera_ist_gcache_rollover.test b/mysql-test/suite/galera_3nodes/t/galera_ist_gcache_rollover.test index ebc756d60b1..69e80ee6c3d 100644 --- a/mysql-test/suite/galera_3nodes/t/galera_ist_gcache_rollover.test +++ b/mysql-test/suite/galera_3nodes/t/galera_ist_gcache_rollover.test @@ -11,7 +11,7 @@ --source include/galera_cluster.inc --source include/have_innodb.inc --source include/have_debug_sync.inc ---source suite/galera/include/galera_have_debug_sync.inc +--source include/galera_have_debug_sync.inc --let $galera_connection_name = node_3 --let $galera_server_number = 3 diff --git a/mysql-test/suite/galera_3nodes/t/galera_parallel_apply_3nodes.test b/mysql-test/suite/galera_3nodes/t/galera_parallel_apply_3nodes.test index 7d80d8036a1..659df2b3c93 100644 --- a/mysql-test/suite/galera_3nodes/t/galera_parallel_apply_3nodes.test +++ b/mysql-test/suite/galera_3nodes/t/galera_parallel_apply_3nodes.test @@ -31,7 +31,7 @@ SET GLOBAL wsrep_slave_threads = 2; --connection node_3 SELECT f1 = 111 FROM t1; -SELECT COUNT(*) IN (1, 2) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE 'committed%'; +SELECT COUNT(*) IN (1, 2) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%committed%'; --eval SET GLOBAL wsrep_slave_threads = $wsrep_slave_threads_orig; diff --git a/mysql-test/suite/galera_3nodes/t/galera_pc_weight.cnf b/mysql-test/suite/galera_3nodes/t/galera_pc_weight.cnf index 57026ce6928..1a61471d581 100644 --- a/mysql-test/suite/galera_3nodes/t/galera_pc_weight.cnf +++ b/mysql-test/suite/galera_3nodes/t/galera_pc_weight.cnf @@ -1,5 +1,7 @@ -# We need a dedicated .cnf file, even if empty, in order to force this test to run -# alone on a freshly started cluster. Otherwise there are adverse interactions with -# following tests such as galera_3nodes.galera_var_dirty_reads2 +# We need a dedicated .cnf file, even if empty, in order to force this test +# to run alone on a freshly started cluster. Otherwise there are adverse +# interactions with following tests such as +# galera_3nodes.galera_var_dirty_reads2 +!include ../galera_3nodes.cnf !include ../galera_3nodes.cnf diff --git a/mysql-test/suite/galera_3nodes/t/galera_pc_weight.test b/mysql-test/suite/galera_3nodes/t/galera_pc_weight.test index 0a94e7cd85d..729f14a731f 100644 --- a/mysql-test/suite/galera_3nodes/t/galera_pc_weight.test +++ b/mysql-test/suite/galera_3nodes/t/galera_pc_weight.test @@ -1,11 +1,11 @@ # -# Test the pc.weight wsrep provider option. We set Node #1 to have a high weight and then -# suspend it. This will cause Nodes #2 and #3 to transition to non-primary component. +# Test the pc.weight wsrep provider option. We set Node #1 to have a high +# weight and then suspend it. This will cause Nodes #2 and #3 to transition +# to non-primary component. # --source include/big_test.inc --source include/galera_cluster.inc ---source include/have_innodb.inc --connection node_1 SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight'; @@ -55,6 +55,9 @@ SHOW STATUS LIKE 'wsrep_local_state_comment'; --connection node_1 # For Node #1, we expect a primary component of size 1 +# (NOTE: this is a bit racy as nodes 2 and 3 will try to reconnect ASAP. +# to avoid the raice they should be suspended first as well, but that's +# not currently possible) --let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size' --source include/wait_condition.inc diff --git a/mysql-test/suite/galera_3nodes/t/galera_safe_to_bootstrap.test b/mysql-test/suite/galera_3nodes/t/galera_safe_to_bootstrap.test index b7b6c66e5ad..053c0bd8ce9 100644 --- a/mysql-test/suite/galera_3nodes/t/galera_safe_to_bootstrap.test +++ b/mysql-test/suite/galera_3nodes/t/galera_safe_to_bootstrap.test @@ -3,17 +3,21 @@ # --source include/galera_cluster.inc +# +# Create connection node_3 and save auto increment variables. +# --let $galera_connection_name = node_3 --let $galera_server_number = 3 --source include/galera_connect.inc -# Save original auto_increment_offset values. ---let $node_1=node_1 ---let $node_2=node_2 ---let $node_3=node_3 +--let $node_1 = node_1 +--let $node_2 = node_2 +--let $node_3 = node_3 + --source ../galera/include/auto_increment_offset_save.inc --connection node_1 + CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; # @@ -58,6 +62,7 @@ CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; # # Shut down one more node # + --connection node_3 --source include/shutdown_mysqld.inc @@ -169,6 +174,8 @@ CALL mtr.add_suppression("WSREP: wsrep::connect(.*) failed: 7"); CALL mtr.add_suppression("Aborting"); CALL mtr.add_suppression("WSREP: moving position backwards: [0-9]+ -> 0"); CALL mtr.add_suppression("Failed to prepare for incremental state transfer"); +CALL mtr.add_suppression("It may not be safe to bootstrap the cluster from this node"); +CALL mtr.add_suppression("Aborting"); --connection node_3 CALL mtr.add_suppression("WSREP: no nodes coming from prim view, prim not possible"); @@ -177,9 +184,13 @@ CALL mtr.add_suppression("WSREP: wsrep::connect(.*) failed: 7"); CALL mtr.add_suppression("Aborting"); CALL mtr.add_suppression("WSREP: moving position backwards: [0-9]+ -> 0"); CALL mtr.add_suppression("Failed to prepare for incremental state transfer"); +CALL mtr.add_suppression("It may not be safe to bootstrap the cluster from this node"); +CALL mtr.add_suppression("Aborting"); SHOW CREATE TABLE t1; DROP TABLE t1; -# Restore original auto_increment_offset values. +# +# Restore auto increment variables. +# --source ../galera/include/auto_increment_offset_restore.inc diff --git a/mysql-test/suite/galera_3nodes/t/galera_slave_options_ignore.test b/mysql-test/suite/galera_3nodes/t/galera_slave_options_ignore.test index 3e8b1557e7b..8e73dee70ae 100644 --- a/mysql-test/suite/galera_3nodes/t/galera_slave_options_ignore.test +++ b/mysql-test/suite/galera_3nodes/t/galera_slave_options_ignore.test @@ -25,6 +25,7 @@ SELECT COUNT(*) = 1 FROM db2.t2B; --connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3 --connection node_3 +--source include/galera_wait_ready.inc SELECT COUNT(*) = 0 FROM db1.t1; SELECT COUNT(*) = 1 FROM db2.t2A; SELECT COUNT(*) = 1 FROM db2.t2B; diff --git a/mysql-test/suite/galera_3nodes/t/galera_var_dirty_reads2.test b/mysql-test/suite/galera_3nodes/t/galera_var_dirty_reads2.test index 129ba2e1f38..2ceda1ed352 100644 --- a/mysql-test/suite/galera_3nodes/t/galera_var_dirty_reads2.test +++ b/mysql-test/suite/galera_3nodes/t/galera_var_dirty_reads2.test @@ -106,7 +106,8 @@ SET GLOBAL wsrep_provider_options='gmcast.isolate=0'; --source include/wait_condition.inc --connection node_2 ---let $wait_condition = SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status'; +--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; --source include/wait_condition.inc +--source include/galera_wait_ready.inc DROP TABLE t1; diff --git a/mysql-test/suite/galera_3nodes/t/galera_wsrep_schema.test b/mysql-test/suite/galera_3nodes/t/galera_wsrep_schema.test new file mode 100644 index 00000000000..5c2cae75bd0 --- /dev/null +++ b/mysql-test/suite/galera_3nodes/t/galera_wsrep_schema.test @@ -0,0 +1,83 @@ +# +# This test performs basic checks on the contents of the wsrep_schema +# +# wsrep_members_history checks are temporarily disabled until it +# can be made configurable. +# + +--source include/galera_cluster.inc +--source include/have_innodb.inc + +--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3 +--connection node_1 +# Save original auto_increment_offset values. +--let $node_1=node_1 +--let $node_2=node_2 +--let $node_3=node_3 +--source ../galera/include/auto_increment_offset_save.inc + +# Make the test fail if table structure has changed + +SHOW CREATE TABLE mysql.wsrep_cluster; +SHOW CREATE TABLE mysql.wsrep_cluster_members; +#disabled SHOW CREATE TABLE mysql.wsrep_member_history; + +# Checks for the wsrep_cluster table + +SELECT COUNT(*) = 1 FROM mysql.wsrep_cluster; +SELECT cluster_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_state_uuid') FROM mysql.wsrep_cluster; + +# Checks for the wsrep_cluster_members table + +SELECT COUNT(*) = 3 FROM mysql.wsrep_cluster_members; +SELECT COUNT(*) = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size') FROM mysql.wsrep_cluster_members; +SELECT COUNT(*) = 1 FROM mysql.wsrep_cluster_members WHERE node_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_gcomm_uuid'); + +SELECT node_incoming_address LIKE '127.0.0.1:%' from mysql.wsrep_cluster_members; +SELECT cluster_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_state_uuid') FROM mysql.wsrep_cluster_members; + +# Checks for the wsrep_cluster_member_history table + +#disabled SELECT COUNT(*) = 3 FROM mysql.wsrep_cluster_member_history; +#disabled SELECT COUNT(*) = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size') FROM mysql.wsrep_cluster_member_history; +SELECT COUNT(*) = 1 FROM mysql.wsrep_cluster_members WHERE node_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_gcomm_uuid'); + +#disabled SELECT last_view_id = (SELECT view_id FROM mysql.wsrep_cluster) FROM mysql.wsrep_cluster_member_history; +#disabled SELECT last_view_seqno = (SELECT view_seqno FROM mysql.wsrep_cluster) FROM mysql.wsrep_cluster_member_history; +#disabled SELECT node_incoming_address LIKE '127.0.0.1:%' from mysql.wsrep_cluster_member_history; +#disabled SELECT cluster_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_state_uuid') FROM mysql.wsrep_cluster_member_history; + +--connection node_2 +--source include/shutdown_mysqld.inc + +--connection node_1 +--source include/wait_until_connected_again.inc + +SELECT cluster_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_state_uuid') FROM mysql.wsrep_cluster; +SELECT COUNT(*) = 2 FROM mysql.wsrep_cluster_members; +#disabled SELECT COUNT(*) = 3 FROM mysql.wsrep_cluster_member_history; +#disabled SELECT COUNT(*) = 2 FROM mysql.wsrep_cluster_member_history WHERE last_view_id = (SELECT MAX(last_view_id) FROM mysql.wsrep_cluster_member_history); + +--connection node_2 +--source include/start_mysqld.inc +--source include/wait_until_connected_again.inc + +SELECT cluster_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_state_uuid') FROM mysql.wsrep_cluster; +SELECT COUNT(*) = 3 FROM mysql.wsrep_cluster_members; +#disabled SELECT COUNT(*) = 3 FROM mysql.wsrep_cluster_member_history WHERE last_view_id = (SELECT MAX(last_view_id) FROM mysql.wsrep_cluster_member_history); + +--connection node_1 +SELECT cluster_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_state_uuid') FROM mysql.wsrep_cluster; +SELECT COUNT(*) = 3 FROM mysql.wsrep_cluster_members; +#disabled SELECT COUNT(*) = 3 FROM mysql.wsrep_cluster_member_history WHERE last_view_id = (SELECT MAX(last_view_id) FROM mysql.wsrep_cluster_member_history); + +--source ../galera/include/auto_increment_offset_restore.inc + +--connection node_1 +CALL mtr.add_suppression("SYNC message from member"); + +--connection node_2 +CALL mtr.add_suppression("SYNC message from member"); + +--connection node_3 +CALL mtr.add_suppression("SYNC message from member"); |