mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
merge
This commit is contained in:
@ -923,6 +923,94 @@ select group_concat(a) FROM t1 group by b;
|
||||
group_concat(a)
|
||||
12345678901234567890
|
||||
set group_concat_max_len=default;
|
||||
drop table t1;
|
||||
flush status;
|
||||
CREATE TABLE t1 (
|
||||
`date` datetime NOT NULL default '0000-00-00 00:00:00',
|
||||
KEY `date` (`date`)
|
||||
) ENGINE=MyISAM;
|
||||
INSERT INTO t1 VALUES ('20050326');
|
||||
INSERT INTO t1 VALUES ('20050325');
|
||||
SELECT COUNT(*) FROM t1 WHERE date BETWEEN '20050326' AND '20050327 0:0:0';
|
||||
COUNT(*)
|
||||
0
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect datetime value: '20050327 0:0:0'
|
||||
Warning 1292 Truncated incorrect datetime value: '20050327 0:0:0'
|
||||
SELECT COUNT(*) FROM t1 WHERE date BETWEEN '20050326' AND '20050328 0:0:0';
|
||||
COUNT(*)
|
||||
0
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect datetime value: '20050328 0:0:0'
|
||||
Warning 1292 Truncated incorrect datetime value: '20050328 0:0:0'
|
||||
SELECT COUNT(*) FROM t1 WHERE date BETWEEN '20050326' AND '20050327 0:0:0';
|
||||
COUNT(*)
|
||||
0
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect datetime value: '20050327 0:0:0'
|
||||
Warning 1292 Truncated incorrect datetime value: '20050327 0:0:0'
|
||||
show status like "Qcache_queries_in_cache";
|
||||
Variable_name Value
|
||||
Qcache_queries_in_cache 0
|
||||
show status like "Qcache_inserts";
|
||||
Variable_name Value
|
||||
Qcache_inserts 0
|
||||
show status like "Qcache_hits";
|
||||
Variable_name Value
|
||||
Qcache_hits 0
|
||||
drop table t1;
|
||||
create table t1 (a int);
|
||||
insert into t1 values (1);
|
||||
reset query cache;
|
||||
flush status;
|
||||
select * from (select * from t1) a;
|
||||
a
|
||||
1
|
||||
show status like "Qcache_queries_in_cache";
|
||||
Variable_name Value
|
||||
Qcache_queries_in_cache 1
|
||||
show status like "Qcache_inserts";
|
||||
Variable_name Value
|
||||
Qcache_inserts 1
|
||||
show status like "Qcache_hits";
|
||||
Variable_name Value
|
||||
Qcache_hits 0
|
||||
select * from (select * from t1) a;
|
||||
a
|
||||
1
|
||||
show status like "Qcache_queries_in_cache";
|
||||
Variable_name Value
|
||||
Qcache_queries_in_cache 1
|
||||
show status like "Qcache_inserts";
|
||||
Variable_name Value
|
||||
Qcache_inserts 1
|
||||
show status like "Qcache_hits";
|
||||
Variable_name Value
|
||||
Qcache_hits 1
|
||||
insert into t1 values (2);
|
||||
show status like "Qcache_queries_in_cache";
|
||||
Variable_name Value
|
||||
Qcache_queries_in_cache 0
|
||||
show status like "Qcache_inserts";
|
||||
Variable_name Value
|
||||
Qcache_inserts 1
|
||||
show status like "Qcache_hits";
|
||||
Variable_name Value
|
||||
Qcache_hits 1
|
||||
select * from (select * from t1) a;
|
||||
a
|
||||
1
|
||||
2
|
||||
show status like "Qcache_queries_in_cache";
|
||||
Variable_name Value
|
||||
Qcache_queries_in_cache 1
|
||||
show status like "Qcache_inserts";
|
||||
Variable_name Value
|
||||
Qcache_inserts 2
|
||||
show status like "Qcache_hits";
|
||||
Variable_name Value
|
||||
Qcache_hits 1
|
||||
|
||||
drop table t1;
|
||||
create table t1 (a int);
|
||||
show status like "Qcache_queries_in_cache";
|
||||
|
@ -756,6 +756,50 @@ flush query cache;
|
||||
|
||||
drop table t1, t2;
|
||||
|
||||
#
|
||||
# Query with warning prohibited to query cache (BUG#9414)
|
||||
#
|
||||
flush status;
|
||||
CREATE TABLE t1 (
|
||||
`date` datetime NOT NULL default '0000-00-00 00:00:00',
|
||||
KEY `date` (`date`)
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
INSERT INTO t1 VALUES ('20050326');
|
||||
INSERT INTO t1 VALUES ('20050325');
|
||||
SELECT COUNT(*) FROM t1 WHERE date BETWEEN '20050326' AND '20050327 0:0:0';
|
||||
SELECT COUNT(*) FROM t1 WHERE date BETWEEN '20050326' AND '20050328 0:0:0';
|
||||
SELECT COUNT(*) FROM t1 WHERE date BETWEEN '20050326' AND '20050327 0:0:0';
|
||||
show status like "Qcache_queries_in_cache";
|
||||
show status like "Qcache_inserts";
|
||||
show status like "Qcache_hits";
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# queries with subquery in the FROM clause (BUG#11522)
|
||||
#
|
||||
create table t1 (a int);
|
||||
insert into t1 values (1);
|
||||
reset query cache;
|
||||
flush status;
|
||||
select * from (select * from t1) a;
|
||||
show status like "Qcache_queries_in_cache";
|
||||
show status like "Qcache_inserts";
|
||||
show status like "Qcache_hits";
|
||||
select * from (select * from t1) a;
|
||||
show status like "Qcache_queries_in_cache";
|
||||
show status like "Qcache_inserts";
|
||||
show status like "Qcache_hits";
|
||||
insert into t1 values (2);
|
||||
show status like "Qcache_queries_in_cache";
|
||||
show status like "Qcache_inserts";
|
||||
show status like "Qcache_hits";
|
||||
select * from (select * from t1) a;
|
||||
show status like "Qcache_queries_in_cache";
|
||||
show status like "Qcache_inserts";
|
||||
show status like "Qcache_hits";
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# SP cursors and selects with query cache (BUG#9715)
|
||||
#
|
||||
|
Reference in New Issue
Block a user