⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.124
Server IP:
50.28.103.30
Server:
Linux host.jcukjv-lwsites.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
Server Software:
nginx/1.28.0
PHP Version:
8.3.12
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
www
/
server
/
mysql
/
mysql-test
/
t
/
View File Name :
partition_locking_4.test
--source include/have_partition.inc --source include/have_innodb.inc SET @old_autocommit = @@global.autocommit; SET @@global.autocommit = 0; SET @old_lock_wait_timeout= @@global.lock_wait_timeout; SET @@global.lock_wait_timeout = 1; SET @old_innodb_lock_wait_timeout= @@global.innodb_lock_wait_timeout; SET @@global.innodb_lock_wait_timeout = 1; USE test; CREATE USER 'mysqltest1'@'localhost'; CREATE USER 'mysqltest2'@'localhost'; GRANT ALL PRIVILEGES ON test.* TO 'mysqltest1'@'localhost'; GRANT ALL PRIVILEGES ON test.* TO 'mysqltest2'@'localhost'; CREATE TABLE t1 (a int PRIMARY KEY, b varchar(128), KEY (b)) ENGINE = InnoDB PARTITION BY HASH (a) PARTITIONS 13; INSERT INTO t1 VALUES (11, 'First row, p11'); INSERT INTO t1 VALUES (12, 'First row, p12'); --enable_connect_log connect (test1,localhost,mysqltest1,,test); connect (test2,localhost,mysqltest2,,test); connection test1; INSERT INTO t1 VALUES (13+11, 'Second row, p11'); INSERT INTO t1 VALUES (13+12, 'Second row, p12'); SELECT * FROM t1 ORDER BY a; connection test2; --error ER_LOCK_WAIT_TIMEOUT INSERT INTO t1 VALUES (13+11, 'Second row, p11'); --error ER_LOCK_WAIT_TIMEOUT INSERT INTO t1 VALUES (13+12, 'Second row, p12'); SELECT * FROM t1 ORDER BY a; COMMIT; connection test1; SELECT * FROM t1 ORDER BY a; COMMIT; connection default; DROP TABLE t1; DROP USER 'mysqltest1'@'localhost'; DROP USER 'mysqltest2'@'localhost'; SET @@global.autocommit = @old_autocommit; SET @@global.lock_wait_timeout= @old_lock_wait_timeout; SET @@global.innodb_lock_wait_timeout= @old_innodb_lock_wait_timeout;