summaryrefslogtreecommitdiff
path: root/mysql-test/suite/galera_3nodes
diff options
context:
space:
mode:
authorNirbhay Choubey <nirbhay@mariadb.com>2016-08-25 15:39:39 -0400
committerNirbhay Choubey <nirbhay@mariadb.com>2016-08-25 15:39:39 -0400
commit90266e8a0eb46867c990930fa4d305d2424929ba (patch)
tree787918cf537c678ab4f7a949520c847fa3fd8442 /mysql-test/suite/galera_3nodes
parentdfa3046db48d8439cf3eb02ba6623fe2f6e44f91 (diff)
parentb506d9527b4303b91f69fe6b6f21f911e5bfef72 (diff)
downloadmariadb-git-90266e8a0eb46867c990930fa4d305d2424929ba.tar.gz
Merge branch '10.0-galera' into bb-10.1-serg
Diffstat (limited to 'mysql-test/suite/galera_3nodes')
-rw-r--r--mysql-test/suite/galera_3nodes/galera_3nodes.cnf6
-rw-r--r--mysql-test/suite/galera_3nodes/r/galera_pc_bootstrap.result3
-rw-r--r--mysql-test/suite/galera_3nodes/r/galera_pc_weight.result2
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_certification_ccc.test21
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_innobackupex_backup.test6
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_ist_gcache_rollover.test2
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_pc_bootstrap.cnf5
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_pc_bootstrap.test3
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_pc_weight.cnf5
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_pc_weight.test7
10 files changed, 35 insertions, 25 deletions
diff --git a/mysql-test/suite/galera_3nodes/galera_3nodes.cnf b/mysql-test/suite/galera_3nodes/galera_3nodes.cnf
index 2a06c1cd5a9..eaa2899968c 100644
--- a/mysql-test/suite/galera_3nodes/galera_3nodes.cnf
+++ b/mysql-test/suite/galera_3nodes/galera_3nodes.cnf
@@ -18,7 +18,7 @@ wsrep-sync-wait=7
#ist_port=@OPT.port
#sst_port=@OPT.port
wsrep-cluster-address=gcomm://
-wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=10M'
+wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=10M;evs.suspect_timeout=PT10S'
wsrep_node_incoming_address=127.0.0.1:@mysqld.1.port
wsrep_sst_receive_address='127.0.0.1:@mysqld.1.#sst_port'
@@ -27,7 +27,7 @@ wsrep_sst_receive_address='127.0.0.1:@mysqld.1.#sst_port'
#ist_port=@OPT.port
#sst_port=@OPT.port
wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port'
-wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=10M'
+wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=10M;evs.suspect_timeout=PT10S'
wsrep_node_incoming_address=127.0.0.1:@mysqld.2.port
wsrep_sst_receive_address='127.0.0.1:@mysqld.2.#sst_port'
@@ -36,7 +36,7 @@ wsrep_sst_receive_address='127.0.0.1:@mysqld.2.#sst_port'
#ist_port=@OPT.port
#sst_port=@OPT.port
wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port'
-wsrep_provider_options='base_port=@mysqld.3.#galera_port;gcache.size=10M'
+wsrep_provider_options='base_port=@mysqld.3.#galera_port;gcache.size=10M;evs.suspect_timeout=PT10S'
wsrep_node_incoming_address=127.0.0.1:@mysqld.3.port
wsrep_sst_receive_address='127.0.0.1:@mysqld.3.#sst_port'
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 f5a4cad4a23..69995acb982 100644
--- a/mysql-test/suite/galera_3nodes/r/galera_pc_bootstrap.result
+++ b/mysql-test/suite/galera_3nodes/r/galera_pc_bootstrap.result
@@ -3,9 +3,6 @@ SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1';
SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1';
SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1';
SET SESSION wsrep_sync_wait = 0;
-SHOW STATUS LIKE 'wsrep_cluster_status';
-Variable_name Value
-wsrep_cluster_status non-Primary
SET GLOBAL wsrep_provider_options = 'pc.bootstrap=1';
SHOW STATUS LIKE 'wsrep_cluster_size';
Variable_name Value
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 85f923ad55e..6fb931638ef 100644
--- a/mysql-test/suite/galera_3nodes/r/galera_pc_weight.result
+++ b/mysql-test/suite/galera_3nodes/r/galera_pc_weight.result
@@ -1,6 +1,8 @@
SET GLOBAL wsrep_provider_options = 'pc.weight=3';
Suspending node ...
SET SESSION wsrep_sync_wait=0;
+SET SESSION wsrep_on=OFF;
+SET SESSION wsrep_on=ON;
SHOW STATUS LIKE 'wsrep_cluster_size';
Variable_name Value
wsrep_cluster_size 2
diff --git a/mysql-test/suite/galera_3nodes/t/galera_certification_ccc.test b/mysql-test/suite/galera_3nodes/t/galera_certification_ccc.test
index e19169a350c..b4fe10bff0d 100644
--- a/mysql-test/suite/galera_3nodes/t/galera_certification_ccc.test
+++ b/mysql-test/suite/galera_3nodes/t/galera_certification_ccc.test
@@ -10,12 +10,10 @@
--source include/galera_connect.inc
# Save original auto_increment_offset values.
---connection node_1
-let $auto_increment_offset_node_1 = `SELECT @@global.auto_increment_offset`;
---connection node_2
-let $auto_increment_offset_node_2 = `SELECT @@global.auto_increment_offset`;
---connection node_3
-let $auto_increment_offset_node_3 = `SELECT @@global.auto_increment_offset`;
+--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 PRIMARY KEY) ENGINE=InnoDB;
@@ -49,12 +47,7 @@ SELECT COUNT(*) = 2 FROM t1;
DROP TABLE t1;
# Restore original auto_increment_offset values.
---disable_query_log
---connection node_1
---eval SET @@global.auto_increment_offset = $auto_increment_offset_node_1;
---connection node_2
---eval SET @@global.auto_increment_offset = $auto_increment_offset_node_2;
---connection node_3
---eval SET @@global.auto_increment_offset = $auto_increment_offset_node_3;
---enable_query_log
+--source ../galera/include/auto_increment_offset_restore.inc
+
+--source include/galera_end.inc
diff --git a/mysql-test/suite/galera_3nodes/t/galera_innobackupex_backup.test b/mysql-test/suite/galera_3nodes/t/galera_innobackupex_backup.test
index af4a5fbf9d6..a6660bd08d1 100644
--- a/mysql-test/suite/galera_3nodes/t/galera_innobackupex_backup.test
+++ b/mysql-test/suite/galera_3nodes/t/galera_innobackupex_backup.test
@@ -13,8 +13,8 @@ INSERT INTO t1 VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
SELECT COUNT(*) = 10 FROM t1;
--exec rm -rf $MYSQL_TMP_DIR/innobackupex_backup
---exec innobackupex $MYSQL_TMP_DIR/innobackupex_backup --galera-info --defaults-file=$MYSQLTEST_VARDIR/my.cnf --defaults-group=mysqld.2 --port=$NODE_MYPORT_2 --host=127.0.0.1 --no-timestamp > $MYSQL_TMP_DIR/innobackupex-backup.log
---exec innobackupex $MYSQL_TMP_DIR/innobackupex_backup --apply-log --galera-info --defaults-file=$MYSQLTEST_VARDIR/my.cnf --defaults-group=mysqld.2 --port=$NODE_MYPORT_2 --host=127.0.0.1 --no-timestamp > $MYSQL_TMP_DIR/innobackupex-apply.log
+--exec innobackupex --defaults-file=$MYSQLTEST_VARDIR/my.cnf --defaults-group=mysqld.2 $MYSQL_TMP_DIR/innobackupex_backup --galera-info --port=$NODE_MYPORT_2 --host=127.0.0.1 --no-timestamp > $MYSQL_TMP_DIR/innobackupex-backup.log
+--exec innobackupex --defaults-file=$MYSQLTEST_VARDIR/my.cnf --defaults-group=mysqld.2 $MYSQL_TMP_DIR/innobackupex_backup --apply-log --galera-info --port=$NODE_MYPORT_2 --host=127.0.0.1 --no-timestamp > $MYSQL_TMP_DIR/innobackupex-apply.log
--source include/kill_galera.inc
--sleep 1
@@ -23,7 +23,7 @@ SELECT COUNT(*) = 10 FROM t1;
INSERT INTO t1 VALUES (11),(12),(13),(14),(15),(16),(17),(18),(19),(20);
--exec rm -rf $MYSQLTEST_VARDIR/mysqld.2/data/*
---exec innobackupex --copy-back $MYSQL_TMP_DIR/innobackupex_backup --defaults-file=$MYSQLTEST_VARDIR/my.cnf --defaults-group=mysqld.2 --port=$NODE_MYPORT_2 --host=127.0.0.1 > $MYSQL_TMP_DIR/innobackupex-restore.log
+--exec innobackupex --defaults-file=$MYSQLTEST_VARDIR/my.cnf --defaults-group=mysqld.2 --copy-back $MYSQL_TMP_DIR/innobackupex_backup --port=$NODE_MYPORT_2 --host=127.0.0.1 > $MYSQL_TMP_DIR/innobackupex-restore.log
#
# Convert the xtrabackup_galera_info into a grastate.dat file
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 7d8bbb39e35..8575d99f066 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
@@ -82,6 +82,8 @@ INSERT INTO t1 VALUES (51), (52), (53), (54), (55);
--connection node_3
--source include/wait_until_connected_again.inc
+sleep 5;
+
# Final checks
--connection node_2
SELECT COUNT(*) = 30 FROM t1;
diff --git a/mysql-test/suite/galera_3nodes/t/galera_pc_bootstrap.cnf b/mysql-test/suite/galera_3nodes/t/galera_pc_bootstrap.cnf
new file mode 100644
index 00000000000..d560b675427
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes/t/galera_pc_bootstrap.cnf
@@ -0,0 +1,5 @@
+# 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
+# prior tests such as galera_3nodes.galera_innobackupex_backup
+
+!include ../galera_3nodes.cnf
diff --git a/mysql-test/suite/galera_3nodes/t/galera_pc_bootstrap.test b/mysql-test/suite/galera_3nodes/t/galera_pc_bootstrap.test
index 6172ffcc743..f8381a3324b 100644
--- a/mysql-test/suite/galera_3nodes/t/galera_pc_bootstrap.test
+++ b/mysql-test/suite/galera_3nodes/t/galera_pc_bootstrap.test
@@ -23,7 +23,8 @@ SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1';
# Node #2 should be non-primary
SET SESSION wsrep_sync_wait = 0;
-SHOW STATUS LIKE 'wsrep_cluster_status';
+--let $wait_condition = SELECT variable_value = 'non-Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE variable_name = 'wsrep_cluster_status';
+--source include/wait_condition.inc
# Signal node #2 to bootstrap
--connection node_2
diff --git a/mysql-test/suite/galera_3nodes/t/galera_pc_weight.cnf b/mysql-test/suite/galera_3nodes/t/galera_pc_weight.cnf
new file mode 100644
index 00000000000..57026ce6928
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes/t/galera_pc_weight.cnf
@@ -0,0 +1,5 @@
+# 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
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 6585f1934a4..c118b7481bc 100644
--- a/mysql-test/suite/galera_3nodes/t/galera_pc_weight.test
+++ b/mysql-test/suite/galera_3nodes/t/galera_pc_weight.test
@@ -19,6 +19,11 @@ SET GLOBAL wsrep_provider_options = 'pc.weight=3';
SET SESSION wsrep_sync_wait=0;
--source include/wait_until_connected_again.inc
+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;
+
# We can not use SELECT queries here, as only SHOW is allowed to run.
# For nodes #2 and #3, we expect a non-primary component of size 2
@@ -45,7 +50,7 @@ SHOW STATUS LIKE 'wsrep_local_state_comment';
--connection node_1
--source include/galera_resume.inc
---sleep 5
+--sleep 10
--source include/wait_until_connected_again.inc
# For Node #1, we expect a primary component of size 1