Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
280a1e4a
Commit
280a1e4a
authored
Mar 30, 2003
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge abelkin@bk-internal.mysql.com:/home/bk/mysql-4.0
into sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.0
parents
53804117
c15f1acd
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
7 deletions
+16
-7
mysql-test/r/query_cache.result
mysql-test/r/query_cache.result
+8
-3
mysql-test/t/query_cache.test
mysql-test/t/query_cache.test
+3
-2
sql/sql_cache.cc
sql/sql_cache.cc
+1
-1
sql/sql_yacc.yy
sql/sql_yacc.yy
+4
-1
No files found.
mysql-test/r/query_cache.result
View file @
280a1e4a
...
...
@@ -237,13 +237,18 @@ a
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 0
select sql_cache * from t1;
select sql_cache * from t1
union select * from t1
;
a
1
2
3
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
1
2
...
...
@@ -253,7 +258,7 @@ Variable_name Value
Qcache_hits 4
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache
1
Qcache_queries_in_cache
2
set query_cache_type=on;
reset query cache;
show status like "Qcache_queries_in_cache";
...
...
mysql-test/t/query_cache.test
View file @
280a1e4a
...
...
@@ -144,9 +144,10 @@ create table t1 (a int not null);
insert
into
t1
values
(
1
),(
2
),(
3
);
select
*
from
t1
;
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
;
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_queries_in_cache"
;
set
query_cache_type
=
on
;
...
...
sql/sql_cache.cc
View file @
280a1e4a
...
...
@@ -2439,7 +2439,7 @@ TABLE_COUNTER_TYPE Query_cache::is_cacheable(THD *thd, uint32 query_len,
if
(
lex
->
sql_command
==
SQLCOM_SELECT
&&
(
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
)))
&&
thd
->
safe_to_cache_query
)
{
...
...
sql/sql_yacc.yy
View file @
280a1e4a
...
...
@@ -1532,7 +1532,10 @@ select_option:
Select->options|= OPTION_FOUND_ROWS;
}
| 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 {}
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment