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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
85f0ef97
Commit
85f0ef97
authored
Dec 01, 2005
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge sanja.is.com.ua:/home/bell/mysql/bk/work-bug5-5.0
into sanja.is.com.ua:/home/bell/mysql/bk/work-merge1-5.0
parents
ba079bad
2061a3a6
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
93 additions
and
1 deletion
+93
-1
mysql-test/r/view_query_cache.result
mysql-test/r/view_query_cache.result
+61
-0
mysql-test/t/view_query_cache.test
mysql-test/t/view_query_cache.test
+31
-0
sql/sql_cache.cc
sql/sql_cache.cc
+1
-1
No files found.
mysql-test/r/view_query_cache.result
View file @
85f0ef97
...
...
@@ -132,4 +132,65 @@ unlock tables;
set query_cache_wlock_invalidate=default;
drop view v1;
drop table t1;
flush status;
create table t1 (a int, b int);
create algorithm=temptable view v1 as select * from t1;
select * from v1;
a b
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 v1;
a b
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 (1,1);
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 v1;
a b
1 1
select * from v1;
a b
1 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 2
show status like "Qcache_hits";
Variable_name Value
Qcache_hits 2
drop view v1;
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 2
show status like "Qcache_hits";
Variable_name Value
Qcache_hits 2
drop table t1;
set GLOBAL query_cache_size=default;
mysql-test/t/view_query_cache.test
View file @
85f0ef97
...
...
@@ -96,4 +96,35 @@ unlock tables;
set
query_cache_wlock_invalidate
=
default
;
drop
view
v1
;
drop
table
t1
;
#
# BUG#15119: returning temptable view from the query cache.
#
flush
status
;
create
table
t1
(
a
int
,
b
int
);
create
algorithm
=
temptable
view
v1
as
select
*
from
t1
;
select
*
from
v1
;
show
status
like
"Qcache_queries_in_cache"
;
show
status
like
"Qcache_inserts"
;
show
status
like
"Qcache_hits"
;
select
*
from
v1
;
show
status
like
"Qcache_queries_in_cache"
;
show
status
like
"Qcache_inserts"
;
show
status
like
"Qcache_hits"
;
insert
into
t1
values
(
1
,
1
);
show
status
like
"Qcache_queries_in_cache"
;
show
status
like
"Qcache_inserts"
;
show
status
like
"Qcache_hits"
;
select
*
from
v1
;
select
*
from
v1
;
show
status
like
"Qcache_queries_in_cache"
;
show
status
like
"Qcache_inserts"
;
show
status
like
"Qcache_hits"
;
drop
view
v1
;
show
status
like
"Qcache_queries_in_cache"
;
show
status
like
"Qcache_inserts"
;
show
status
like
"Qcache_hits"
;
drop
table
t1
;
# Reset default environment.
set
GLOBAL
query_cache_size
=
default
;
sql/sql_cache.cc
View file @
85f0ef97
...
...
@@ -2184,7 +2184,7 @@ Query_cache::register_tables_from_list(TABLE_LIST *tables_used,
tables_used
;
tables_used
=
tables_used
->
next_global
,
n
++
,
block_table
++
)
{
if
(
tables_used
->
derived
)
if
(
tables_used
->
derived
&&
!
tables_used
->
view
)
{
DBUG_PRINT
(
"qcache"
,
(
"derived table skipped"
));
n
--
;
...
...
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