403Webshell
Server IP : 104.21.38.3  /  Your IP : 104.23.176.7
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/parts/r/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/server/mysql/src/mysql-test/suite/parts/r/partition-dml-1-12-innodb.result
# test handler operation with partitioned table
CREATE TABLE t1 (
col_1_int int,
col_2_int int,
PRIMARY KEY(col_2_int),
KEY idx1 (col_1_int, col_2_int))
ENGINE = InnoDB
PARTITION BY KEY() partitions 4;
SHOW CREATE TABLE t1;
Table	Create Table
t1	CREATE TABLE `t1` (
  `col_1_int` int(11) DEFAULT NULL,
  `col_2_int` int(11) NOT NULL,
  PRIMARY KEY (`col_2_int`),
  KEY `idx1` (`col_1_int`,`col_2_int`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
/*!50100 PARTITION BY KEY ()
PARTITIONS 4 */
# test handler read forward
# insert values in all partitions - 1st set
INSERT INTO t1 VALUES (1, 1), (2, 2), (3, 3), (4, 4);
# insert values in all partitions - 2nd set
INSERT INTO t1 VALUES (8, 5), (7, 6), (6, 7), (5, 8);
HANDLER t1 OPEN;
# read 2nd set of values in forward direction using handler
HANDLER t1 READ idx1 > (4, 4) LIMIT 10;
col_1_int	col_2_int
5	8
6	7
7	6
8	5
# replace 1st set of values to make them bigger in idx1 order
REPLACE INTO t1 VALUES (9, 1), (10, 2), (11, 3), (12, 4);
# try handler next- expect no rows
HANDLER t1 READ idx1 next;
col_1_int	col_2_int
HANDLER t1 CLOSE;
# delete all rows
DELETE FROM t1;
# test handler read backward
# insert values in all partitions - 1st set
INSERT INTO t1 VALUES (8, 5), (7, 6), (6, 7), (5, 8);
# insert values in all partitions - 2nd set
INSERT INTO t1 VALUES (9, 9), (10, 10), (11, 11), (12, 12);
HANDLER t1 OPEN;
# read 1st set of values in backward direction using handler
HANDLER t1 READ idx1 < (9, 9) LIMIT 10;
col_1_int	col_2_int
8	5
7	6
6	7
5	8
# replace 2nd set of values to make them smaller in idx1 order
REPLACE INTO t1 VALUES ( 1,  9), ( 2,  10), ( 3,  11), ( 4,  12);
# try handler previous- expect no rows
HANDLER t1 READ idx1 prev;
col_1_int	col_2_int
HANDLER t1 CLOSE;
DROP TABLE t1;

Youez - 2016 - github.com/yon3zu
LinuXploit