Server IP : 104.21.38.3 / Your IP : 172.68.164.43 Web Server : Apache System : Linux krdc-ubuntu-s-2vcpu-4gb-amd-blr1-01.localdomain 5.15.0-142-generic #152-Ubuntu SMP Mon May 19 10:54:31 UTC 2025 x86_64 User : www ( 1000) PHP Version : 7.4.33 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /www/server/mysql/src/mysql-test/suite/engines/rr_trx/r/ |
Upload File : |
SET autocommit = 0; *** Move record out of locked portion of index: START TRANSACTION; *** Disabling result log (result will vary) SELECT * FROM t1 WHERE `int1_key` BETWEEN 981 + (CONNECTION_ID() MOD 15) AND 1030 ORDER BY `int1_key`, `pk` FOR UPDATE; SELECT @pk:=`pk` FROM t1 WHERE `int1_key` BETWEEN 981 + (CONNECTION_ID() MOD 15) AND 1030 ORDER BY `int1_key`, `pk` LIMIT 1; *** Enabling result log UPDATE t1 SET `int1_key` = `int1_key` + 50, `int2_key` = `int2_key` - 50, `id` = 10, `connection_id` = CONNECTION_ID(), `is_consistent` = IF(`int1` + `int2` + `int1_key` + `int2_key` + `int1_unique` + `int2_unique` = 0, 1, 0), `thread_id` = 0 WHERE `pk` = @pk; COMMIT; *** Move record out of locked portion of UNIQUE index: START TRANSACTION; *** Disabling result log (result will vary) SELECT * FROM t1 WHERE `int1_unique` BETWEEN 981 + (CONNECTION_ID() MOD 15) AND 1030 ORDER BY `int1_unique` FOR UPDATE; SELECT @pk:=`pk` FROM t1 WHERE `int1_unique` BETWEEN 981 + (CONNECTION_ID() MOD 15) AND 1030 ORDER BY `int1_unique` LIMIT 1; *** Enabling result log UPDATE t1 SET `int1_unique` = `int1_unique` + 50 + CONNECTION_ID(), `int2_unique` = `int2_unique` - 50 - CONNECTION_ID(), `id` = 11, `connection_id` = CONNECTION_ID(), `is_consistent` = IF(`int1` + `int2` + `int1_key` + `int2_key` + `int1_unique` + `int2_unique` = 0, 1, 0), `thread_id` = 0 WHERE `pk` = @pk; COMMIT; *** Move record into locked portion of index: START TRANSACTION; *** Disabling result log (result will vary) SELECT * FROM t1 WHERE `int1_key` BETWEEN 981 + (CONNECTION_ID() MOD 15) AND 1030 ORDER BY `int1_key`, `pk` FOR UPDATE; SELECT @pk:=`pk` FROM t1 WHERE `int1_key` > 1030 ORDER BY `int1_key`, `pk` LIMIT 1; *** Enabling result log UPDATE t1 SET `int1_key` = `int1_key` + 50, `int2_key` = `int2_key` - 50, `id` = 12, `connection_id` = CONNECTION_ID(), `is_consistent` = IF(`int1` + `int2` + `int1_key` + `int2_key` + `int1_unique` + `int2_unique` = 0, 1, 0), `thread_id` = 0 WHERE `pk` = @pk; COMMIT; *** Move record inside locked portion of index (move it but stay inside the locked range): START TRANSACTION; *** Disabling result log (result will vary) SELECT * FROM t1 WHERE `int1_key` BETWEEN 981 + (CONNECTION_ID() MOD 15) AND 1030 ORDER BY `int1_key`, `pk` FOR UPDATE; SELECT @pk:=`pk` FROM t1 WHERE `int1_key` BETWEEN 981 + 10 + (CONNECTION_ID() MOD 15) AND 1019 ORDER BY `int1_key`, `pk` LIMIT 1; *** Enabling result log UPDATE t1 SET `int1_key` = `int1_key` - 10, `int2_key` = `int2_key` + 10, `id` = 13, `connection_id` = CONNECTION_ID(), `is_consistent` = IF(`int1` + `int2` + `int1_key` + `int2_key` + `int1_unique` + `int2_unique` = 0, 1, 0), `thread_id` = 0 WHERE `pk` = @pk; COMMIT; *** Move record outside existing index boundary (max): START TRANSACTION; *** Disabling result log (results will vary) SELECT @max:=MAX(`int2_key`), @pk:=FLOOR(1 + RAND() * (MAX(`pk`) - 1)) FROM t1; SELECT * FROM t1 WHERE `pk` = @pk FOR UPDATE; SELECT @old:=`int2_key`, (@sum:=`int1` + `int2` + `int1_key` + `int2_key` + `int1_unique` + `int2_unique`) FROM t1 WHERE `pk` = @pk; *** Enabling result log UPDATE t1 SET `int2_key` = @max + 1, `int2` = `int2` - (@max + 1 - @old), `id` = 14, `connection_id` = CONNECTION_ID(), `is_consistent` = IF(@sum = 0, 1, 0), `thread_id` = 0 WHERE `pk` = @pk; COMMIT; *** Move record outside existing UNIQUE index boundary (max): START TRANSACTION; *** Disabling result log (results will vary) SELECT @max:=MAX(`int2_unique`), @pk:=FLOOR(1 + RAND() * (MAX(`pk`) - 1)) FROM t1; SELECT * FROM t1 WHERE `pk` = @pk FOR UPDATE; SELECT @old:=`int2_unique`, (@sum:=`int1` + `int2` + `int1_key` + `int2_key` + `int1_unique` + `int2_unique`) FROM t1 WHERE `pk` = @pk; *** Enabling result log UPDATE t1 SET `int2_unique` = @max + 1, `int2` = `int2` - (@max + 1 - @old), `id` = 15, `connection_id` = CONNECTION_ID(), `is_consistent` = IF(@sum = 0, 1, 0), `thread_id` = 0 WHERE `pk` = @pk; COMMIT; *** Move record outside existing index boundary (min): START TRANSACTION; *** Disabling result log (results will vary) SELECT @min:=MIN(`int1_key`), @pk:=FLOOR(1 + RAND() * (MAX(`pk`) - 1)) FROM t1; SELECT * FROM t1 WHERE `pk` = @pk FOR UPDATE; SELECT @old:=`int1_key`, (@sum:=`int1` + `int2` + `int1_key` + `int2_key` + `int1_unique` + `int2_unique`) FROM t1 WHERE `pk` = @pk; *** Enabling result log UPDATE t1 SET `int1_key` = @min - 1, `int1` = `int1` - (@min - 1 - @old), `id` = 16, `connection_id` = CONNECTION_ID(), `is_consistent` = IF(@sum = 0, 1, 0), `thread_id` = 0 WHERE `pk` = @pk; COMMIT; *** Move record outside existing UNIQUE index boundary (min): START TRANSACTION; *** Disabling result log (results will vary) SELECT @min:=MIN(`int1_unique`), @pk:=FLOOR(1 + RAND() * (MAX(`pk`) - 1)) FROM t1; SELECT * FROM t1 WHERE `pk` = @pk FOR UPDATE; SELECT @old:=`int1_unique`, (@sum:=`int1` + `int2` + `int1_key` + `int2_key` + `int1_unique` + `int2_unique`) FROM t1 WHERE `pk` = @pk; *** Enabling result log UPDATE t1 SET `int1_unique` = @min - 1, `int1` = `int1` - (@min - 1 - @old), `id` = 17, `connection_id` = CONNECTION_ID(), `is_consistent` = IF(@sum = 0, 1, 0), `thread_id` = 0 WHERE `pk` = @pk; COMMIT; *** Move record forward in index (add some number): START TRANSACTION; UPDATE t1 SET `int2_key` = `int2_key` + 16, `int2` = `int2` - 16, `id` = 18, `connection_id` = CONNECTION_ID(), `thread_id` = 0 WHERE `pk` = CONNECTION_ID() MOD 1000; *** Move record backward in index (subtract some number): UPDATE t1 SET `int1_key` = `int1_key` - 16, `int1` = `int1` + 16, `id` = 18, `connection_id` = CONNECTION_ID(), `thread_id` = 0 WHERE `pk` = CONNECTION_ID() + 16 MOD 1000; COMMIT;