summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Lindström <jan.lindstrom@mariadb.com>2019-03-12 11:45:59 +0200
committerJan Lindström <jan.lindstrom@mariadb.com>2019-03-12 14:36:37 +0200
commit3b2a568589006681a91ba73cfac5ccbbb4ec77c2 (patch)
tree52d450bddc3c618ab71434f6a3de2b9f392a69f1
parenta62e9a83c04738009918ae63da41c9bea7ab941e (diff)
downloadmariadb-git-3b2a568589006681a91ba73cfac5ccbbb4ec77c2.tar.gz
Test cleanups.
-rw-r--r--mysql-test/suite/galera/r/galera_kill_largechanges.result17
-rw-r--r--mysql-test/suite/galera/r/galera_kill_nochanges.result10
-rw-r--r--mysql-test/suite/galera/r/galera_kill_smallchanges.result5
-rw-r--r--mysql-test/suite/galera/r/galera_var_slave_threads.result38
-rw-r--r--mysql-test/suite/galera/suite.pm1
-rw-r--r--mysql-test/suite/galera/t/galera_kill_largechanges.test17
-rw-r--r--mysql-test/suite/galera/t/galera_kill_nochanges.test5
-rw-r--r--mysql-test/suite/galera/t/galera_kill_smallchanges.test11
-rw-r--r--mysql-test/suite/galera/t/galera_var_slave_threads.test29
9 files changed, 79 insertions, 54 deletions
diff --git a/mysql-test/suite/galera/r/galera_kill_largechanges.result b/mysql-test/suite/galera/r/galera_kill_largechanges.result
index 4eb5271fadf..a4144e84874 100644
--- a/mysql-test/suite/galera/r/galera_kill_largechanges.result
+++ b/mysql-test/suite/galera/r/galera_kill_largechanges.result
@@ -1,15 +1,14 @@
-call mtr.add_suppression("WSREP: Last Applied Action message in non-primary configuration from member .*");
SET GLOBAL wsrep_provider_options = 'pc.ignore_sb=true';
-CREATE TABLE ten (f1 INTEGER);
-INSERT INTO ten VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
+CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO ten VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10),(11);
CREATE TABLE t1 (f1 VARCHAR(128)) ENGINE=InnoDB;
Killing server ...
INSERT INTO t1 SELECT REPEAT('a', 128) FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5, ten AS a6;
-SELECT COUNT(*) = 1000000 FROM t1;
-COUNT(*) = 1000000
-1
-SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
-VARIABLE_VALUE = 2
-1
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+1771561
+SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+VARIABLE_VALUE
+2
DROP TABLE t1;
DROP TABLE ten;
diff --git a/mysql-test/suite/galera/r/galera_kill_nochanges.result b/mysql-test/suite/galera/r/galera_kill_nochanges.result
index cdcebdb4eee..4b37a3e64e2 100644
--- a/mysql-test/suite/galera/r/galera_kill_nochanges.result
+++ b/mysql-test/suite/galera/r/galera_kill_nochanges.result
@@ -3,10 +3,10 @@ INSERT INTO t1 VALUES (1);
Killing server ...
SET SESSION wsrep_sync_wait = 0;
SET SESSION wsrep_sync_wait = DEFAULT;
-SELECT COUNT(*) = 1 FROM t1;
-COUNT(*) = 1
-1
-SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
-VARIABLE_VALUE = 2
+SELECT COUNT(*) FROM t1;
+COUNT(*)
1
+SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+VARIABLE_VALUE
+2
DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/galera_kill_smallchanges.result b/mysql-test/suite/galera/r/galera_kill_smallchanges.result
index 863b49dd51b..199a530241e 100644
--- a/mysql-test/suite/galera/r/galera_kill_smallchanges.result
+++ b/mysql-test/suite/galera/r/galera_kill_smallchanges.result
@@ -1,10 +1,9 @@
-call mtr.add_suppression("WSREP: Last Applied Action message in non-primary configuration from member .*");
SET GLOBAL wsrep_provider_options = 'pc.ignore_sb=true';
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
Killing server ...
INSERT INTO t1 VALUES (1);
-SELECT COUNT(*) = 1 FROM t1;
-COUNT(*) = 1
+SELECT COUNT(*) FROM t1;
+COUNT(*)
1
SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE = 2
diff --git a/mysql-test/suite/galera/r/galera_var_slave_threads.result b/mysql-test/suite/galera/r/galera_var_slave_threads.result
index c7c6af2098f..5a78d84c24e 100644
--- a/mysql-test/suite/galera/r/galera_var_slave_threads.result
+++ b/mysql-test/suite/galera/r/galera_var_slave_threads.result
@@ -10,27 +10,30 @@ Warning 1292 Truncated incorrect wsrep_slave_threads value: '0'
SELECT @@wsrep_slave_threads = 1;
@@wsrep_slave_threads = 1
1
+# wsrep_slave_threads = 1
SET GLOBAL wsrep_slave_threads = 1;
-SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user';
-COUNT(*) = 2
-1
-SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%';
-COUNT(*) = 1
+SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user';
+COUNT(*)
+2
+SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%';
+COUNT(*)
1
SET GLOBAL wsrep_slave_threads = 64;
INSERT INTO t1 VALUES (1);
-SELECT COUNT(*) = 1 FROM t1;
-COUNT(*) = 1
+SELECT COUNT(*) FROM t1;
+COUNT(*)
1
-SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%';
-COUNT(*) = 1
+# wsrep_slave_threads = 64
+SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%';
+COUNT(*)
1
SET GLOBAL wsrep_slave_threads = 1;
-SELECT COUNT(*) = 64 FROM t2;
-COUNT(*) = 64
-1
-SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%';
-COUNT(*) = 1
+SELECT COUNT(*) FROM t2;
+COUNT(*)
+66
+# wsrep_slave_threads = 1
+SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%';
+COUNT(*)
1
SET GLOBAL wsrep_slave_threads = 1;
DROP TABLE t1;
@@ -44,10 +47,13 @@ SET GLOBAL wsrep_slave_threads = 1;
INSERT INTO t1 VALUES (DEFAULT);
INSERT INTO t1 VALUES (DEFAULT);
INSERT INTO t1 VALUES (DEFAULT);
+INSERT INTO t1 VALUES (DEFAULT);
+INSERT INTO t1 VALUES (DEFAULT);
+INSERT INTO t1 VALUES (DEFAULT);
DROP TABLE t1;
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE NAME LIKE 'test/t%';
NAME
-SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%';
-COUNT(*) = 1
+SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%';
+COUNT(*)
1
# End of tests
diff --git a/mysql-test/suite/galera/suite.pm b/mysql-test/suite/galera/suite.pm
index 8b7b7034fac..6e53e6e2e31 100644
--- a/mysql-test/suite/galera/suite.pm
+++ b/mysql-test/suite/galera/suite.pm
@@ -75,6 +75,7 @@ push @::global_suppressions,
qr|WSREP: Protocol violation. JOIN message sender .* is not in state transfer \(JOINED\). Message ignored.|,
qr|WSREP: Unsupported protocol downgrade: incremental data collection disabled. Expect abort.|,
qr(WSREP: Action message in non-primary configuration from member [0-9]*),
+ qr(WSREP: Last Applied Action message in non-primary configuration from member [0-9]*),
qr(WSREP: discarding established .*),
qr|WSREP: .*core_handle_uuid_msg.*|,
qr(WSREP: --wsrep-causal-reads=ON takes precedence over --wsrep-sync-wait=0. WSREP_SYNC_WAIT_BEFORE_READ is on),
diff --git a/mysql-test/suite/galera/t/galera_kill_largechanges.test b/mysql-test/suite/galera/t/galera_kill_largechanges.test
index 2803a43d85a..c671764fa9e 100644
--- a/mysql-test/suite/galera/t/galera_kill_largechanges.test
+++ b/mysql-test/suite/galera/t/galera_kill_largechanges.test
@@ -4,9 +4,11 @@
--source include/big_test.inc
--source include/galera_cluster.inc
---source include/have_innodb.inc
-call mtr.add_suppression("WSREP: Last Applied Action message in non-primary configuration from member .*");
+# Save original auto_increment_offset values.
+--let $node_1=node_1
+--let $node_2=node_2
+--source include/auto_increment_offset_save.inc
--connection node_1
# Enable the master to continue running during the split-brain situation that
@@ -14,8 +16,8 @@ call mtr.add_suppression("WSREP: Last Applied Action message in non-primary conf
--let $wsrep_provider_options_orig = `SELECT @@wsrep_provider_options`
SET GLOBAL wsrep_provider_options = 'pc.ignore_sb=true';
-CREATE TABLE ten (f1 INTEGER);
-INSERT INTO ten VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
+CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO ten VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10),(11);
CREATE TABLE t1 (f1 VARCHAR(128)) ENGINE=InnoDB;
--connection node_2
@@ -33,13 +35,16 @@ INSERT INTO t1 SELECT REPEAT('a', 128) FROM ten AS a1, ten AS a2, ten AS a3, ten
--source include/galera_connect.inc
--connection node_2a
-SELECT COUNT(*) = 1000000 FROM t1;
-SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+SELECT COUNT(*) FROM t1;
+SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
--connection node_1
--disable_query_log
--eval SET GLOBAL wsrep_provider_options = '$wsrep_provider_options_orig';
--enable_query_log
+--let $node_2=node_2a
+--source include/auto_increment_offset_restore.inc
+
DROP TABLE t1;
DROP TABLE ten;
diff --git a/mysql-test/suite/galera/t/galera_kill_nochanges.test b/mysql-test/suite/galera/t/galera_kill_nochanges.test
index 9360ad542f6..aa1648ca3ae 100644
--- a/mysql-test/suite/galera/t/galera_kill_nochanges.test
+++ b/mysql-test/suite/galera/t/galera_kill_nochanges.test
@@ -20,6 +20,7 @@ INSERT INTO t1 VALUES (1);
SET SESSION wsrep_sync_wait = 0;
--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_sync_wait = DEFAULT;
--connection node_2
@@ -30,8 +31,8 @@ SET SESSION wsrep_sync_wait = DEFAULT;
--source include/galera_connect.inc
--connection node_2a
-SELECT COUNT(*) = 1 FROM t1;
-SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+SELECT COUNT(*) FROM t1;
+SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
--let $node_2=node_2a
--source include/auto_increment_offset_restore.inc
diff --git a/mysql-test/suite/galera/t/galera_kill_smallchanges.test b/mysql-test/suite/galera/t/galera_kill_smallchanges.test
index 148c3dbc132..15e1727de03 100644
--- a/mysql-test/suite/galera/t/galera_kill_smallchanges.test
+++ b/mysql-test/suite/galera/t/galera_kill_smallchanges.test
@@ -3,9 +3,11 @@
#
--source include/galera_cluster.inc
---source include/have_innodb.inc
-call mtr.add_suppression("WSREP: Last Applied Action message in non-primary configuration from member .*");
+# Save original auto_increment_offset values.
+--let $node_1=node_1
+--let $node_2=node_2
+--source include/auto_increment_offset_save.inc
--connection node_1
@@ -30,7 +32,7 @@ INSERT INTO t1 VALUES (1);
--source include/galera_connect.inc
--connection node_2a
-SELECT COUNT(*) = 1 FROM t1;
+SELECT COUNT(*) FROM t1;
SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
--connection node_1
@@ -38,4 +40,7 @@ SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_N
--eval SET GLOBAL wsrep_provider_options = '$wsrep_provider_options_orig';
--enable_query_log
+--let $node_2=node_2a
+--source include/auto_increment_offset_restore.inc
+
DROP TABLE t1;
diff --git a/mysql-test/suite/galera/t/galera_var_slave_threads.test b/mysql-test/suite/galera/t/galera_var_slave_threads.test
index 1cee845b6ab..95cd2aac163 100644
--- a/mysql-test/suite/galera/t/galera_var_slave_threads.test
+++ b/mysql-test/suite/galera/t/galera_var_slave_threads.test
@@ -19,10 +19,12 @@ SET GLOBAL wsrep_slave_threads = 0;
SHOW WARNINGS;
SELECT @@wsrep_slave_threads = 1;
+--echo # wsrep_slave_threads = 1
SET GLOBAL wsrep_slave_threads = 1;
+
# There is a separate wsrep_aborter thread at all times
-SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user';
-SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%';
+SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user';
+SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%';
#
# Increase the number of slave threads. The change takes effect immediately
@@ -38,11 +40,13 @@ INSERT INTO t1 VALUES (1);
--let $wait_condition = SELECT COUNT(*) = 1 FROM t1;
--source include/wait_condition.inc
-SELECT COUNT(*) = 1 FROM t1;
+SELECT COUNT(*) FROM t1;
+--echo # wsrep_slave_threads = 64
--let $wait_condition = SELECT COUNT(*) = @@wsrep_slave_threads + 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user';
--source include/wait_condition.inc
-SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%';
+
+SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%';
#
# Reduce the number of slave threads. The change is not immediate -- a thread will only exit after a replication event
@@ -54,8 +58,8 @@ SET GLOBAL wsrep_slave_threads = 1;
--disable_result_log
--disable_query_log
-# Generate 64 replication events
---let $count = 64
+# Generate 66 replication events
+--let $count = 66
while ($count)
{
INSERT INTO t2 VALUES (DEFAULT);
@@ -65,15 +69,16 @@ while ($count)
--enable_result_log
--connection node_2
---let $wait_condition = SELECT COUNT(*) = 64 FROM t2;
+--let $wait_condition = SELECT COUNT(*) = 66 FROM t2;
--source include/wait_condition.inc
-SELECT COUNT(*) = 64 FROM t2;
+SELECT COUNT(*) FROM t2;
+--echo # wsrep_slave_threads = 1
--let $wait_condition = SELECT COUNT(*) = @@wsrep_slave_threads + 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user';
--source include/wait_condition.inc
-SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%';
+SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%';
--eval SET GLOBAL wsrep_slave_threads = $wsrep_slave_threads_orig
@@ -98,6 +103,9 @@ SET GLOBAL wsrep_slave_threads = 1;
INSERT INTO t1 VALUES (DEFAULT);
INSERT INTO t1 VALUES (DEFAULT);
INSERT INTO t1 VALUES (DEFAULT);
+INSERT INTO t1 VALUES (DEFAULT);
+INSERT INTO t1 VALUES (DEFAULT);
+INSERT INTO t1 VALUES (DEFAULT);
DROP TABLE t1;
--connection node_2
@@ -113,6 +121,7 @@ SELECT NAME FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE NAME LIKE 'test/t%';
#
--let $wait_condition = SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user'
--source include/wait_condition.inc
-SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%';
+
+SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%';
--echo # End of tests