diff options
Diffstat (limited to 'mysql-test/suite/galera_3nodes')
44 files changed, 500 insertions, 347 deletions
diff --git a/mysql-test/suite/galera_3nodes/galera_2x3nodes.cnf b/mysql-test/suite/galera_3nodes/galera_2x3nodes.cnf index 477789175fb..3a3c43781d5 100644 --- a/mysql-test/suite/galera_3nodes/galera_2x3nodes.cnf +++ b/mysql-test/suite/galera_3nodes/galera_2x3nodes.cnf @@ -11,19 +11,18 @@ wsrep_gtid_mode=1 gtid_ignore_duplicates auto_increment_increment=3 -wsrep-on=1 wsrep-provider=@ENV.WSREP_PROVIDER wsrep_node_address=127.0.0.1 # enforce read-committed characteristics across the cluster -# wsrep-causal-reads=ON -# wsrep-sync-wait=15 +wsrep-sync-wait=15 [mysqld.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' +wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.1.#galera_port;evs.suspect_timeout=PT30S;evs.inactive_timeout=PT90S;evs.install_timeout=PT60S;pc.wait_prim_timeout = PT60S' wsrep_sst_receive_address=127.0.0.2:@mysqld.1.#sst_port wsrep_node_incoming_address=127.0.0.1:@mysqld.1.port @@ -33,8 +32,9 @@ 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' +wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.2.#galera_port;evs.suspect_timeout=PT30S;evs.inactive_timeout=PT90S;evs.install_timeout=PT60S;pc.wait_prim_timeout = PT60S' wsrep_sst_receive_address=127.0.0.2:@mysqld.2.#sst_port wsrep_node_incoming_address=127.0.0.1:@mysqld.2.port @@ -44,8 +44,9 @@ 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' +wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.3.#galera_port;evs.suspect_timeout=PT30S;evs.inactive_timeout=PT90S;evs.install_timeout=PT60S;pc.wait_prim_timeout = PT60S' wsrep_sst_receive_address=127.0.0.2:@mysqld.3.#sst_port wsrep_node_incoming_address=127.0.0.1:@mysqld.3.port @@ -57,9 +58,9 @@ 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' +wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.4.#galera_port;evs.suspect_timeout=PT30S;evs.inactive_timeout=PT90S;evs.install_timeout=PT60S;pc.wait_prim_timeout = PT60S' wsrep_sst_receive_address=127.0.0.2:@mysqld.4.#sst_port wsrep_node_incoming_address=127.0.0.1:@mysqld.4.port @@ -70,8 +71,9 @@ 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' +wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.5.#galera_port;evs.suspect_timeout=PT30S;evs.inactive_timeout=PT90S;evs.install_timeout=PT60S;pc.wait_prim_timeout = PT60S' wsrep_sst_receive_address=127.0.0.2:@mysqld.5.#sst_port wsrep_node_incoming_address=127.0.0.1:@mysqld.5.port @@ -82,8 +84,9 @@ 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' +wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.6.#galera_port;evs.suspect_timeout=PT30S;evs.inactive_timeout=PT90S;evs.install_timeout=PT60S;pc.wait_prim_timeout = PT60S' wsrep_sst_receive_address=127.0.0.2:@mysqld.6.#sst_port wsrep_node_incoming_address=127.0.0.1:@mysqld.6.port @@ -107,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 e5aa81b8742..d33ed0caddf 100644 --- a/mysql-test/suite/galera_3nodes/galera_3nodes.cnf +++ b/mysql-test/suite/galera_3nodes/galera_3nodes.cnf @@ -7,7 +7,6 @@ innodb-autoinc-lock-mode=2 default-storage-engine=innodb auto_increment_increment=3 -wsrep-on=1 wsrep-provider=@ENV.WSREP_PROVIDER wsrep_node_address=127.0.0.1 # enforce read-committed characteristics across the cluster @@ -18,6 +17,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' @@ -29,6 +30,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' @@ -40,6 +42,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' @@ -56,12 +59,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 34ef5b00033..b1332a5f87c 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; connection node_2; connection node_3; @@ -23,10 +25,10 @@ SET SESSION wsrep_sync_wait = 15; SELECT COUNT(*) FROM t1; COUNT(*) 1 -Resuming node ... connection node_3; -CALL mtr.add_suppression("WSREP: gcs_caused.*"); -CALL mtr.add_suppression("WSREP: gcs/src/gcs_core.cpp:core_handle_uuid_msg.*"); +Resuming node ... +CALL mtr.add_suppression("WSREP: gcs_caused"); +CALL mtr.add_suppression("WSREP: gcs/src/gcs_core.cpp:core_handle_uuid_msg"); SET SESSION wsrep_sync_wait = 15; SELECT COUNT(*) FROM t1; COUNT(*) diff --git a/mysql-test/suite/galera_3nodes/r/galera_garbd.result b/mysql-test/suite/galera_3nodes/r/galera_garbd.result index fb7e729dc77..ebc5fdf33f4 100644 --- a/mysql-test/suite/galera_3nodes/r/galera_garbd.result +++ b/mysql-test/suite/galera_3nodes/r/galera_garbd.result @@ -1,3 +1,7 @@ +connection node_2; +connection node_1; +connection node_1; +connection node_2; connection node_1; connection node_2; connection node_3; diff --git a/mysql-test/suite/galera_3nodes/r/galera_gtid_2_cluster.result b/mysql-test/suite/galera_3nodes/r/galera_gtid_2_cluster.result index 35ca84119e7..afb94d493c4 100644 --- a/mysql-test/suite/galera_3nodes/r/galera_gtid_2_cluster.result +++ b/mysql-test/suite/galera_3nodes/r/galera_gtid_2_cluster.result @@ -1,27 +1,40 @@ +connection node_2; +connection node_1; +connection node_1; cluster 1 node 1 SHOW STATUS LIKE 'wsrep_cluster_size'; Variable_name Value wsrep_cluster_size 3 +connection node_2; cluster 1 node 2 SHOW STATUS LIKE 'wsrep_cluster_size'; Variable_name Value wsrep_cluster_size 3 +connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3; +connection node_3; cluster 1 node 3 SHOW STATUS LIKE 'wsrep_cluster_size'; Variable_name Value wsrep_cluster_size 3 +connect node_4, 127.0.0.1, root, , test, $NODE_MYPORT_4; +connection node_4; cluster 2 node 1 SHOW STATUS LIKE 'wsrep_cluster_size'; Variable_name Value wsrep_cluster_size 3 +connect node_5, 127.0.0.1, root, , test, $NODE_MYPORT_5; +connection node_5; cluster 2 node 2 SHOW STATUS LIKE 'wsrep_cluster_size'; Variable_name Value wsrep_cluster_size 3 +connect node_6, 127.0.0.1, root, , test, $NODE_MYPORT_6; +connection node_6; cluster 2 node 3 SHOW STATUS LIKE 'wsrep_cluster_size'; Variable_name Value wsrep_cluster_size 3 +connection node_1; change master to master_host='127.0.0.1', master_user='root', master_port=NODE_MYPORT_4, master_use_gtid=current_pos, ignore_server_ids=(12,13);; start slave; include/wait_for_slave_to_start.inc @@ -31,6 +44,7 @@ select @@gtid_binlog_state; select @@gtid_slave_pos; @@gtid_slave_pos +connection node_4; change master to master_host='127.0.0.1', master_user='root', master_port=NODE_MYPORT_1, master_use_gtid=current_pos, ignore_server_ids=(22,23);; start slave; include/wait_for_slave_to_start.inc @@ -41,15 +55,19 @@ select @@gtid_slave_pos; @@gtid_slave_pos cluster 1 node 1 +connection node_1; create table t1 (cluster_domain_id int ,node_server_id int, seq_no int); insert into t1 values (1, 11, 2); select @@gtid_binlog_state; @@gtid_binlog_state 1-11-2 #wait for sync cluster 1 and 2 +connection node_1; include/save_master_gtid.inc +connection node_4; include/sync_with_master_gtid.inc cluster 2 node 1 +connection node_4; select @@gtid_binlog_state; @@gtid_binlog_state 1-11-2 @@ -62,9 +80,12 @@ cluster_domain_id node_server_id seq_no 1 11 2 2 21 1 #wait for sync cluster 1 and 2 +connection node_1; include/save_master_gtid.inc +connection node_4; include/sync_with_master_gtid.inc cluster 1 node 2 +connection node_2; select @@gtid_binlog_state; @@gtid_binlog_state 1-11-2,2-21-1 @@ -73,9 +94,12 @@ select @@gtid_binlog_state; @@gtid_binlog_state 1-11-2,1-12-3,2-21-1 #wait for sync cluster 1 and 2 +connection node_1; include/save_master_gtid.inc +connection node_4; include/sync_with_master_gtid.inc cluster 1 node 3 +connection node_3; select @@gtid_binlog_state; @@gtid_binlog_state 1-11-2,1-12-3,2-21-1 @@ -84,9 +108,12 @@ select @@gtid_binlog_state; @@gtid_binlog_state 1-12-3,1-11-2,1-13-4,2-21-1 #wait for sync cluster 1 and 2 +connection node_1; include/save_master_gtid.inc +connection node_4; include/sync_with_master_gtid.inc cluster 2 node 2 +connection node_5; select @@gtid_binlog_state; @@gtid_binlog_state 1-12-3,1-11-2,1-13-4,2-21-1 @@ -95,9 +122,12 @@ select @@gtid_binlog_state; @@gtid_binlog_state 1-12-3,1-11-2,1-13-4,2-21-1,2-22-2 #wait for sync cluster 2 and 1 +connection node_4; include/save_master_gtid.inc +connection node_1; include/sync_with_master_gtid.inc cluster 2 node 3 +connection node_6; select @@gtid_binlog_state; @@gtid_binlog_state 1-12-3,1-11-2,1-13-4,2-21-1,2-22-2 @@ -106,28 +136,53 @@ select @@gtid_binlog_state; @@gtid_binlog_state 1-12-3,1-11-2,1-13-4,2-21-1,2-22-2,2-23-3 #wait for sync cluster 2 and 1 +connection node_4; include/save_master_gtid.inc +connection node_1; include/sync_with_master_gtid.inc cluster 1 node 1 +connection node_1; select @@gtid_binlog_state; @@gtid_binlog_state 1-12-3,1-11-2,1-13-4,2-21-1,2-22-2,2-23-3 drop table t1; stop slave; reset slave; +cluster 2 node 1 +connection node_4; +stop slave; +reset slave; +cluster 1 node 1 +connection node_1; change master to master_use_gtid=no, ignore_server_ids=(); +set global wsrep_on=OFF; reset master; +set global wsrep_on=ON; set global GTID_SLAVE_POS=""; cluster 2 node 1 -stop slave; -reset slave; +connection node_4; change master to master_use_gtid=no, ignore_server_ids=(); +set global wsrep_on=OFF; reset master; +set global wsrep_on=ON; set global GTID_SLAVE_POS=""; +connection node_2; +set global wsrep_on=OFF; reset master; +set global wsrep_on=ON; +connection node_3; +set global wsrep_on=OFF; reset master; +set global wsrep_on=ON; +connection node_5; +set global wsrep_on=OFF; reset master; +set global wsrep_on=ON; +connection node_6; +set global wsrep_on=OFF; reset master; +set global wsrep_on=ON; +connection node_1; change master to master_host='127.0.0.1', master_user='root', master_port=NODE_MYPORT_6, master_use_gtid=current_pos, ignore_server_ids=(12,13);; start slave; include/wait_for_slave_to_start.inc @@ -137,6 +192,7 @@ select @@gtid_binlog_state; select @@gtid_slave_pos; @@gtid_slave_pos +connection node_4; change master to master_host='127.0.0.1', master_user='root', master_port=NODE_MYPORT_3, master_use_gtid=current_pos, ignore_server_ids=(22,23);; start slave; include/wait_for_slave_to_start.inc @@ -147,15 +203,19 @@ select @@gtid_slave_pos; @@gtid_slave_pos cluster 1 node 1 +connection node_1; create table t1 (cluster_domain_id int ,node_server_id int, seq_no int); insert into t1 values (1, 11, 2); select @@gtid_binlog_state; @@gtid_binlog_state 1-11-2 #wait for sync cluster 1 and 2 +connection node_1; include/save_master_gtid.inc +connection node_4; include/sync_with_master_gtid.inc cluster 2 node 1 +connection node_4; insert into t1 values (2, 21, 1); select @@gtid_binlog_state; @@gtid_binlog_state @@ -165,9 +225,12 @@ cluster_domain_id node_server_id seq_no 1 11 2 2 21 1 #wait for sync cluster 1 and 2 +connection node_1; include/save_master_gtid.inc +connection node_4; include/sync_with_master_gtid.inc cluster 1 node 2 +connection node_2; select @@gtid_binlog_state; @@gtid_binlog_state 1-11-2,2-21-1 @@ -176,9 +239,12 @@ select @@gtid_binlog_state; @@gtid_binlog_state 1-11-2,1-12-3,2-21-1 #wait for sync cluster 1 and 2 +connection node_1; include/save_master_gtid.inc +connection node_4; include/sync_with_master_gtid.inc cluster 1 node 3 +connection node_3; select @@gtid_binlog_state; @@gtid_binlog_state 1-11-2,1-12-3,2-21-1 @@ -187,9 +253,12 @@ select @@gtid_binlog_state; @@gtid_binlog_state 1-12-3,1-11-2,1-13-4,2-21-1 #wait for sync cluster 1 and 2 +connection node_1; include/save_master_gtid.inc +connection node_4; include/sync_with_master_gtid.inc cluster 2 node 2 +connection node_5; select @@gtid_binlog_state; @@gtid_binlog_state 1-12-3,1-11-2,1-13-4,2-21-1 @@ -198,9 +267,12 @@ select @@gtid_binlog_state; @@gtid_binlog_state 1-12-3,1-11-2,1-13-4,2-21-1,2-22-2 #wait for sync cluster 2 and 1 +connection node_4; include/save_master_gtid.inc +connection node_1; include/sync_with_master_gtid.inc cluster 2 node 3 +connection node_6; select @@gtid_binlog_state; @@gtid_binlog_state 1-12-3,1-11-2,1-13-4,2-21-1,2-22-2 @@ -209,23 +281,43 @@ select @@gtid_binlog_state; @@gtid_binlog_state 1-12-3,1-11-2,1-13-4,2-21-1,2-22-2,2-23-3 #wait for sync cluster 2 and 1 +connection node_4; include/save_master_gtid.inc +connection node_1; include/sync_with_master_gtid.inc cluster 1 node 1 +connection node_1; select @@gtid_binlog_state; @@gtid_binlog_state 1-12-3,1-11-2,1-13-4,2-21-1,2-22-2,2-23-3 drop table t1; stop slave; change master to master_use_gtid=no, ignore_server_ids=(); +set global wsrep_on=OFF; reset master; +set global wsrep_on=ON; set global GTID_SLAVE_POS=""; cluster 2 node 1 +connection node_4; stop slave; change master to master_use_gtid=no, ignore_server_ids=(); +set global wsrep_on=OFF; reset master; +set global wsrep_on=ON; set global GTID_SLAVE_POS=""; +connection node_2; +set global wsrep_on=OFF; reset master; +set global wsrep_on=ON; +connection node_3; +set global wsrep_on=OFF; reset master; +set global wsrep_on=ON; +connection node_5; +set global wsrep_on=OFF; reset master; +set global wsrep_on=ON; +connection node_6; +set global wsrep_on=OFF; reset master; +set global wsrep_on=ON; 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_mariabackup_section.result b/mysql-test/suite/galera_3nodes/r/galera_ipv6_mariabackup_section.result index 53e35939a79..8ec1ff090ff 100644 --- a/mysql-test/suite/galera_3nodes/r/galera_ipv6_mariabackup_section.result +++ b/mysql-test/suite/galera_3nodes/r/galera_ipv6_mariabackup_section.result @@ -1,18 +1,24 @@ +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 SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; VARIABLE_VALUE = 3 1 +connection node_2; SET GLOBAL wsrep_provider_options='gmcast.isolate=1'; +connection node_1; CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; INSERT INTO t1 VALUES (1); +connection node_2; SET GLOBAL wsrep_provider_options='gmcast.isolate=0'; SELECT COUNT(*) = 1 FROM t1; COUNT(*) = 1 1 DROP TABLE t1; +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_ipv6_rsync_section.result b/mysql-test/suite/galera_3nodes/r/galera_ipv6_rsync_section.result index a2bf5f4d98c..3f810d3eb97 100644 --- a/mysql-test/suite/galera_3nodes/r/galera_ipv6_rsync_section.result +++ b/mysql-test/suite/galera_3nodes/r/galera_ipv6_rsync_section.result @@ -1,12 +1,17 @@ +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 SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; VARIABLE_VALUE = 3 1 +connection node_2; SET GLOBAL wsrep_provider_options='gmcast.isolate=1'; +connection node_1; CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; INSERT INTO t1 VALUES (1); +connection node_2; SET GLOBAL wsrep_provider_options='gmcast.isolate=0'; SELECT COUNT(*) = 1 FROM t1; COUNT(*) = 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_load_data_ist.result b/mysql-test/suite/galera_3nodes/r/galera_load_data_ist.result deleted file mode 100644 index cfb897e1076..00000000000 --- a/mysql-test/suite/galera_3nodes/r/galera_load_data_ist.result +++ /dev/null @@ -1,36 +0,0 @@ -connection node_1; -connection node_2; -connection node_3; -connection node_1; -CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB; -connection node_2; -connection node_3; -SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 1'; -SET SESSION wsrep_on = OFF; -SET SESSION wsrep_on = ON; -SET SESSION wsrep_sync_wait = 0; -connection node_2a; -SET SESSION wsrep_sync_wait = 0; -connection node_2; -SET GLOBAL wsrep_load_data_splitting = TRUE; -SET DEBUG_SYNC='intermediate_transaction_commit SIGNAL commited WAIT_FOR ist'; -connection node_2a; -SET DEBUG_SYNC='now WAIT_FOR commited'; -connection node_3; -SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 0'; -connection node_2a; -SET DEBUG_SYNC='now SIGNAL ist'; -connection node_1; -connection node_2; -SET DEBUG_SYNC='RESET'; -SELECT COUNT(*) = 95000 FROM t1; -COUNT(*) = 95000 -1 -wsrep_last_committed_diff -1 -connection node_1; -SET GLOBAL wsrep_load_data_splitting = 1;; -DROP TABLE t1; -disconnect node_3; -disconnect node_2; -disconnect node_1; 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 5fb9c1b9d66..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,3 +1,5 @@ +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 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 77991a6d468..cb327107e2a 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; connection node_1; connection node_2; connection node_3; 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 a7c1bf79c06..5ed5cbd95db 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 136fc8fd8a0..3f1140b175d 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,17 +60,17 @@ SELECT COUNT(*) FROM t1; # Reconnect node #3 so that MTR's end-of-test checks can run ---source include/galera_resume.inc --connection node_3 +--source include/galera_resume.inc --source include/wait_until_connected_again.inc -CALL mtr.add_suppression("WSREP: gcs_caused.*"); -CALL mtr.add_suppression("WSREP: gcs/src/gcs_core.cpp:core_handle_uuid_msg.*"); - --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"); +CALL mtr.add_suppression("WSREP: gcs/src/gcs_core.cpp:core_handle_uuid_msg"); SET SESSION wsrep_sync_wait = 15; SELECT COUNT(*) FROM t1; @@ -79,4 +79,3 @@ SELECT COUNT(*) FROM t1; DROP TABLE t1; # Restore original auto_increment_offset values. --source ../galera/include/auto_increment_offset_restore.inc - diff --git a/mysql-test/suite/galera_3nodes/t/galera_garbd.test b/mysql-test/suite/galera_3nodes/t/galera_garbd.test index 2d03e8897b9..fa3cba0ab16 100644 --- a/mysql-test/suite/galera_3nodes/t/galera_garbd.test +++ b/mysql-test/suite/galera_3nodes/t/galera_garbd.test @@ -7,9 +7,20 @@ --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 + --let $galera_connection_name = node_3 --let $galera_server_number = 3 --source include/galera_connect.inc +--source suite/galera/include/galera_base_port.inc +--let $NODE_GALERAPORT_3 = $_NODE_GALERAPORT # Save original auto_increment_offset values. --let $node_1=node_1 @@ -28,9 +39,33 @@ --source include/wait_condition.inc --echo Starting garbd ... ---let $gp1 = `SELECT SUBSTR(@@wsrep_provider_options, LOCATE('base_port =', @@wsrep_provider_options) + LENGTH('base_port = '))` ---let $galera_port_1 = `SELECT SUBSTR('$gp1', 1, LOCATE(';', '$gp1') - 1)` ---exec `dirname $WSREP_PROVIDER`/../../bin/garb/garbd --address "gcomm://127.0.0.1:$galera_port_1" --group my_wsrep_cluster --options 'base_port=$galera_port_3' > $MYSQL_TMP_DIR/garbd.log 2>&1 & +--perl +use strict; +use File::Basename; +my $provider_dirname = dirname($ENV{WSREP_PROVIDER}); +# Array of possible garbd executable paths to be checked +# base is $provider_dirname +my @garbd_executable_search = ( + # WSREP_PROVIDER is set in galera repository + ${provider_dirname}."/garb/garbd", + # MariaDB (PR #1147) + ${provider_dirname}."/../../bin/garb/garbd" +); +my $garbd_executable = ''; +foreach my $garbd (@garbd_executable_search) { + if (-f $garbd) { + $garbd_executable= $garbd; + } +} +if ($garbd_executable eq '') { + die("Didn't locate garbd\n"); +} +die unless open(FILE, ">$ENV{MYSQLTEST_VARDIR}/tmp/garbd.inc"); +print FILE "--exec $garbd_executable --address \"gcomm://127.0.0.1:\$NODE_GALERAPORT_1\" --group my_wsrep_cluster --options 'base_port=\$NODE_GALERAPORT_3' > \$MYSQL_TMP_DIR/garbd.log 2>&1 &\n"; +close(FILE); +EOF +--source $MYSQLTEST_VARDIR/tmp/garbd.inc +--remove_file $MYSQLTEST_VARDIR/tmp/garbd.inc --sleep 5 @@ -44,7 +79,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 @@ -61,6 +99,7 @@ DROP TABLE t1; --echo Restarting node #3 to satisfy MTR's end-of-test checks --connection node_3 +let $restart_noprint=2; --source include/start_mysqld.inc # Restore original auto_increment_offset values. diff --git a/mysql-test/suite/galera_3nodes/t/galera_gtid_2_cluster.test b/mysql-test/suite/galera_3nodes/t/galera_gtid_2_cluster.test index c679db1305d..925600ffaa8 100644 --- a/mysql-test/suite/galera_3nodes/t/galera_gtid_2_cluster.test +++ b/mysql-test/suite/galera_3nodes/t/galera_gtid_2_cluster.test @@ -138,27 +138,45 @@ select @@gtid_binlog_state; drop table t1; stop slave; reset slave; + +--echo cluster 2 node 1 +--connection node_4 +stop slave; +reset slave; + +--echo cluster 1 node 1 +--connection node_1 change master to master_use_gtid=no, ignore_server_ids=(); +set global wsrep_on=OFF; reset master; +set global wsrep_on=ON; set global GTID_SLAVE_POS=""; --sleep 2 --echo cluster 2 node 1 --connection node_4 -stop slave; -reset slave; change master to master_use_gtid=no, ignore_server_ids=(); +set global wsrep_on=OFF; reset master; +set global wsrep_on=ON; set global GTID_SLAVE_POS=""; --connection node_2 +set global wsrep_on=OFF; reset master; +set global wsrep_on=ON; --connection node_3 +set global wsrep_on=OFF; reset master; +set global wsrep_on=ON; --connection node_5 +set global wsrep_on=OFF; reset master; +set global wsrep_on=ON; --connection node_6 +set global wsrep_on=OFF; reset master; +set global wsrep_on=ON; #--enable_parsing # # This test creates 2x 3 nodes galera cluster. @@ -272,21 +290,33 @@ select @@gtid_binlog_state; drop table t1; stop slave; change master to master_use_gtid=no, ignore_server_ids=(); +set global wsrep_on=OFF; reset master; +set global wsrep_on=ON; set global GTID_SLAVE_POS=""; --echo cluster 2 node 1 --connection node_4 stop slave; change master to master_use_gtid=no, ignore_server_ids=(); +set global wsrep_on=OFF; reset master; +set global wsrep_on=ON; set global GTID_SLAVE_POS=""; --connection node_2 +set global wsrep_on=OFF; reset master; +set global wsrep_on=ON; --connection node_3 +set global wsrep_on=OFF; reset master; +set global wsrep_on=ON; --connection node_5 +set global wsrep_on=OFF; reset master; +set global wsrep_on=ON; --connection node_6 +set global wsrep_on=OFF; reset master; +set global wsrep_on=ON; 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 cd5c020ae38..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 suite/galera/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 84c33251c98..71d17c133a5 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_mariabackup_section.test b/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup_section.test index 95cd1a5bea5..71d17c133a5 100644 --- a/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup_section.test +++ b/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup_section.test @@ -39,31 +39,30 @@ DROP TABLE t1; --let $assert_only_after = CURRENT_TEST # The SSTs happen when nodes are started first time ---let $assert_count= 2 +--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 -# There will be 1 ISTs donated from node_1 in Galera 3. +# 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= 1 +--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 ---connection node_2 --let $assert_file = $MYSQLTEST_VARDIR/log/mysqld.2.err ---let $assert_only_after = CURRENT_TEST -# There is one ISTs on joiner at Galera 3. ---let $assert_count= 1 +# 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 -# There will be only one Prepared IST and in Galera 3 segnos are not printed ---let $assert_count= 1 ---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..c9c32f23230 100644 --- a/mysql-test/suite/galera_3nodes/t/galera_ipv6_mysqldump.test +++ b/mysql-test/suite/galera_3nodes/t/galera_ipv6_mysqldump.test @@ -59,6 +59,7 @@ INSERT INTO t1 VALUES (1); --connection node_2 --echo Starting server ... --let $start_mysqld_params = --wsrep_sst_auth=sst: --wsrep_sst_method=mysqldump --wsrep-sst-receive-address=[::1].1:$NODE_MYPORT_2 +let $restart_noprint=2; --source include/start_mysqld.inc #--source suite/galera/include/galera_load_provider.inc @@ -77,6 +78,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_load_data_ist.cnf b/mysql-test/suite/galera_3nodes/t/galera_load_data_ist.cnf deleted file mode 100644 index 35ecb8b5937..00000000000 --- a/mysql-test/suite/galera_3nodes/t/galera_load_data_ist.cnf +++ /dev/null @@ -1,4 +0,0 @@ -!include ../galera_3nodes.cnf - -[mysqld] -wsrep-causal-reads=OFF diff --git a/mysql-test/suite/galera_3nodes/t/galera_load_data_ist.test b/mysql-test/suite/galera_3nodes/t/galera_load_data_ist.test deleted file mode 100644 index e1140da229b..00000000000 --- a/mysql-test/suite/galera_3nodes/t/galera_load_data_ist.test +++ /dev/null @@ -1,124 +0,0 @@ ---source include/have_debug_sync.inc ---source include/galera_cluster.inc ---source include/have_innodb.inc ---source include/big_test.inc - -# Establish connection to the third node: ---let $galera_connection_name = node_3 ---let $galera_server_number = 3 ---source include/galera_connect.inc - -# Establish additional connection to the second node -# (which is used in the test for synchronization control): ---let $galera_connection_name = node_2a ---let $galera_server_number = 2 ---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 - -# Create a file for LOAD DATA with 95K entries ---connection node_1 ---perl -open(FILE, ">", "$ENV{'MYSQLTEST_VARDIR'}/tmp/galera_var_load_data_splitting.csv") or die; -foreach my $i (1..95000) { - print FILE "$i\n"; -} -EOF - -CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB; - -# Let's wait for the completion of the formation of a cluster -# of three nodes: ---let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; ---source include/wait_condition.inc ---connection node_2 ---source include/wait_until_ready.inc ---connection node_3 ---source include/wait_until_ready.inc - -# Disconnect the third node from the cluster: -SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 1'; -SET SESSION wsrep_on = OFF; ---let $wait_condition = SELECT VARIABLE_VALUE = 'non-Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status'; ---source include/wait_condition.inc -SET SESSION wsrep_on = ON; -SET SESSION wsrep_sync_wait = 0; - -# Disable sync wait for control connection: ---connection node_2a -SET SESSION wsrep_sync_wait = 0; - -# Let's wait until the other nodes stop seeing the third -# node in the cluster: ---let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; ---source include/wait_condition.inc - -# Record wsrep_last_committed as it was before LOAD DATA: ---connection node_2 ---let $wsrep_last_committed_before = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'` - -# Enable splitting for LOAD DATA: ---let $wsrep_load_data_splitting_orig = `SELECT @@wsrep_load_data_splitting` -SET GLOBAL wsrep_load_data_splitting = TRUE; - -# Stop after the first commit and wait for the IST signal: -SET DEBUG_SYNC='intermediate_transaction_commit SIGNAL commited WAIT_FOR ist'; - -# Perform the LOAD DATA statement: ---disable_query_log -let v1='$MYSQLTEST_VARDIR/tmp/galera_var_load_data_splitting.csv'; ---send_eval LOAD DATA INFILE $v1 INTO TABLE t1; ---enable_query_log - -# Wait for the first commit: ---connection node_2a -SET DEBUG_SYNC='now WAIT_FOR commited'; - -# Initiate the IST: ---connection node_3 -SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 0'; - -# Continue the execution of LOAD DATA: ---connection node_2a -SET DEBUG_SYNC='now SIGNAL ist'; - -# Let's wait for the recovery of the cluster -# of three nodes: ---connection node_1 ---let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; ---source include/wait_condition.inc - -# Save the LOAD DATA results: ---connection node_2 ---reap - -# Reset all synchronization points and signals: -SET DEBUG_SYNC='RESET'; - -# Read the wsrep_last_commited after LOAD DATA: ---let $wsrep_last_committed_after = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'` - -# Check the records: -SELECT COUNT(*) = 95000 FROM t1; - -# LOAD-ing 95K rows should causes 10 commits to be registered: ---disable_query_log ---eval SELECT $wsrep_last_committed_after = $wsrep_last_committed_before + 10 AS wsrep_last_committed_diff; ---enable_query_log - -# Restore the original splitting: ---connection node_1 ---eval SET GLOBAL wsrep_load_data_splitting = $wsrep_load_data_splitting_orig; - -# Drop test table: -DROP TABLE t1; - -# Restore original auto_increment_offset values: ---source ../galera/include/auto_increment_offset_restore.inc - ---let $galera_cluster_size=3 ---source include/galera_end.inc 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..082cb546e87 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 @@ -82,8 +87,8 @@ CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; --source include/assert_grep.inc # Restart one node - --connection node_2 +let $restart_noprint=2; --let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.2.expect --source include/start_mysqld.inc @@ -148,15 +153,18 @@ SET SESSION wsrep_on = OFF; --connection node_1 --let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.1.expect +let $restart_noprint=2; --source include/start_mysqld.inc --source include/wait_until_connected_again.inc --connection node_2 --let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.2.expect +let $restart_noprint=2; --source include/start_mysqld.inc --connection node_3 --let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.3.expect +let $restart_noprint=2; --source include/start_mysqld.inc --let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; @@ -169,6 +177,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 +187,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 e3f94a012b8..9f9d6da17b9 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 @@ -117,8 +117,9 @@ 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..fb3af2cd25d --- /dev/null +++ b/mysql-test/suite/galera_3nodes/t/galera_wsrep_schema.test @@ -0,0 +1,84 @@ +# +# 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 +let $restart_noprint=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"); |