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/MDEV-20793.test
#
# MDEV-20793 Assertion after certification failure during replay.
#
# The test outline:
# In order to produce certification failure three transactions
# are needed. One transaction is executing on node_1 and two others
# on node_2. The first transaction from node_2 BF aborts the transaction
# on node_1, but does not cause certification conflict. The second
# transaction from node_2 will cause conflict and the transaction on
# node_1 fails in certification during replay.
#

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

CREATE TABLE t1 (f1 INT PRIMARY KEY, f2 INT);
INSERT INTO t1 VALUES (1, 0), (5, 0);

--let galera_connection_name = node_1_ctrl
--let galera_server_number = 1
--source include/galera_connect.inc
--connection node_1_ctrl
SET SESSION wsrep_sync_wait = 0;
SET GLOBAL wsrep_slave_threads = 2;

--connection node_1
# Start transaction which takes gap lock 1 - 5
SET SESSION wsrep_retry_autocommit = 0;
START TRANSACTION;
UPDATE t1 SET f2 = 1;

--connection node_1_ctrl
# set sync point for incoming applier
--let $galera_sync_point = apply_monitor_slave_enter_sync
--source include/galera_set_sync_point.inc

--connection node_2
# Insert into gap from other node. This generates BF abort but does not
# conflict with update.
INSERT INTO t1 VALUES (2, 2);

--connection node_1_ctrl
# wait to see the INSERT from node_2 reaching applier sync point
--source include/galera_wait_sync_point.inc
--source include/galera_clear_sync_point.inc

# set sync point to catch other write set applying from node_2
--let $galera_sync_point = local_monitor_slave_enter_sync
--source include/galera_set_sync_point.inc

# Make an update which will conflict with update on node_1
--connection node_2
UPDATE t1 SET f2 = 2 WHERE f1 = 5;

--connection node_1_ctrl
# wait until both appliers are stopped in sync points
--let $galera_sync_point = apply_monitor_slave_enter_sync local_monitor_slave_enter_sync
--source include/galera_wait_sync_point.inc
--source include/galera_clear_sync_point.inc

# set sync point for catching node_1 transaction just before committing
--let $galera_sync_point = after_replicate_sync
--source include/galera_set_sync_point.inc

--connection node_1
# set sync point, which will stop execution after COMMIT has been BF aborted
# and send the COMMIT, it should stop in commit_monitor_master_enter_sync point
SET SESSION debug_sync = "wsrep_before_replay SIGNAL reached WAIT_FOR continue";
--send COMMIT

--connection node_1_ctrl
# wait until both appliers and local COMMIT are idle in their sync points
--let $galera_sync_point = after_replicate_sync apply_monitor_slave_enter_sync local_monitor_slave_enter_sync
--source include/galera_wait_sync_point.inc

# release local COMMIT processing, it will continue and pause first before certification,
--let $galera_sync_point = after_replicate_sync
--source include/galera_signal_sync_point.inc

# release first applier (INSERT), it should BF abort the local COMMIT processing
--let $galera_sync_point = apply_monitor_slave_enter_sync
--source include/galera_signal_sync_point.inc

# wait to see that COMMIT was BF aborted and has reached replaying state
SET SESSION debug_sync = "now WAIT_FOR reached";

# release the latter applier, with real lock conflict
--let $galera_sync_point = local_monitor_slave_enter_sync
--source include/galera_signal_sync_point.inc
--source include/galera_clear_sync_point.inc
SET SESSION debug_sync = "now SIGNAL continue";

--connection node_1
--error ER_LOCK_DEADLOCK
--reap

SET debug_sync = "RESET";

DROP TABLE t1;
SET GLOBAL wsrep_slave_threads = DEFAULT;

Youez - 2016 - github.com/yon3zu
LinuXploit