403Webshell
Server IP : 88.99.149.37  /  Your IP : 216.73.216.141
Web Server : nginx/1.31.2
System : Linux server-88-99-149-37 6.12.0-124.56.5.el10_1.x86_64 #1 SMP PREEMPT_DYNAMIC Fri May 15 06:12:08 EDT 2026 x86_64
User : muralimurth ( 1015)
PHP Version : 8.4.23
Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/local/mysql/mysql-test/suite/galera_3nodes/t/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/local/mysql/mysql-test/suite/galera_3nodes/t/galera_join_with_cc_A.test
#
# Tests handling of several configuration changes while a joiner gets
# state transfer
#
# Variant A: sending of state transfer request delayed until two more
#            primary configuration changes happen
#
# Refs codersihp/galera-bugs#454
#
--source include/have_innodb.inc
--source include/galera_cluster.inc
--source include/galera_have_debug_sync.inc

--let $galera_connection_name = node_3
--let $galera_server_number = 3
--source include/galera_connect.inc

# Save original auto_increment_offset values.
--let $node_1=node_1
--let $node_2=node_2
--let $node_3=node_3
--source ../galera/include/auto_increment_offset_save.inc

--connection node_1
--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
--source include/wait_condition.inc

CREATE TABLE t1 (pk INT PRIMARY KEY, node INT) ENGINE=innodb;
INSERT INTO t1 VALUES (1, 1);

--connection node_2
--let $wait_condition = SELECT COUNT(*) = 1 FROM t1;
--source include/wait_condition.inc

#
# Isolate node_1 and update cluster state to force node 1 into joiner mode
#
--connection node_1
SET GLOBAL wsrep_provider_options='gmcast.isolate=1';

--connection node_2
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
--source include/wait_condition.inc

--connection node_3
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
--source include/wait_condition.inc

INSERT INTO t1 VALUES (2, 3);

--connection node_2
--let $wait_condition = SELECT COUNT(*) = 2 FROM t1;
--source include/wait_condition.inc

#
# Now reconnect node_1 but first make it block before sending state transfer
# request
#
# THIS IS PC1
#
--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
SET wsrep_sync_wait = 0;
SET wsrep_on = OFF;
--let $galera_sync_point = after_shift_to_joining
--source include/galera_set_sync_point.inc

--connection node_1
SET GLOBAL wsrep_provider_options='gmcast.isolate=0';

--connection node_2
--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
--source include/wait_condition.inc

INSERT INTO t1 VALUES (3, 2);

--connection node_1a
--source include/galera_wait_sync_point.inc
#
# At this point every node thinks that node_1 is in a JOINER state
#

--connection node_3
--let $wait_condition = SELECT COUNT(*) = 3 FROM t1;
--source include/wait_condition.inc

#
# Now that node_1 sent state request and became JOINER isolate node_1 again
# and commit one more action, so that node_1 loses JOINER state
#
--connection node_1
SET GLOBAL wsrep_provider_options='gmcast.isolate=1';

--connection node_2
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
--source include/wait_condition.inc

--connection node_3
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
--source include/wait_condition.inc

INSERT INTO t1 VALUES (4, 3);

--connection node_2
--let $wait_condition = SELECT COUNT(*) = 4 FROM t1;
--source include/wait_condition.inc

#
# Reconnect node_1 again
#
# THIS IS PC2
#
--connection node_1
SET GLOBAL wsrep_provider_options='gmcast.isolate=0';

--connection node_2
--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
--source include/wait_condition.inc
#
# After this point node_1 is no longer JOINER and is required to start the
# whole procedure over because it missed some actions (4th insert into t1)
#

INSERT INTO t1 VALUES (5, 2);

--connection node_3
--let $wait_condition = SELECT COUNT(*) = 5 FROM t1;
--source include/wait_condition.inc

#
# Now let node_1 continue with IST and finish processing PC1, but make it
# block when processing PC2 just before sending state transfer request
#
--connection node_1a
--let $galera_sync_point = before_send_state_request
--source include/galera_set_sync_point.inc
--let $galera_sync_point = after_shift_to_joining
--source include/galera_signal_sync_point.inc
--let $galera_sync_point = before_send_state_request
--source include/galera_wait_sync_point.inc

# since PC1 has been processed node_1 must have 3 rows in t1
# 2 were there before PC1 and one was added while in PC1
--let $wait_condition = SELECT COUNT(*) = 3 FROM t1;
--source include/wait_condition.inc

#
# Now disconnect and reconnect node_1 again to get PC3
# It still is blocked before sending state transfer request in PC2.
#
--connection node_1
SET GLOBAL wsrep_provider_options='gmcast.isolate=1';

--connection node_2
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
--source include/wait_condition.inc

--connection node_3
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
--source include/wait_condition.inc

INSERT INTO t1 VALUES (6, 3);

--connection node_2
--let $wait_condition = SELECT COUNT(*) = 6 FROM t1;
--source include/wait_condition.inc

--connection node_1
SET GLOBAL wsrep_provider_options='gmcast.isolate=0';

--connection node_2
--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
--source include/wait_condition.inc
#
# This is PC3
#

INSERT INTO t1 VALUES (7, 2);

--connection node_3
--let $wait_condition = SELECT COUNT(*) = 7 FROM t1;
--source include/wait_condition.inc

#
# Now disconnect and reconnect node_1 again to get PC4 and allow node_1
# to send state transfer request to be delivered in PC4 (and thus get
# updated to PC4 seqno in state transfer.
# Note that node_1 still processes PC2.
#
--connection node_1
SET GLOBAL wsrep_provider_options='gmcast.isolate=1';

--connection node_2
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
--source include/wait_condition.inc

--connection node_3
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
--source include/wait_condition.inc

INSERT INTO t1 VALUES (8, 3);

--connection node_2
--let $wait_condition = SELECT COUNT(*) = 8 FROM t1;
--source include/wait_condition.inc

--connection node_1
SET GLOBAL wsrep_provider_options='gmcast.isolate=0';

--connection node_2
--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
--source include/wait_condition.inc
#
# This is PC4. node_1 is still processing PC2, waiting to send state trasfer
# request
#
--connection node_1a
--let $galera_sync_point = process_primary_configuration
--source include/galera_set_sync_point.inc
--let $galera_sync_point = before_send_state_request
--source include/galera_signal_sync_point.inc
# sent STR from PC2 into PC4

--let $galera_sync_point = process_primary_configuration
--source include/galera_wait_sync_point.inc
#
# Now node_1 is processing PC3, but should have completed state transfer from
# PC4 and thus must have 8 rows in t1
#
--let $wait_condition = SELECT COUNT(*) = 8 FROM t1;
--source include/wait_condition.inc

--connection node_2
INSERT INTO t1 VALUES (9, 2);

--connection node_3
--let $wait_condition = SELECT COUNT(*) = 9 FROM t1;
--source include/wait_condition.inc

--connection node_1a
#--let $galera_sync_point = process_primary_configuration
--source include/galera_signal_sync_point.inc
--source include/galera_wait_sync_point.inc
#
# Now node_1 is processing PC4, still must have 8 rows in t1
#
--let $wait_condition = SELECT COUNT(*) = 8 FROM t1;
--source include/wait_condition.inc

#--let $galera_sync_point = process_primary_configuration
--source include/galera_signal_sync_point.inc
--source include/galera_clear_sync_point.inc

--let $wait_condition = SELECT COUNT(*) = 9 FROM t1;
--source include/wait_condition.inc

--connection node_1
--let $wait_condition = SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready';
--source include/wait_condition.inc

DROP TABLE t1;

call mtr.add_suppression("WSREP: Rejecting JOIN message from .+: new State Transfer required\\.");

--connection node_2
call mtr.add_suppression("WSREP: Rejecting JOIN message from .+: new State Transfer required\\.");

--connection node_3
call mtr.add_suppression("WSREP: Rejecting JOIN message from .+: new State Transfer required\\.");

--source ../galera/include/auto_increment_offset_restore.inc

Youez - 2016 - github.com/yon3zu
LinuXploit