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

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/local/mysql/mysql-test/main/bug39022.test
-- source include/have_log_bin.inc
-- source include/have_innodb.inc
-- source include/not_binlog_format_row.inc

--disable_query_log
call mtr.add_suppression("InnoDB: Transaction was aborted due to ");
--enable_query_log

--echo #
--echo # Bug #39022: Mysql randomly crashing in lock_sec_rec_cons_read_sees
--echo #

--disable_ps2_protocol
call mtr.add_suppression("Deadlock found when trying to get lock; try restarting transaction");

CREATE TABLE t1(a TINYINT NOT NULL,b TINYINT,PRIMARY KEY(b)) ENGINE=innodb;
CREATE TABLE t2(d TINYINT NOT NULL,UNIQUE KEY(d)) ENGINE=innodb;
INSERT INTO t1 VALUES (13,0),(8,1),(9,2),(6,3),
(11,5),(11,6),(7,7),(7,8),(4,9),(6,10),(3,11),(11,12),
(12,13),(7,14);
INSERT INTO t2 VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9),(10),
(11),(12),(13),(14);

connect (thread1, localhost, root,,);
connect (thread2, localhost, root,,);

connection thread1;
START TRANSACTION;

connection thread2;
REPLACE INTO t2 VALUES (-17);
SELECT d FROM t2,t1 WHERE d=(SELECT MAX(a) FROM t1 WHERE t1.a > t2.d) LOCK IN SHARE MODE;

connection thread1;
REPLACE INTO t1(a,b) VALUES (67,20);

connection thread2;
COMMIT;
START TRANSACTION;
REPLACE INTO t1(a,b) VALUES (65,-50);
REPLACE INTO t2 VALUES (-91);
send;
SELECT d FROM t2,t1 WHERE d=(SELECT MAX(a) FROM t1 WHERE t1.a > t2.d) LOCK IN SHARE MODE; #waits

connection thread1;

--echo # should not crash
--error ER_LOCK_DEADLOCK,ER_LOCK_WAIT_TIMEOUT
SELECT d FROM t2,t1 WHERE d=(SELECT MAX(a) FROM t1 WHERE t1.a > t2.d) LOCK IN SHARE MODE; #crashes

connection thread2;
REAP;

disconnect thread2;
--source include/wait_until_disconnected.inc

connection thread1;
disconnect thread1;
--source include/wait_until_disconnected.inc

connection default;

DROP TABLE t1,t2;
--enable_ps2_protocol

Youez - 2016 - github.com/yon3zu
LinuXploit