Commit 1036886b authored by Jan Lindström's avatar Jan Lindström

Stabilize tests.

Changes to be committed:
	modified:   mysql-test/suite/galera_sr/disabled.def
	modified:   mysql-test/suite/galera_sr/r/GCF-561.result
	modified:   mysql-test/suite/galera_sr/r/galera_sr_ddl_master.result
	modified:   mysql-test/suite/galera_sr/r/galera_sr_kill_query.result
	modified:   mysql-test/suite/galera_sr/r/galera_sr_shutdown_slave.result
	new file:   mysql-test/suite/galera_sr/suite.pm
	modified:   mysql-test/suite/galera_sr/t/GCF-561.test
	modified:   mysql-test/suite/galera_sr/t/galera_sr_ddl_master.test
	modified:   mysql-test/suite/galera_sr/t/galera_sr_kill_query.test
	modified:   mysql-test/suite/galera_sr/t/galera_sr_shutdown_slave.test
parent 9c735784
galera_sr_table_contents : missing file
GCF-437 : test relies on InnoDB redo log size limtation
GCF-437 : test relies on InnoDB redo log size limitation
GCF-1060 : MDEV-20848 Galera test failure on galera_sr.GCF_1060
......@@ -16,18 +16,18 @@ SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
COUNT(*) > 0
1
ALTER TABLE t1 DROP COLUMN f2;
SELECT COUNT(*) = 0 FROM t1;
COUNT(*) = 0
1
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
COUNT(*) = 0
1
SELECT COUNT(*) AS EXPECT_0 FROM t1;
EXPECT_0
0
SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
EXPECT_0
0
connection node_1;
INSERT INTO t1 VALUES (6, 6);
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
COUNT(*) = 0
1
SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
EXPECT_0
0
INSERT INTO t1 VALUES (6, 6);
ERROR 21S01: Column count doesn't match value count at row 1
START TRANSACTION;
......@@ -41,10 +41,12 @@ SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
connection node_1;
COMMIT;
connection node_2;
SELECT COUNT(*) = 5 FROM t1;
COUNT(*) = 5
1
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
COUNT(*) = 0
1
set global wsrep_sync_wait=15;
SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ;
SELECT COUNT(*) AS EXPECT_5 FROM t1;
EXPECT_5
5
SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
EXPECT_0
0
DROP TABLE t1;
......@@ -48,6 +48,7 @@ SELECT COUNT(*) as expect_0 FROM mysql.wsrep_streaming_log;
expect_0
0
connection node_2;
SET TRANSACTION ISOLATION LEVEL REPEATABLE READ;
set global wsrep_sync_wait=15;
SELECT COUNT(*) as expect_6 FROM t1;
expect_6
......
......@@ -13,19 +13,21 @@ Killing query ...
connection node_1;
ERROR 70100: Query execution was interrupted
connection node_2;
SELECT COUNT(*) = 0 FROM t1;
COUNT(*) = 0
1
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
COUNT(*) = 0
1
SET TRANSACTION ISOLATION LEVEL REPEATABLE READ;
SELECT COUNT(*) AS EXPECT_0 FROM t1;
EXPECT_0
0
SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
EXPECT_0
0
INSERT INTO t1 SELECT 1 FROM ten AS t1, ten AS t2, ten AS t3;
SELECT COUNT(*) = 1000 FROM t1;
COUNT(*) = 1000
1
SELECT COUNT(*) AS EXPECT_1000 FROM t1;
EXPECT_1000
1000
connection node_1a;
SELECT COUNT(*) = 1000 FROM t1;
COUNT(*) = 1000
1
SET GLOBAL wsrep_sync_wait=15;
SELECT COUNT(*) AS EXPECT_1000 FROM t1;
EXPECT_1000
1000
DROP TABLE t1;
DROP TABLE ten;
connection node_2;
connection node_1;
connection node_1;
connection node_2;
connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE = InnoDB;
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
connection node_1a;
......@@ -24,21 +26,21 @@ connection node_2;
SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
COUNT(*) > 0
1
SELECT COUNT(*) = 6 FROM t1 WHERE f1 IN (11,12,13,14,15,16);
COUNT(*) = 6
1
SELECT COUNT(*) AS EXPECT_6 FROM t1 WHERE f1 IN (11,12,13,14,15,16);
EXPECT_6
6
connection node_1b;
INSERT INTO t1 VALUES (24),(25),(26);
COMMIT;
connection node_2;
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
COUNT(*) = 0
1
SELECT COUNT(*) = 12 FROM t1;
COUNT(*) = 12
1
SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
EXPECT_0
0
SELECT COUNT(*) AS EXPECT_12 FROM t1;
EXPECT_12
12
connection node_1;
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
COUNT(*) = 0
1
SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
EXPECT_0
0
DROP TABLE t1;
package My::Suite::Galera_sr;
use File::Basename;
use My::Find;
@ISA = qw(My::Suite);
return "Not run for embedded server" if $::opt_embedded_server;
return "WSREP is not compiled in" if not ::have_wsrep();
return "No wsrep provider library" unless ::have_wsrep_provider();
return ::wsrep_version_message() unless ::check_wsrep_version();
push @::global_suppressions,
(
qr(WSREP: wsrep_sst_receive_address is set to '127.0.0.1),
qr(WSREP: Could not open saved state file for reading: .*),
qr(WSREP: Could not open state file for reading: .*),
qr(WSREP: Gap in state sequence. Need state transfer.),
qr(WSREP: Failed to prepare for incremental state transfer:),
qr(WSREP:.*down context.*),
qr(WSREP: Failed to send state UUID:),
qr(WSREP: last inactive check more than .* skipping check),
qr(WSREP: Releasing seqno [0-9]* before [0-9]* was assigned.),
qr|WSREP: access file\(.*gvwstate.dat\) failed\(No such file or directory\)|,
qr(WSREP: Quorum: No node with complete state),
qr(WSREP: Initial position was provided by configuration or SST, avoiding override),
qr|WSREP: discarding established \(time wait\) .*|,
qr(WSREP: There are no nodes in the same segment that will ever be able to become donors, yet there is a suitable donor outside. Will use that one.),
qr(WSREP: evs::proto.*),
qr|WSREP: Ignoring possible split-brain \(allowed by configuration\) from view:.*|,
qr(WSREP: no nodes coming from prim view, prim not possible),
qr(WSREP: Member .* requested state transfer from .* but it is impossible to select State Transfer donor: Resource temporarily unavailable),
qr(WSREP: user message in state LEAVING),
qr(WSREP: .* sending install message failed: Transport endpoint is not connected),
qr(WSREP: .* sending install message failed: Resource temporarily unavailable),
qr(WSREP: Maximum writeset size exceeded by .*),
qr(WSREP: transaction size exceeded.*),
qr(WSREP: RBR event .*),
qr(WSREP: Ignoring error for TO isolated action: .*),
qr(WSREP: transaction size limit .*),
qr(WSREP: rbr write fail, .*),
qr(WSREP: .*Backend not supported: foo.*),
qr(WSREP: .*Failed to initialize backend using .*),
qr(WSREP: .*Failed to open channel 'my_wsrep_cluster' at .*),
qr(WSREP: gcs connect failed: Socket type not supported),
qr(WSREP: failed to open gcomm backend connection: 110: failed to reach primary view: 110 .*),
qr(WSREP: .*Failed to open backend connection: -110 .*),
qr(WSREP: .*Failed to open channel 'my_wsrep_cluster' at .*),
qr(WSREP: gcs connect failed: Connection timed out),
qr|WSREP: wsrep::connect\(.*\) failed: 7|,
qr(WSREP: SYNC message from member .* in non-primary configuration. Ignored.),
qr(WSREP: Could not find peer:),
qr(WSREP: TO isolation failed for: .*),
qr|WSREP: gcs_caused\(\) returned .*|,
qr|WSREP: Protocol violation. JOIN message sender .* is not in state transfer \(SYNCED\). Message ignored.|,
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),
qr|WSREP: JOIN message from member .* in non-primary configuration. Ignored.|,
qr|Query apply failed:*|,
qr(WSREP: Ignoring error*),
qr(WSREP: Failed to remove page file .*),
qr(WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to .*),
);
bless { };
......@@ -27,15 +27,15 @@ SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
ALTER TABLE t1 DROP COLUMN f2;
# SR applied before the DDL is no longer visible
SELECT COUNT(*) = 0 FROM t1;
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
SELECT COUNT(*) AS EXPECT_0 FROM t1;
SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
--connection node_1
# Transaction can not continue due to DDL, implicit ROLLBACK
--error ER_LOCK_DEADLOCK
INSERT INTO t1 VALUES (6, 6);
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
# DDL is now in effect
--error ER_WRONG_VALUE_COUNT_ON_ROW
......@@ -52,14 +52,16 @@ INSERT INTO t1 VALUES (5);
--connection node_2
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
--let $wait_condition = SELECT COUNT(*) > 0 FROM t1;
--let $wait_condition = SELECT COUNT(*) = 5 FROM t1;
--source include/wait_condition.inc
--connection node_1
COMMIT;
--connection node_2
SELECT COUNT(*) = 5 FROM t1;
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
set global wsrep_sync_wait=15;
SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ;
SELECT COUNT(*) AS EXPECT_5 FROM t1;
SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
DROP TABLE t1;
......@@ -59,9 +59,15 @@ SELECT * FROM t1;
SELECT COUNT(*) as expect_0 FROM mysql.wsrep_streaming_log;
--connection node_2
SET TRANSACTION ISOLATION LEVEL REPEATABLE READ;
set global wsrep_sync_wait=15;
--let $wait_condition = SELECT COUNT(*) = 6 FROM t1;
--source include/wait_condition.inc
SELECT COUNT(*) as expect_6 FROM t1;
SELECT * FROM t1;
--let $wait_condition = SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
--source include/wait_condition.inc
SELECT COUNT(*) as expect_0 FROM mysql.wsrep_streaming_log;
DROP TABLE t1;
......@@ -33,16 +33,18 @@ SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
# Confirm that the kill caused the updates made so far to be removed
--connection node_2
SELECT COUNT(*) = 0 FROM t1;
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
SET TRANSACTION ISOLATION LEVEL REPEATABLE READ;
SELECT COUNT(*) AS EXPECT_0 FROM t1;
SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
# Confirm that the transaction can be reissued in its entirety on the slave without a conflict
INSERT INTO t1 SELECT 1 FROM ten AS t1, ten AS t2, ten AS t3;
SELECT COUNT(*) = 1000 FROM t1;
SELECT COUNT(*) AS EXPECT_1000 FROM t1;
--connection node_1a
SELECT COUNT(*) = 1000 FROM t1;
SET GLOBAL wsrep_sync_wait=15;
SELECT COUNT(*) AS EXPECT_1000 FROM t1;
DROP TABLE t1;
DROP TABLE ten;
......@@ -4,6 +4,11 @@
--source include/galera_cluster.inc
# Save original auto_increment_offset values.
--let $node_1=node_1
--let $node_2=node_2
--source ../galera/include/auto_increment_offset_save.inc
--connection node_1
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE = InnoDB;
......@@ -32,6 +37,7 @@ INSERT INTO t1 VALUES (21),(22),(23);
--connection node_1
--let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
--source include/wait_condition.inc
# Commit one transaction while the slave is down
--connection node_1a
......@@ -44,7 +50,7 @@ COMMIT;
# Confirm SR table on slave has entries
SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
SELECT COUNT(*) = 6 FROM t1 WHERE f1 IN (11,12,13,14,15,16);
SELECT COUNT(*) AS EXPECT_6 FROM t1 WHERE f1 IN (11,12,13,14,15,16);
# Commit the second transaction on master after the slave has rejoined
--connection node_1b
......@@ -53,11 +59,14 @@ COMMIT;
# Confirm that SR table on slave is empty
--connection node_2
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
SELECT COUNT(*) = 12 FROM t1;
SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
SELECT COUNT(*) AS EXPECT_12 FROM t1;
# SR table on master should be empty too
--connection node_1
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
DROP TABLE t1;
# Restore original auto_increment_offset values.
--source ../galera/include/auto_increment_offset_restore.inc
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment