mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 21:12:26 +01:00
Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.0
into sanja.is.com.ua:/home/bell/mysql/bk/work-show-4.0
This commit is contained in:
commit
439ac36d52
4 changed files with 16 additions and 7 deletions
|
@ -237,13 +237,18 @@ a
|
||||||
show status like "Qcache_queries_in_cache";
|
show status like "Qcache_queries_in_cache";
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Qcache_queries_in_cache 0
|
Qcache_queries_in_cache 0
|
||||||
select sql_cache * from t1;
|
select sql_cache * from t1 union select * from t1;
|
||||||
a
|
a
|
||||||
1
|
1
|
||||||
2
|
2
|
||||||
3
|
3
|
||||||
set query_cache_type=2;
|
set query_cache_type=2;
|
||||||
select sql_cache * from t1;
|
select sql_cache * from t1 union select * from t1;
|
||||||
|
a
|
||||||
|
1
|
||||||
|
2
|
||||||
|
3
|
||||||
|
select * from t1 union select sql_cache * from t1;
|
||||||
a
|
a
|
||||||
1
|
1
|
||||||
2
|
2
|
||||||
|
@ -253,7 +258,7 @@ Variable_name Value
|
||||||
Qcache_hits 4
|
Qcache_hits 4
|
||||||
show status like "Qcache_queries_in_cache";
|
show status like "Qcache_queries_in_cache";
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Qcache_queries_in_cache 1
|
Qcache_queries_in_cache 2
|
||||||
set query_cache_type=on;
|
set query_cache_type=on;
|
||||||
reset query cache;
|
reset query cache;
|
||||||
show status like "Qcache_queries_in_cache";
|
show status like "Qcache_queries_in_cache";
|
||||||
|
|
|
@ -144,9 +144,10 @@ create table t1 (a int not null);
|
||||||
insert into t1 values (1),(2),(3);
|
insert into t1 values (1),(2),(3);
|
||||||
select * from t1;
|
select * from t1;
|
||||||
show status like "Qcache_queries_in_cache";
|
show status like "Qcache_queries_in_cache";
|
||||||
select sql_cache * from t1;
|
select sql_cache * from t1 union select * from t1;
|
||||||
set query_cache_type=2;
|
set query_cache_type=2;
|
||||||
select sql_cache * from t1;
|
select sql_cache * from t1 union select * from t1;
|
||||||
|
select * from t1 union select sql_cache * from t1;
|
||||||
show status like "Qcache_hits";
|
show status like "Qcache_hits";
|
||||||
show status like "Qcache_queries_in_cache";
|
show status like "Qcache_queries_in_cache";
|
||||||
set query_cache_type=on;
|
set query_cache_type=on;
|
||||||
|
|
|
@ -2439,7 +2439,7 @@ TABLE_COUNTER_TYPE Query_cache::is_cacheable(THD *thd, uint32 query_len,
|
||||||
|
|
||||||
if (lex->sql_command == SQLCOM_SELECT &&
|
if (lex->sql_command == SQLCOM_SELECT &&
|
||||||
(thd->variables.query_cache_type == 1 ||
|
(thd->variables.query_cache_type == 1 ||
|
||||||
(thd->variables.query_cache_type == 2 && (lex->select->options &
|
(thd->variables.query_cache_type == 2 && (lex->select_lex.options &
|
||||||
OPTION_TO_QUERY_CACHE))) &&
|
OPTION_TO_QUERY_CACHE))) &&
|
||||||
thd->safe_to_cache_query)
|
thd->safe_to_cache_query)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1532,7 +1532,10 @@ select_option:
|
||||||
Select->options|= OPTION_FOUND_ROWS;
|
Select->options|= OPTION_FOUND_ROWS;
|
||||||
}
|
}
|
||||||
| SQL_NO_CACHE_SYM { current_thd->safe_to_cache_query=0; }
|
| SQL_NO_CACHE_SYM { current_thd->safe_to_cache_query=0; }
|
||||||
| SQL_CACHE_SYM { Select->options|= OPTION_TO_QUERY_CACHE; }
|
| SQL_CACHE_SYM
|
||||||
|
{
|
||||||
|
Lex->select_lex.options|= OPTION_TO_QUERY_CACHE;
|
||||||
|
}
|
||||||
| ALL {}
|
| ALL {}
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue