mirror of
https://github.com/MariaDB/server.git
synced 2025-01-19 05:22:25 +01:00
64bb59fce9
* remove part of galera_var_cluster_address.test that can not be tested reliably * reduce running time for galera_gcache_recover_manytrx.test * Additional wait_conditions for GAL-401.test Signed-off-by: Sachin Setiya <sachinsetia1001@gmail.com>
76 lines
2.6 KiB
Text
76 lines
2.6 KiB
Text
#
|
|
# Check the handling of @@wsrep_cluster_address
|
|
#
|
|
|
|
--source include/galera_cluster.inc
|
|
--source include/have_innodb.inc
|
|
|
|
# Save original auto_increment_offset values.
|
|
--let $node_1=node_1
|
|
--let $node_2=node_2
|
|
--source include/auto_increment_offset_save.inc
|
|
|
|
#
|
|
# Set to invalid value
|
|
#
|
|
|
|
--connection node_2
|
|
--let $wsrep_cluster_address_node2 = `SELECT @@wsrep_cluster_address`
|
|
SET GLOBAL wsrep_cluster_address = 'foo://';
|
|
|
|
# With wsrep_sync_wait, this returns an error
|
|
#--error ER_LOCK_WAIT_TIMEOUT
|
|
#SHOW STATUS;
|
|
|
|
SET SESSION wsrep_sync_wait=0;
|
|
|
|
--error ER_UNKNOWN_COM_ERROR
|
|
SELECT COUNT(*) > 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS;
|
|
|
|
# Must return 'OFF'
|
|
SHOW STATUS LIKE 'wsrep_ready';
|
|
|
|
# Must return 'Non-primary'
|
|
SHOW STATUS LIKE 'wsrep_cluster_status';
|
|
|
|
# Must return 0 = 'Initialized'
|
|
SHOW STATUS LIKE 'wsrep_local_state';
|
|
SHOW STATUS LIKE 'wsrep_local_state_comment';
|
|
|
|
--connection node_1
|
|
--sleep 1
|
|
# Node #1 thinks that it is now part of a single-node primary cluster
|
|
SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
|
SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
|
|
|
|
#
|
|
# Reset everything as it was
|
|
#
|
|
|
|
--connection node_2
|
|
--disable_query_log
|
|
--eval SET GLOBAL wsrep_cluster_address = '$wsrep_cluster_address_node2';
|
|
--enable_query_log
|
|
|
|
--source include/wait_until_connected_again.inc
|
|
|
|
--connection node_1
|
|
SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
|
|
SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
|
|
|
--connection node_2
|
|
CALL mtr.add_suppression("Backend not supported: foo");
|
|
CALL mtr.add_suppression("Failed to initialize backend using 'foo");
|
|
CALL mtr.add_suppression("Failed to open channel 'my_wsrep_cluster' at 'foo");
|
|
CALL mtr.add_suppression("gcs connect failed: Socket type not supported");
|
|
CALL mtr.add_suppression("wsrep::connect\\(\\) failed: 7");
|
|
CALL mtr.add_suppression("gcs_caused\\(\\) returned -103 \\(Software caused connection abort\\)");
|
|
CALL mtr.add_suppression("failed to open gcomm backend connection: 110: failed to reach primary view: 110");
|
|
CALL mtr.add_suppression("Failed to open backend connection: -110 \\(Connection timed out\\)");
|
|
CALL mtr.add_suppression("gcs connect failed: Connection timed out");
|
|
CALL mtr.add_suppression("WSREP: wsrep::connect\\(foo://\\) failed: 7");
|
|
# Restore original auto_increment_offset values.
|
|
--source include/auto_increment_offset_restore.inc
|
|
|
|
--source include/galera_end.inc
|
|
--echo # End of test
|