diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 18:07:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 18:07:14 +0000 |
commit | a175314c3e5827eb193872241446f2f8f5c9d33c (patch) | |
tree | cd3d60ca99ae00829c52a6ca79150a5b6e62528b /plugin/wsrep_info/mysql-test | |
parent | Initial commit. (diff) | |
download | mariadb-10.5-a175314c3e5827eb193872241446f2f8f5c9d33c.tar.xz mariadb-10.5-a175314c3e5827eb193872241446f2f8f5c9d33c.zip |
Adding upstream version 1:10.5.12.upstream/1%10.5.12upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'plugin/wsrep_info/mysql-test')
-rw-r--r-- | plugin/wsrep_info/mysql-test/wsrep_info/my.cnf | 35 | ||||
-rw-r--r-- | plugin/wsrep_info/mysql-test/wsrep_info/r/plugin.result | 23 | ||||
-rw-r--r-- | plugin/wsrep_info/mysql-test/wsrep_info/suite.opt | 1 | ||||
-rw-r--r-- | plugin/wsrep_info/mysql-test/wsrep_info/suite.pm | 27 | ||||
-rw-r--r-- | plugin/wsrep_info/mysql-test/wsrep_info/t/plugin.test | 23 |
5 files changed, 109 insertions, 0 deletions
diff --git a/plugin/wsrep_info/mysql-test/wsrep_info/my.cnf b/plugin/wsrep_info/mysql-test/wsrep_info/my.cnf new file mode 100644 index 00000000..8f62cfd0 --- /dev/null +++ b/plugin/wsrep_info/mysql-test/wsrep_info/my.cnf @@ -0,0 +1,35 @@ +# Use default setting for mysqld processes +!include include/default_mysqld.cnf + +[mysqld] +binlog-format=row +innodb-autoinc-lock-mode=2 +wsrep_provider=@ENV.WSREP_PROVIDER + +[mysqld.1] +#galera_port=@OPT.port +#ist_port=@OPT.port +#sst_port=@OPT.port +wsrep-on=1 +wsrep-cluster-address=gcomm:// +wsrep_provider_options='base_port=@mysqld.1.#galera_port' +wsrep_sst_receive_address='127.0.0.1:@mysqld.1.#sst_port' +wsrep_node_name=test-node-1 + +[mysqld.2] +#galera_port=@OPT.port +#ist_port=@OPT.port +#sst_port=@OPT.port +wsrep-on=1 +wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port' +wsrep_provider_options='base_port=@mysqld.2.#galera_port' +wsrep_sst_receive_address='127.0.0.1:@mysqld.2.#sst_port' +wsrep_node_name=test-node-2 + +[ENV] +NODE_MYPORT_1= @mysqld.1.port +NODE_MYSOCK_1= @mysqld.1.socket + +NODE_MYPORT_2= @mysqld.2.port +NODE_MYSOCK_2= @mysqld.2.socket + diff --git a/plugin/wsrep_info/mysql-test/wsrep_info/r/plugin.result b/plugin/wsrep_info/mysql-test/wsrep_info/r/plugin.result new file mode 100644 index 00000000..f99f27f3 --- /dev/null +++ b/plugin/wsrep_info/mysql-test/wsrep_info/r/plugin.result @@ -0,0 +1,23 @@ +connection node_2; +connection node_1; +# On node 1 +connection node_1; +SELECT * FROM INFORMATION_SCHEMA.WSREP_STATUS; +NODE_INDEX NODE_STATUS CLUSTER_STATUS CLUSTER_SIZE CLUSTER_STATE_UUID CLUSTER_STATE_SEQNO CLUSTER_CONF_ID PROTOCOL_VERSION +<IDX> synced primary 2 <CLUSTER_STATE_UUID> 2 <CLUSTER_CONF_ID> 4 +SELECT * FROM INFORMATION_SCHEMA.WSREP_MEMBERSHIP ORDER BY NAME; +INDEX UUID NAME ADDRESS +<IDX> <MEMBER_ID> test-node-1 <ADDRESS> +<IDX> <MEMBER_ID> test-node-2 <ADDRESS> +# On node 2 +connection node_2; +SELECT * FROM INFORMATION_SCHEMA.WSREP_STATUS; +NODE_INDEX NODE_STATUS CLUSTER_STATUS CLUSTER_SIZE CLUSTER_STATE_UUID CLUSTER_STATE_SEQNO CLUSTER_CONF_ID PROTOCOL_VERSION +<IDX> synced primary 2 <CLUSTER_STATE_UUID> 2 <CLUSTER_CONF_ID> 4 +SELECT * FROM INFORMATION_SCHEMA.WSREP_MEMBERSHIP ORDER BY NAME; +INDEX UUID NAME ADDRESS +<IDX> <MEMBER_ID> test-node-1 <ADDRESS> +<IDX> <MEMBER_ID> test-node-2 <ADDRESS> +disconnect node_2; +disconnect node_1; +# End of test diff --git a/plugin/wsrep_info/mysql-test/wsrep_info/suite.opt b/plugin/wsrep_info/mysql-test/wsrep_info/suite.opt new file mode 100644 index 00000000..b17344f8 --- /dev/null +++ b/plugin/wsrep_info/mysql-test/wsrep_info/suite.opt @@ -0,0 +1 @@ +--plugin-load-add=$WSREP_INFO_SO diff --git a/plugin/wsrep_info/mysql-test/wsrep_info/suite.pm b/plugin/wsrep_info/mysql-test/wsrep_info/suite.pm new file mode 100644 index 00000000..c7d4b0ad --- /dev/null +++ b/plugin/wsrep_info/mysql-test/wsrep_info/suite.pm @@ -0,0 +1,27 @@ +package My::Suite::WSREP_INFO; +use File::Basename; +use My::Find; + +@ISA = qw(My::Suite); + +use lib 'suite'; +use wsrep::common; +return wsrep_not_ok() if wsrep_not_ok(); + +push @::global_suppressions, + ( + qr(WSREP:.*down context.*), + qr(WSREP: Failed to send state UUID:.*), + qr(WSREP: wsrep_sst_receive_address.*), + qr(WSREP: Could not open saved state file for reading: .*), + qr(WSREP: Could not open state file for reading: .*), + qr(WSREP: last inactive check more than .* skipping check), + qr(WSREP: Gap in state sequence. Need state transfer.), + qr(WSREP: Failed to prepare for incremental state transfer: .*), + qr(WSREP: SYNC message from member .* in non-primary configuration. Ignored.), + qr|WSREP: access file\(.*gvwstate.dat\) failed\(No such file or directory\)|, + ); + +sub is_default { 1 } + +bless { }; diff --git a/plugin/wsrep_info/mysql-test/wsrep_info/t/plugin.test b/plugin/wsrep_info/mysql-test/wsrep_info/t/plugin.test new file mode 100644 index 00000000..9ae783a9 --- /dev/null +++ b/plugin/wsrep_info/mysql-test/wsrep_info/t/plugin.test @@ -0,0 +1,23 @@ +--source include/galera_cluster.inc +--source include/have_innodb.inc + +--echo # On node 1 +--connection node_1 + +--replace_column 1 <IDX> 5 <CLUSTER_STATE_UUID> 7 <CLUSTER_CONF_ID> +SELECT * FROM INFORMATION_SCHEMA.WSREP_STATUS; + +--replace_column 1 <IDX> 2 <MEMBER_ID> 4 <ADDRESS> +SELECT * FROM INFORMATION_SCHEMA.WSREP_MEMBERSHIP ORDER BY NAME; + +--echo # On node 2 +--connection node_2 + +--replace_column 1 <IDX> 5 <CLUSTER_STATE_UUID> 7 <CLUSTER_CONF_ID> +SELECT * FROM INFORMATION_SCHEMA.WSREP_STATUS; + +--replace_column 1 <IDX> 2 <MEMBER_ID> 4 <ADDRESS> +SELECT * FROM INFORMATION_SCHEMA.WSREP_MEMBERSHIP ORDER BY NAME; + +--source include/galera_end.inc +--echo # End of test |