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-32938.test
#
# MDEV-32938: ALTER command is replicated and successfully applied while being BF-aborted locally.
#
# Why it happend:
# - ALTER went to prepare FK-referenced tables as TOI keys
# - to do this, it would open the main table with SHARED_HIGH_PRIO MDL lock which disregarded any
#   other locks (including X-lock) waiting in the queue in case someone was already holding a
#   compatible lock type (like any DML operation)
# - if there was other TOI operation on the same table, it would go through BF-abort cycle to grab
#   the lock for itself
# - since the initial ALTER had not reached TOI yet, it would loose to real TOI operation and got
#   BF-aborted with its THD marked as killed
# - then, ALTER would enter TOI and get replicated with no checks that it has already been aborted
# - after entering TOI mode, it would later find it'd been killed, and complete with an error
# - at the same time, the command would successfully apply on every other node except the initiator.
#
#
# NOTE : After MDL-lock conflict resolution rework this test behaviour has
# changed.
#

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

--connect con1,127.0.0.1,root,,test,$NODE_MYPORT_1

call mtr.add_suppression("WSREP: ALTER TABLE isolation failure");

CREATE TABLE t1(c1 INT PRIMARY KEY, c2 INT) ENGINE=InnoDB;

# Run ALTER DROP COLUMN and hang before closing tables on adding FK keys and before entering TOI.
SET DEBUG_SYNC = 'wsrep_append_fk_toi_keys_before_close_tables SIGNAL may_alter';
--send
  ALTER TABLE t1 DROP COLUMN c2;

--connection node_1
# Run ALTER ADD COLUMN
SET DEBUG_SYNC = 'now WAIT_FOR may_alter';
ALTER TABLE t1 ADD COLUMN c3 INT;

--connection con1
# ALTER DROP COLUMN waits
--reap

INSERT INTO t1 (c1, c3) VALUES (1, 0);

--connection node_2
# ALTER DROP COLUMN must be replicated.
INSERT INTO t1 (c1, c3) VALUES (2, 0);

# Cleanup.
--connection node_1
SET DEBUG_SYNC = 'RESET';
DROP TABLE t1;
--disconnect con1
--source include/galera_end.inc

Youez - 2016 - github.com/yon3zu
LinuXploit