From a22dc6268b3c76503fecc15933b37d862a774ffb Mon Sep 17 00:00:00 2001 From: Julius Goryavsky Date: Fri, 25 Jan 2019 12:29:50 +0100 Subject: [PATCH] MDEV-18379: Unification of check for IPv6 Currently, the three-node mtr suite for Galera (galera_3nodes) uses a separate IPv6 availability check using the "have_ipv6.inc" file. This check duplicates a more accurate check at suite.pm level, which can be used by including the file "check_ipv6.inc". This patch removes this discrepancy between suites. In addition, one of the files in the galera_3nodes suite does not contain the option "--bind-address=::" which is needed for the test to work correctly with IPv6 (at least on some systems), since without it the server will not wait for connections on the IPv6 interface. https://jira.mariadb.org/browse/MDEV-18379 --- .../suite/galera_3nodes/include/have_ipv6.inc | 15 --------------- mysql-test/suite/galera_3nodes/r/GAL-501.result | 3 +++ mysql-test/suite/galera_3nodes/t/GAL-501.opt | 1 + mysql-test/suite/galera_3nodes/t/GAL-501.test | 2 +- .../galera_3nodes/t/galera_ipv6_mariabackup.test | 2 +- .../galera_3nodes/t/galera_ipv6_mysqldump.test | 2 +- .../suite/galera_3nodes/t/galera_ipv6_rsync.test | 2 +- 7 files changed, 8 insertions(+), 19 deletions(-) delete mode 100644 mysql-test/suite/galera_3nodes/include/have_ipv6.inc create mode 100644 mysql-test/suite/galera_3nodes/t/GAL-501.opt diff --git a/mysql-test/suite/galera_3nodes/include/have_ipv6.inc b/mysql-test/suite/galera_3nodes/include/have_ipv6.inc deleted file mode 100644 index 560cad03350..00000000000 --- a/mysql-test/suite/galera_3nodes/include/have_ipv6.inc +++ /dev/null @@ -1,15 +0,0 @@ -# Check if ipv6 is available. -# ---disable_query_log ---disable_result_log -connect (checkcon123456789,::1,root,,test); -if($mysql_errno) -{ - skip No IPv6 support; -} -connection default; -disconnect checkcon123456789; ---enable_result_log ---enable_query_log -# end check - diff --git a/mysql-test/suite/galera_3nodes/r/GAL-501.result b/mysql-test/suite/galera_3nodes/r/GAL-501.result index a2bf5f4d98c..bcf74142144 100644 --- a/mysql-test/suite/galera_3nodes/r/GAL-501.result +++ b/mysql-test/suite/galera_3nodes/r/GAL-501.result @@ -4,9 +4,12 @@ VARIABLE_VALUE LIKE '%[::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/t/GAL-501.opt b/mysql-test/suite/galera_3nodes/t/GAL-501.opt new file mode 100644 index 00000000000..c2bb4d156af --- /dev/null +++ b/mysql-test/suite/galera_3nodes/t/GAL-501.opt @@ -0,0 +1 @@ +--bind-address=:: diff --git a/mysql-test/suite/galera_3nodes/t/GAL-501.test b/mysql-test/suite/galera_3nodes/t/GAL-501.test index 60ed5989227..a36f21630ac 100644 --- a/mysql-test/suite/galera_3nodes/t/GAL-501.test +++ b/mysql-test/suite/galera_3nodes/t/GAL-501.test @@ -5,7 +5,7 @@ # ist.recv_addr=[::1] --source include/galera_cluster.inc ---source include/have_ipv6.inc +--source include/check_ipv6.inc # Confirm that initial handshake happened over ipv6 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 fdf70989d5d..8cbd8cf2454 100644 --- a/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup.test +++ b/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup.test @@ -1,5 +1,5 @@ --source include/galera_cluster.inc ---source include/have_ipv6.inc +--source include/check_ipv6.inc --source include/have_mariabackup.inc # Confirm that initial handshake happened over ipv6 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 e0addcea7bc..4a6de8abb9c 100644 --- a/mysql-test/suite/galera_3nodes/t/galera_ipv6_mysqldump.test +++ b/mysql-test/suite/galera_3nodes/t/galera_ipv6_mysqldump.test @@ -1,5 +1,5 @@ --source include/galera_cluster.inc ---source include/have_ipv6.inc +--source include/check_ipv6.inc 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"); diff --git a/mysql-test/suite/galera_3nodes/t/galera_ipv6_rsync.test b/mysql-test/suite/galera_3nodes/t/galera_ipv6_rsync.test index 7ee209d8e72..1937eb43e13 100644 --- a/mysql-test/suite/galera_3nodes/t/galera_ipv6_rsync.test +++ b/mysql-test/suite/galera_3nodes/t/galera_ipv6_rsync.test @@ -1,5 +1,5 @@ --source include/galera_cluster.inc ---source include/have_ipv6.inc +--source include/check_ipv6.inc # Confirm that initial handshake happened over ipv6