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
7bc145c5
Commit
7bc145c5
authored
21 years ago
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
9f86ed8f
067f5762
Changes
4
Show 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 @
7bc145c5
...
...
@@ -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";
...
...
This diff is collapsed.
Click to expand it.
mysql-test/t/query_cache.test
View file @
7bc145c5
...
...
@@ -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
;
...
...
This diff is collapsed.
Click to expand it.
sql/sql_cache.cc
View file @
7bc145c5
...
...
@@ -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
)
{
...
...
This diff is collapsed.
Click to expand it.
sql/sql_yacc.yy
View file @
7bc145c5
...
...
@@ -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 {}
;
...
...
This diff is collapsed.
Click to expand it.
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