Server IP : 172.67.216.182 / Your IP : 162.158.106.239 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/innodb/t/ |
Upload File : |
--source include/have_innodb.inc # Adding big test option for this test. --source include/big_test.inc # # create test-bed to run test # use test; --disable_warnings drop table if exists t1; --enable_warnings create table t1 (id int primary key, value int, value2 int, value3 int, index(value,value2)) engine=innodb; insert into t1 values (10,10,10,10),(11,11,11,11),(12,12,12,12),(13,13,13,13),(14,14,14,14), (15,15,15,15),(16,16,16,16),(17,17,17,17),(18,18,18,18),(19,19,19,19), (20,20,20,20); let $ID= `SELECT @id := CONNECTION_ID()`; # # we need multiple connections as we need to keep one connection # active with trx requesting consistent read. # connect (conn1, localhost, root,,); connect (conn2, localhost, root,,); connect (conn3, localhost, root,,); # # start trx with consistent read # connection conn1; use test; start transaction with consistent snapshot; # # update table such that secondary index is updated. # connection conn2; use test; delimiter |; CREATE PROCEDURE update_t1() BEGIN DECLARE i INT DEFAULT 1; while (i <= 5000) DO update test.t1 set value2=value2+1, value3=value3+1 where id=12; SET i = i + 1; END WHILE; END| delimiter ;| set autocommit=0; CALL update_t1(); select * from t1; set autocommit=1; select * from t1; # # Now try to fire select query from connection-1 enforcing # use of secondary index. # connection conn1; let $ID= `SELECT @id := CONNECTION_ID()`; #--error ER_QUERY_INTERRUPTED --send select * from t1 force index(value) where value=12; # # select is going to take good time so let's kill query. # connection conn3; let $wait_condition= select * from information_schema.processlist where state = 'Sending data' and info = 'select * from t1 force index(value) where value=12'; --source include/wait_condition.inc let $ignore= `SELECT @id := $ID`; kill query @id; # # reap the value of connection-1 # connection conn1; --error ER_QUERY_INTERRUPTED reap; # # clean test-bed. # connection default; disconnect conn1; disconnect conn2; disconnect conn3; drop procedure if exists update_t1; drop table if exists t1;