403Webshell
Server IP : 104.21.38.3  /  Your IP : 172.70.208.30
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/t/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/server/mysql/src/mysql-test/suite/parts/t/partition_reverse_scan_icp.test
--echo #
--echo # Bug #24929748	REVERSE SCAN ON A PARTITIONED TABLE DOES ICP CHECK INCORRECTLY, CAUSING SLOWDOWN
--echo #

create table t1 (
  date_col datetime not null,
  col1 int,
  filler varchar(255),
  key(date_col, col1)
) engine=innodb
partition by range columns(date_col)
(
  partition p0 values less than ('2015-01-01 00:00:00'),
  partition p1 values less than ('2016-01-01 00:00:00'),
  partition p2 values less than ('2017-01-01 00:00:00'),
  partition p3 values less than (MAXVALUE)
);
create table t2(a int);
insert into t2 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);

insert into t1 select date_add('2014-01-01', interval (A.a+10*B.a) day),123456, repeat('raw-data', 5)
	       from t2 A, t2 B, t2 C;

insert into t1 select date_add('2015-01-01', interval (A.a+10*B.a) day), 123456,repeat('raw-data', 5)
		from t2 A, t2 B, t2 C;

set @cnt=1;
select * from t1 force index(date_col) where
   col1 + 10000000 > (@cnt:=@cnt+1) and date_col >= date('2014-04-01') AND date_col < date('2014-04-01' + interval 1 day)
   ORDER BY date_col DESC;
select @cnt;

#Mutiple partittion scan 

#delete some records in p1 ,then  only it will go to QUICK_SELECT_DESC with ICP 
delete from t1 where date_col>='2015-01-01' and date_col<='2016-01-06' limit 500;

#Range condition spans multiple partitions  
set @cnt=1;
select * from t1 force index(date_col) where
   col1 + 10000000 > (@cnt:=@cnt+1) and date_col >= date('2014-04-06') AND date_col < date('2015-02-10' + interval 1 day)
ORDER BY date_col DESC;
select @cnt;

drop table t1,t2;

#Multi range index read

create table t1 ( f1 int ,f2 int, key(f2)) engine=innodb
partition by range columns (f2)
(
partition p0 values less than (10000),
partition p1 values less than (20000),
partition p2 values less than (30000),
PARTITION p3 VALUES LESS THAN (MAXVALUE)
);
--disable_query_log 
let $i=0;
set @cnt=1;
while ($i<20000)
{
insert into t1 values (123456,@cnt);
inc $i;
set @cnt = @cnt + 1;
}
--enable_query_log
select * from t1 where (f2>1000 and f2 <1002) or ( f2> 3000 and f2 < 3003) or (f2> 10001 and f2 < 10004) order by f2 desc;
drop table t1;

Youez - 2016 - github.com/yon3zu
LinuXploit