config root man

Current Path : /home/usr.opt/mysql57/mysql-test/r/

FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64
Upload File :
Current File : //home/usr.opt/mysql57/mysql-test/r/partition_cache.result

SET SESSION DEFAULT_STORAGE_ENGINE = InnoDB;
drop table if exists t1,t2,t3;
set @save_query_cache_size = @@global.query_cache_size;
Warnings:
Warning	1287	'@@query_cache_size' is deprecated and will be removed in a future release.
set GLOBAL query_cache_size = 1355776;
Warnings:
Warning	1287	'@@query_cache_size' is deprecated and will be removed in a future release.
flush status;
set autocommit=0;
create table t1 (a int not null) PARTITION BY KEY (a) PARTITIONS 3;
insert into t1 values (1),(2),(3);
select * from t1;
a
1
2
3
show status like "Qcache_queries_in_cache";
Variable_name	Value
Qcache_queries_in_cache	0
drop table t1;
commit;
set autocommit=1;
begin;
create table t1 (a int not null) PARTITION BY KEY (a) PARTITIONS 3;
insert into t1 values (1),(2),(3);
select * from t1;
a
1
2
3
show status like "Qcache_queries_in_cache";
Variable_name	Value
Qcache_queries_in_cache	0
drop table t1;
commit;
create table t1 (a int not null) PARTITION BY KEY (a) PARTITIONS 3;
create table t2 (a int not null) PARTITION BY KEY (a) PARTITIONS 3;
create table t3 (a int not null) PARTITION BY KEY (a) PARTITIONS 3;
insert into t1 values (1),(2);
insert into t2 values (1),(2);
insert into t3 values (1),(2);
select * from t1;
a
1
2
select * from t2;
a
1
2
select * from t3;
a
1
2
show status like "Qcache_queries_in_cache";
Variable_name	Value
Qcache_queries_in_cache	0
show status like "Qcache_hits";
Variable_name	Value
Qcache_hits	0
begin;
select * from t1;
a
1
2
select * from t2;
a
1
2
select * from t3;
a
1
2
show status like "Qcache_queries_in_cache";
Variable_name	Value
Qcache_queries_in_cache	0
show status like "Qcache_hits";
Variable_name	Value
Qcache_hits	0
insert into t1 values (3);
insert into t2 values (3);
insert into t1 values (4);
select * from t1;
a
1
2
3
4
select * from t2;
a
1
2
3
select * from t3;
a
1
2
show status like "Qcache_queries_in_cache";
Variable_name	Value
Qcache_queries_in_cache	0
show status like "Qcache_hits";
Variable_name	Value
Qcache_hits	0
commit;
show status like "Qcache_queries_in_cache";
Variable_name	Value
Qcache_queries_in_cache	0
drop table t3,t2,t1;
CREATE TABLE t1 (id int(11) NOT NULL auto_increment, PRIMARY KEY (id)) PARTITION BY HASH (id) PARTITIONS 3;
select count(*) from t1;
count(*)
0
insert into t1 (id) values (0);
select count(*) from t1;
count(*)
1
drop table t1;
SET SESSION DEFAULT_STORAGE_ENGINE = InnoDB;
SET @@autocommit=1;
connection default
SHOW VARIABLES LIKE 'have_query_cache';
Variable_name	Value
have_query_cache	YES
SET GLOBAL query_cache_size = 204800;
Warnings:
Warning	1287	'@@query_cache_size' is deprecated and will be removed in a future release.
flush status;
SET @@autocommit=1;
SET SESSION DEFAULT_STORAGE_ENGINE = InnoDB;
CREATE TABLE t2 (s1 int, s2 varchar(1000), key(s1)) PARTITION BY KEY (s1) PARTITIONS 3;
INSERT INTO t2 VALUES (1,repeat('a',10)),(2,repeat('a',10)),(3,repeat('a',10)),(4,repeat('a',10));
COMMIT;
START TRANSACTION;
SELECT sql_cache count(*) FROM t2 WHERE s2 = 'w';
count(*)
0
Warnings:
Warning	1681	'SQL_CACHE' is deprecated and will be removed in a future release.
UPDATE t2 SET s2 = 'w' WHERE s1 = 3;
SELECT sql_cache count(*) FROM t2 WHERE s2 = 'w';
count(*)
1
Warnings:
Warning	1681	'SQL_CACHE' is deprecated and will be removed in a future release.
show status like "Qcache_queries_in_cache";
Variable_name	Value
Qcache_queries_in_cache	0
connection connection1
START TRANSACTION;
SELECT sql_cache count(*) FROM t2 WHERE s2 = 'w';
count(*)
0
Warnings:
Warning	1681	'SQL_CACHE' is deprecated and will be removed in a future release.
INSERT INTO t2 VALUES (5,'w');
SELECT sql_cache count(*) FROM t2 WHERE s2 = 'w';
count(*)
1
Warnings:
Warning	1681	'SQL_CACHE' is deprecated and will be removed in a future release.
COMMIT;
SELECT sql_cache count(*) FROM t2 WHERE s2 = 'w';
count(*)
1
Warnings:
Warning	1681	'SQL_CACHE' is deprecated and will be removed in a future release.
show status like "Qcache_queries_in_cache";
Variable_name	Value
Qcache_queries_in_cache	0
connection default
SELECT sql_cache count(*) FROM t2 WHERE s2 = 'w';
count(*)
1
Warnings:
Warning	1681	'SQL_CACHE' is deprecated and will be removed in a future release.
COMMIT;
show status like "Qcache_queries_in_cache";
Variable_name	Value
Qcache_queries_in_cache	0
SELECT sql_cache count(*) FROM t2 WHERE s2 = 'w';
count(*)
2
Warnings:
Warning	1681	'SQL_CACHE' is deprecated and will be removed in a future release.
show status like "Qcache_queries_in_cache";
Variable_name	Value
Qcache_queries_in_cache	0
connection connection1
SELECT sql_cache count(*) FROM t2 WHERE s2 = 'w';
count(*)
2
Warnings:
Warning	1681	'SQL_CACHE' is deprecated and will be removed in a future release.
START TRANSACTION;
SELECT sql_cache count(*) FROM t2 WHERE s2 = 'w';
count(*)
2
Warnings:
Warning	1681	'SQL_CACHE' is deprecated and will be removed in a future release.
INSERT INTO t2 VALUES (6,'w');
SELECT sql_cache count(*) FROM t2 WHERE s2 = 'w';
count(*)
3
Warnings:
Warning	1681	'SQL_CACHE' is deprecated and will be removed in a future release.
connection default
SELECT sql_cache count(*) FROM t2 WHERE s2 = 'w';
count(*)
2
Warnings:
Warning	1681	'SQL_CACHE' is deprecated and will be removed in a future release.
START TRANSACTION;
SELECT sql_cache count(*) FROM t2 WHERE s2 = 'w';
count(*)
2
Warnings:
Warning	1681	'SQL_CACHE' is deprecated and will be removed in a future release.
DELETE from t2 WHERE s1=3;
SELECT sql_cache count(*) FROM t2 WHERE s2 = 'w';
count(*)
1
Warnings:
Warning	1681	'SQL_CACHE' is deprecated and will be removed in a future release.
COMMIT;
connection connection1
COMMIT;
SELECT sql_cache count(*) FROM t2 WHERE s2 = 'w';
count(*)
2
Warnings:
Warning	1681	'SQL_CACHE' is deprecated and will be removed in a future release.
show status like "Qcache_queries_in_cache";
Variable_name	Value
Qcache_queries_in_cache	0
show status like "Qcache_hits";
Variable_name	Value
Qcache_hits	0
set @@global.query_cache_size = @save_query_cache_size;
Warnings:
Warning	1287	'@@query_cache_size' is deprecated and will be removed in a future release.
drop table t2;
SET @old_query_cache_size = @@global.query_cache_size;
Warnings:
Warning	1287	'@@query_cache_size' is deprecated and will be removed in a future release.
SET GLOBAL query_cache_size=1355776;
Warnings:
Warning	1287	'@@query_cache_size' is deprecated and will be removed in a future release.
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;
NUM	UPDATE_TIME
INSERT INTO t1 VALUES ('AAA', '2010-03-11 00:00:00');
SELECT * FROM t1 WHERE MONTH(update_time)=3;
NUM	UPDATE_TIME
AAA	2010-03-11 00:00:00
ALTER TABLE t1 TRUNCATE PARTITION p3;
COMMIT;
SELECT * FROM t1 WHERE MONTH(update_time)=3;
NUM	UPDATE_TIME
SELECT SQL_NO_CACHE * FROM t1 WHERE MONTH(update_time)=3;
NUM	UPDATE_TIME
Warnings:
Warning	1681	'SQL_NO_CACHE' is deprecated and will be removed in a future release.
ALTER TABLE t1 DROP PARTITION p3;
SELECT * FROM t1 WHERE MONTH(update_time)=3;
NUM	UPDATE_TIME
DROP TABLE t1;
SET @@global.query_cache_size = @old_query_cache_size;
Warnings:
Warning	1287	'@@query_cache_size' is deprecated and will be removed in a future release.

Man Man