revision-id: dcaabf07fdfb608fe3e6485e392bc10757891ad2 (mariadb-10.3.6-151-gdcaabf07fdf) parent(s): e17fc72940403293977ae2e5b162cf9e20eb30a7 author: Jan Lindström committer: Jan Lindström timestamp: 2019-02-15 09:33:49 +0200 message: MDEV-18109: Galera 4: run galera_sr test suite Fix some of the galera_sr suite test failures. Remove tests that are not going to be run because required feature is not supported. modified: mysql-test/suite/galera_sr/disabled.def deleted: mysql-test/suite/galera_sr/r/GCF-574.result modified: mysql-test/suite/galera_sr/r/galera_sr_cc_slave.result modified: mysql-test/suite/galera_sr/r/galera_sr_kill_all_norecovery.result modified: mysql-test/suite/galera_sr/r/galera_sr_load_data.result deleted: mysql-test/suite/galera_sr/r/galera_sr_sbr.result modified: mysql-test/suite/galera_sr/r/mysql-wsrep-features#148.result deleted: mysql-test/suite/galera_sr/r/mysql-wsrep-features#29.result deleted: mysql-test/suite/galera_sr/t/GCF-574.test modified: mysql-test/suite/galera_sr/t/galera_sr_cc_slave.test modified: mysql-test/suite/galera_sr/t/galera_sr_kill_all_norecovery.cnf modified: mysql-test/suite/galera_sr/t/galera_sr_kill_all_norecovery.test modified: mysql-test/suite/galera_sr/t/galera_sr_load_data.test deleted: mysql-test/suite/galera_sr/t/galera_sr_sbr.test modified: mysql-test/suite/galera_sr/t/mysql-wsrep-features#148.test deleted: mysql-test/suite/galera_sr/t/mysql-wsrep-features#29.test --- mysql-test/suite/galera_sr/disabled.def | 4 +-- mysql-test/suite/galera_sr/r/GCF-574.result | 11 -------- .../suite/galera_sr/r/galera_sr_cc_slave.result | 2 ++ .../r/galera_sr_kill_all_norecovery.result | 2 ++ .../suite/galera_sr/r/galera_sr_load_data.result | 1 + mysql-test/suite/galera_sr/r/galera_sr_sbr.result | 16 ----------- .../galera_sr/r/mysql-wsrep-features#148.result | 9 +++---- .../galera_sr/r/mysql-wsrep-features#29.result | 14 ---------- mysql-test/suite/galera_sr/t/GCF-574.test | 27 ------------------- .../suite/galera_sr/t/galera_sr_cc_slave.test | 8 ++++++ .../galera_sr/t/galera_sr_kill_all_norecovery.cnf | 4 +++ .../galera_sr/t/galera_sr_kill_all_norecovery.test | 7 +++++ .../suite/galera_sr/t/galera_sr_load_data.test | 10 +++++++ mysql-test/suite/galera_sr/t/galera_sr_sbr.test | 31 ---------------------- .../galera_sr/t/mysql-wsrep-features#148.test | 6 +++-- .../suite/galera_sr/t/mysql-wsrep-features#29.test | 23 ---------------- 16 files changed, 42 insertions(+), 133 deletions(-) diff --git a/mysql-test/suite/galera_sr/disabled.def b/mysql-test/suite/galera_sr/disabled.def index 94f328bf31b..8bed54eb5c6 100644 --- a/mysql-test/suite/galera_sr/disabled.def +++ b/mysql-test/suite/galera_sr/disabled.def @@ -1,3 +1 @@ -mysql-wsrep-features#29 : binlog_format=STATEMENT not supported with SR -GCF-574 : CTAS is not supported together with SR -galera_sr_sbr : binlog_format=STATEMENT not supported with SR +galera_sr_table_contents : missing file diff --git a/mysql-test/suite/galera_sr/r/GCF-574.result b/mysql-test/suite/galera_sr/r/GCF-574.result deleted file mode 100644 index bbf817c8c6c..00000000000 --- a/mysql-test/suite/galera_sr/r/GCF-574.result +++ /dev/null @@ -1,11 +0,0 @@ -CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB; -INSERT INTO ten VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10); -SET SESSION wsrep_trx_fragment_size = 1; -CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4; -wsrep_last_committed_delta -1 -SELECT COUNT(*) = 10000 FROM t1; -COUNT(*) = 10000 -1 -DROP TABLE t1; -DROP TABLE ten; diff --git a/mysql-test/suite/galera_sr/r/galera_sr_cc_slave.result b/mysql-test/suite/galera_sr/r/galera_sr_cc_slave.result index 671745c8686..d439380e2ce 100644 --- a/mysql-test/suite/galera_sr/r/galera_sr_cc_slave.result +++ b/mysql-test/suite/galera_sr/r/galera_sr_cc_slave.result @@ -1,5 +1,7 @@ connection node_2; connection node_1; +connection node_1; +connection node_2; connection node_2; SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log; COUNT(*) = 0 diff --git a/mysql-test/suite/galera_sr/r/galera_sr_kill_all_norecovery.result b/mysql-test/suite/galera_sr/r/galera_sr_kill_all_norecovery.result index 7525cd6d4b7..d9d91b5e3c5 100644 --- a/mysql-test/suite/galera_sr/r/galera_sr_kill_all_norecovery.result +++ b/mysql-test/suite/galera_sr/r/galera_sr_kill_all_norecovery.result @@ -1,5 +1,7 @@ connection node_2; connection node_1; +connection node_1; +connection node_2; CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB; SET SESSION wsrep_trx_fragment_size = 1; SET AUTOCOMMIT=OFF; diff --git a/mysql-test/suite/galera_sr/r/galera_sr_load_data.result b/mysql-test/suite/galera_sr/r/galera_sr_load_data.result index 354f9ca718a..99885b42fa0 100644 --- a/mysql-test/suite/galera_sr/r/galera_sr_load_data.result +++ b/mysql-test/suite/galera_sr/r/galera_sr_load_data.result @@ -10,4 +10,5 @@ COUNT(*) = 20000 1 wsrep_last_committed_diff 1 +connection node_1; DROP TABLE t1; diff --git a/mysql-test/suite/galera_sr/r/galera_sr_sbr.result b/mysql-test/suite/galera_sr/r/galera_sr_sbr.result deleted file mode 100644 index c83db3d5ea6..00000000000 --- a/mysql-test/suite/galera_sr/r/galera_sr_sbr.result +++ /dev/null @@ -1,16 +0,0 @@ -CREATE TABLE t1 (id INT) ENGINE=InnoDB; -SET SESSION wsrep_trx_fragment_size = 1; -SET SESSION BINLOG_FORMAT='STATEMENT'; -SET AUTOCOMMIT=OFF; -START TRANSACTION; -INSERT INTO t1 VALUES (1); -INSERT INTO t1 VALUES (2); -INSERT INTO t1 VALUES (3); -INSERT INTO t1 VALUES (4); -INSERT INTO t1 VALUES (5); -SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; -COMMIT; -SELECT COUNT(*) = 5 FROM t1; -COUNT(*) = 5 -1 -DROP TABLE t1; diff --git a/mysql-test/suite/galera_sr/r/mysql-wsrep-features#148.result b/mysql-test/suite/galera_sr/r/mysql-wsrep-features#148.result index a85c0f302d0..98bf13e9d2b 100644 --- a/mysql-test/suite/galera_sr/r/mysql-wsrep-features#148.result +++ b/mysql-test/suite/galera_sr/r/mysql-wsrep-features#148.result @@ -6,9 +6,7 @@ CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB; INSERT INTO t2 VALUES (6),(7),(8),(9),(10),(1); connection node_2; SET GLOBAL wsrep_slave_threads = 2; -SET GLOBAL DEBUG = 'd,sync.wsrep_apply_cb'; -Warnings: -Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead +SET GLOBAL debug_dbug = 'd,sync.wsrep_apply_cb'; connection node_1; SET SESSION wsrep_trx_fragment_size = 1; SET AUTOCOMMIT=OFF; @@ -28,9 +26,7 @@ connection node_1; Got one of the listed errors connection node_2; SET GLOBAL wsrep_slave_threads = 1; -SET GLOBAL DEBUG = ''; -Warnings: -Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead +SET GLOBAL debug_dbug = ''; SET DEBUG_SYNC='now SIGNAL signal.wsrep_apply_cb'; SET DEBUG_SYNC='now SIGNAL signal.wsrep_apply_cb'; SET DEBUG_SYNC='now SIGNAL signal.wsrep_apply_cb'; @@ -40,3 +36,4 @@ COUNT(*) = 10 1 DROP TABLE t1; DROP TABLE t2; +SET DEBUG_SYNC = RESET; diff --git a/mysql-test/suite/galera_sr/r/mysql-wsrep-features#29.result b/mysql-test/suite/galera_sr/r/mysql-wsrep-features#29.result deleted file mode 100644 index 29b17ea07d6..00000000000 --- a/mysql-test/suite/galera_sr/r/mysql-wsrep-features#29.result +++ /dev/null @@ -1,14 +0,0 @@ -SET SESSION wsrep_trx_fragment_size = 1; -SET SESSION binlog_format = STATEMENT; -create table t1 (id int not null, f_id int not null, f int not null, -primary key(f_id, id)) engine=innodb; -create table t2 (id int not null,s_id int not null,s varchar(200), -primary key(id)) engine=innodb; -INSERT INTO t1 VALUES (8, 1, 3); -INSERT INTO t1 VALUES (1, 2, 1); -INSERT INTO t2 VALUES (1, 0, ''); -INSERT INTO t2 VALUES (8, 1, ''); -DELETE ml.* FROM t1 AS ml LEFT JOIN t2 AS mm ON (mm.id=ml.id) -WHERE mm.id IS NULL; -DROP TABLE t1; -DROP TABLE t2; diff --git a/mysql-test/suite/galera_sr/t/GCF-574.test b/mysql-test/suite/galera_sr/t/GCF-574.test deleted file mode 100644 index c9d7c405d14..00000000000 --- a/mysql-test/suite/galera_sr/t/GCF-574.test +++ /dev/null @@ -1,27 +0,0 @@ ---source include/galera_cluster.inc ---source include/have_innodb.inc - -# -# Test CREATE TABLE ... SELECT with Streaming Replication -# - ---connection node_1 -CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB; -INSERT INTO ten VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10); - ---let $wsrep_last_committed_before = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'` - -SET SESSION wsrep_trx_fragment_size = 1; -CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4; - ---let $wsrep_last_committed_after = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'` ---disable_query_log ---eval SELECT ($wsrep_last_committed_after - $wsrep_last_committed_before) > 1 AS wsrep_last_committed_delta; ---enable_query_log - ---connection node_2 -SELECT COUNT(*) = 10000 FROM t1; - ---connection node_1 -DROP TABLE t1; -DROP TABLE ten; diff --git a/mysql-test/suite/galera_sr/t/galera_sr_cc_slave.test b/mysql-test/suite/galera_sr/t/galera_sr_cc_slave.test index 8c790ac7cd2..7ba0f253b4a 100644 --- a/mysql-test/suite/galera_sr/t/galera_sr_cc_slave.test +++ b/mysql-test/suite/galera_sr/t/galera_sr_cc_slave.test @@ -7,6 +7,11 @@ # leave the cluster. # +# Save original auto_increment_offset values. +--let $node_1=node_1 +--let $node_2=node_2 +--source ../../galera/include/auto_increment_offset_save.inc + # Start with a clean slate --connection node_2 SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log; @@ -95,3 +100,6 @@ SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log; DROP TABLE t1; CALL mtr.add_suppression("points to own listening address, blacklisting"); + +# Restore original auto_increment_offset values. +--source ../../galera/include/auto_increment_offset_restore.inc diff --git a/mysql-test/suite/galera_sr/t/galera_sr_kill_all_norecovery.cnf b/mysql-test/suite/galera_sr/t/galera_sr_kill_all_norecovery.cnf index 6422d7541ba..82c001e0131 100644 --- a/mysql-test/suite/galera_sr/t/galera_sr_kill_all_norecovery.cnf +++ b/mysql-test/suite/galera_sr/t/galera_sr_kill_all_norecovery.cnf @@ -2,3 +2,7 @@ [mysqld.1] wsrep_provider_options='base_port=@mysqld.1.#galera_port;pc.recovery=false' +auto_increment_offset=1 + +[mysqld.2] +auto_increment_offset=2 diff --git a/mysql-test/suite/galera_sr/t/galera_sr_kill_all_norecovery.test b/mysql-test/suite/galera_sr/t/galera_sr_kill_all_norecovery.test index 042e3d3ef57..5a1f9e7997a 100644 --- a/mysql-test/suite/galera_sr/t/galera_sr_kill_all_norecovery.test +++ b/mysql-test/suite/galera_sr/t/galera_sr_kill_all_norecovery.test @@ -6,6 +6,11 @@ --source include/galera_cluster.inc --source include/big_test.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 + CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB; SET SESSION wsrep_trx_fragment_size = 1; SET AUTOCOMMIT=OFF; @@ -50,4 +55,6 @@ SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; SELECT COUNT(*) = 0 FROM t1; SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log; +--source ../../galera/include/auto_increment_offset_restore.inc + DROP TABLE t1; diff --git a/mysql-test/suite/galera_sr/t/galera_sr_load_data.test b/mysql-test/suite/galera_sr/t/galera_sr_load_data.test index 70f0926ed1b..363443a9e64 100644 --- a/mysql-test/suite/galera_sr/t/galera_sr_load_data.test +++ b/mysql-test/suite/galera_sr/t/galera_sr_load_data.test @@ -24,6 +24,9 @@ CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB; --connection node_1 --disable_query_log +--disable_warnings +set global wsrep_load_data_splitting=ON; +--enable_warnings --eval LOAD DATA INFILE '$MYSQLTEST_VARDIR/tmp/galera_sr_load_data.csv' INTO TABLE t1; --enable_query_log @@ -36,4 +39,11 @@ SELECT COUNT(*) = 20000 FROM t1; --eval SELECT $wsrep_last_committed_after - $wsrep_last_committed_before = 3 AS wsrep_last_committed_diff --enable_query_log +--connection node_1 +--disable_query_log +--disable_warnings +set global wsrep_load_data_splitting=OFF; +--enable_warnings +--enable_query_log + DROP TABLE t1; diff --git a/mysql-test/suite/galera_sr/t/galera_sr_sbr.test b/mysql-test/suite/galera_sr/t/galera_sr_sbr.test deleted file mode 100644 index a24a520af60..00000000000 --- a/mysql-test/suite/galera_sr/t/galera_sr_sbr.test +++ /dev/null @@ -1,31 +0,0 @@ ---source include/galera_cluster.inc ---source include/have_innodb.inc - -# -# Test that SR does not assert in the presence of statement-based replication events -# - ---connection node_1 -CREATE TABLE t1 (id INT) ENGINE=InnoDB; -SET SESSION wsrep_trx_fragment_size = 1; -SET SESSION BINLOG_FORMAT='STATEMENT'; -SET AUTOCOMMIT=OFF; -START TRANSACTION; -INSERT INTO t1 VALUES (1); -INSERT INTO t1 VALUES (2); -INSERT INTO t1 VALUES (3); -INSERT INTO t1 VALUES (4); -INSERT INTO t1 VALUES (5); - ---connection node_2 -SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; ---let $wait_condition = SELECT COUNT(*) > 0 FROM t1; ---source include/wait_condition.inc - ---connection node_1 -COMMIT; - ---connection node_2 -SELECT COUNT(*) = 5 FROM t1; - -DROP TABLE t1; diff --git a/mysql-test/suite/galera_sr/t/mysql-wsrep-features#148.test b/mysql-test/suite/galera_sr/t/mysql-wsrep-features#148.test index 5210b9ce99e..e0a443061df 100644 --- a/mysql-test/suite/galera_sr/t/mysql-wsrep-features#148.test +++ b/mysql-test/suite/galera_sr/t/mysql-wsrep-features#148.test @@ -16,7 +16,7 @@ INSERT INTO t2 VALUES (6),(7),(8),(9),(10),(1); --connection node_2 SET GLOBAL wsrep_slave_threads = 2; -SET GLOBAL DEBUG = 'd,sync.wsrep_apply_cb'; +SET GLOBAL debug_dbug = 'd,sync.wsrep_apply_cb'; # Begin SR transaction --connection node_1 @@ -48,7 +48,7 @@ COMMIT; --connection node_2 SET GLOBAL wsrep_slave_threads = 1; -SET GLOBAL DEBUG = ''; +SET GLOBAL debug_dbug = ''; SET DEBUG_SYNC='now SIGNAL signal.wsrep_apply_cb'; SET DEBUG_SYNC='now SIGNAL signal.wsrep_apply_cb'; SET DEBUG_SYNC='now SIGNAL signal.wsrep_apply_cb'; @@ -58,3 +58,5 @@ SELECT COUNT(*) = 10 FROM t1; DROP TABLE t1; DROP TABLE t2; + +SET DEBUG_SYNC = RESET; diff --git a/mysql-test/suite/galera_sr/t/mysql-wsrep-features#29.test b/mysql-test/suite/galera_sr/t/mysql-wsrep-features#29.test deleted file mode 100644 index 2349fe9979f..00000000000 --- a/mysql-test/suite/galera_sr/t/mysql-wsrep-features#29.test +++ /dev/null @@ -1,23 +0,0 @@ -# -# mysql-wsrep-features#29 Unwarranted deadlock error with SR and a single-node cluster -# - -SET SESSION wsrep_trx_fragment_size = 1; -SET SESSION binlog_format = STATEMENT; - -create table t1 (id int not null, f_id int not null, f int not null, -primary key(f_id, id)) engine=innodb; - -create table t2 (id int not null,s_id int not null,s varchar(200), -primary key(id)) engine=innodb; - -INSERT INTO t1 VALUES (8, 1, 3); -INSERT INTO t1 VALUES (1, 2, 1); -INSERT INTO t2 VALUES (1, 0, ''); -INSERT INTO t2 VALUES (8, 1, ''); - -DELETE ml.* FROM t1 AS ml LEFT JOIN t2 AS mm ON (mm.id=ml.id) -WHERE mm.id IS NULL; - -DROP TABLE t1; -DROP TABLE t2;