mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
information about different variables agged to query cache (BUG#5515, BUG#5394)
This commit is contained in:
@ -851,4 +851,60 @@ select @@character_set_results;
|
||||
@@character_set_results
|
||||
NULL
|
||||
set character_set_results=default;
|
||||
set GLOBAL query_cache_size=1355776;
|
||||
create table t1 (id int auto_increment primary key, c char(25));
|
||||
insert into t1 set c = repeat('x',24);
|
||||
insert into t1 set c = concat(repeat('x',24),'x');
|
||||
insert into t1 set c = concat(repeat('x',24),'w');
|
||||
insert into t1 set c = concat(repeat('x',24),'y');
|
||||
set max_sort_length=200;
|
||||
select c from t1 order by c, id;
|
||||
c
|
||||
xxxxxxxxxxxxxxxxxxxxxxxx
|
||||
xxxxxxxxxxxxxxxxxxxxxxxxw
|
||||
xxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
xxxxxxxxxxxxxxxxxxxxxxxxy
|
||||
reset query cache;
|
||||
set max_sort_length=20;
|
||||
select c from t1 order by c, id;
|
||||
c
|
||||
xxxxxxxxxxxxxxxxxxxxxxxx
|
||||
xxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
xxxxxxxxxxxxxxxxxxxxxxxxw
|
||||
xxxxxxxxxxxxxxxxxxxxxxxxy
|
||||
set max_sort_length=200;
|
||||
select c from t1 order by c, id;
|
||||
c
|
||||
xxxxxxxxxxxxxxxxxxxxxxxx
|
||||
xxxxxxxxxxxxxxxxxxxxxxxxw
|
||||
xxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
xxxxxxxxxxxxxxxxxxxxxxxxy
|
||||
set max_sort_length=default;
|
||||
select '1' || '3' from t1;
|
||||
'1' || '3'
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
set SQL_MODE=oracle;
|
||||
select '1' || '3' from t1;
|
||||
'1' || '3'
|
||||
13
|
||||
13
|
||||
13
|
||||
13
|
||||
set SQL_MODE=default;
|
||||
drop table t1;
|
||||
create table t1 (a varchar(20), b int);
|
||||
insert into t1 values ('12345678901234567890', 1);
|
||||
set group_concat_max_len=10;
|
||||
select group_concat(a) FROM t1 group by b;
|
||||
group_concat(a)
|
||||
1234567890
|
||||
set group_concat_max_len=1024;
|
||||
select group_concat(a) FROM t1 group by b;
|
||||
group_concat(a)
|
||||
12345678901234567890
|
||||
set group_concat_max_len=default;
|
||||
drop table t1;
|
||||
SET GLOBAL query_cache_size=0;
|
||||
|
Reference in New Issue
Block a user