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
74f229fd
Commit
74f229fd
authored
Nov 17, 2002
by
bell@sanja.is.com.ua
Browse files
Options
Browse Files
Download
Plain Diff
Merge abelkin@work.mysql.com:/home/bk/mysql-4.0
into sanja.is.com.ua:/home/bell/mysql/mysql-4.0
parents
0a75fe85
64047ea9
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
2 deletions
+12
-2
mysql-test/r/query_cache.result
mysql-test/r/query_cache.result
+6
-0
mysql-test/t/query_cache.test
mysql-test/t/query_cache.test
+2
-0
sql/mysqld.cc
sql/mysqld.cc
+1
-0
sql/sql_cache.cc
sql/sql_cache.cc
+2
-1
sql/sql_cache.h
sql/sql_cache.h
+1
-1
No files found.
mysql-test/r/query_cache.result
View file @
74f229fd
...
@@ -320,6 +320,9 @@ insert into t1 select * from t2;
...
@@ -320,6 +320,9 @@ insert into t1 select * from t2;
show status like "Qcache_hits";
show status like "Qcache_hits";
Variable_name Value
Variable_name Value
Qcache_hits 4
Qcache_hits 4
show status like "Qcache_lowmem_prunes";
Variable_name Value
Qcache_lowmem_prunes 0
select a as a1, a as a2 from t1;
select a as a1, a as a2 from t1;
select a as a2, a as a3 from t1;
select a as a2, a as a3 from t1;
select a as a3, a as a4 from t1;
select a as a3, a as a4 from t1;
...
@@ -330,6 +333,9 @@ Qcache_hits 4
...
@@ -330,6 +333,9 @@ 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 2
Qcache_queries_in_cache 2
show status like "Qcache_lowmem_prunes";
Variable_name Value
Qcache_lowmem_prunes 2
reset query cache;
reset query cache;
insert into t2 select * from t1;
insert into t2 select * from t1;
insert into t1 select * from t2;
insert into t1 select * from t2;
...
...
mysql-test/t/query_cache.test
View file @
74f229fd
...
@@ -206,6 +206,7 @@ insert into t2 select * from t1; # 2584
...
@@ -206,6 +206,7 @@ insert into t2 select * from t1; # 2584
insert
into
t1
select
*
from
t2
;
# 4181
insert
into
t1
select
*
from
t2
;
# 4181
show
status
like
"Qcache_hits"
;
show
status
like
"Qcache_hits"
;
show
status
like
"Qcache_lowmem_prunes"
;
disable_result_log
;
disable_result_log
;
select
a
as
a1
,
a
as
a2
from
t1
;
select
a
as
a1
,
a
as
a2
from
t1
;
select
a
as
a2
,
a
as
a3
from
t1
;
select
a
as
a2
,
a
as
a3
from
t1
;
...
@@ -215,6 +216,7 @@ select a as a1, a as a2 from t1;
...
@@ -215,6 +216,7 @@ select a as a1, a as a2 from t1;
enable_result_log
;
enable_result_log
;
show
status
like
"Qcache_hits"
;
show
status
like
"Qcache_hits"
;
show
status
like
"Qcache_queries_in_cache"
;
show
status
like
"Qcache_queries_in_cache"
;
show
status
like
"Qcache_lowmem_prunes"
;
reset
query
cache
;
reset
query
cache
;
#
#
# Query bigger then query_cache_limit
# Query bigger then query_cache_limit
...
...
sql/mysqld.cc
View file @
74f229fd
...
@@ -3793,6 +3793,7 @@ struct show_var_st status_vars[]= {
...
@@ -3793,6 +3793,7 @@ struct show_var_st status_vars[]= {
{
"Qcache_queries_in_cache"
,
(
char
*
)
&
query_cache
.
queries_in_cache
,
SHOW_LONG_CONST
},
{
"Qcache_queries_in_cache"
,
(
char
*
)
&
query_cache
.
queries_in_cache
,
SHOW_LONG_CONST
},
{
"Qcache_inserts"
,
(
char
*
)
&
query_cache
.
inserts
,
SHOW_LONG
},
{
"Qcache_inserts"
,
(
char
*
)
&
query_cache
.
inserts
,
SHOW_LONG
},
{
"Qcache_hits"
,
(
char
*
)
&
query_cache
.
hits
,
SHOW_LONG
},
{
"Qcache_hits"
,
(
char
*
)
&
query_cache
.
hits
,
SHOW_LONG
},
{
"Qcache_lowmem_prunes"
,
(
char
*
)
&
query_cache
.
lowmem_prunes
,
SHOW_LONG
},
{
"Qcache_not_cached"
,
(
char
*
)
&
query_cache
.
refused
,
SHOW_LONG
},
{
"Qcache_not_cached"
,
(
char
*
)
&
query_cache
.
refused
,
SHOW_LONG
},
{
"Qcache_free_memory"
,
(
char
*
)
&
query_cache
.
free_memory
,
{
"Qcache_free_memory"
,
(
char
*
)
&
query_cache
.
free_memory
,
SHOW_LONG_CONST
},
SHOW_LONG_CONST
},
...
...
sql/sql_cache.cc
View file @
74f229fd
...
@@ -708,7 +708,7 @@ Query_cache::Query_cache(ulong query_cache_limit_arg,
...
@@ -708,7 +708,7 @@ Query_cache::Query_cache(ulong query_cache_limit_arg,
:
query_cache_size
(
0
),
:
query_cache_size
(
0
),
query_cache_limit
(
query_cache_limit_arg
),
query_cache_limit
(
query_cache_limit_arg
),
queries_in_cache
(
0
),
hits
(
0
),
inserts
(
0
),
refused
(
0
),
queries_in_cache
(
0
),
hits
(
0
),
inserts
(
0
),
refused
(
0
),
total_blocks
(
0
),
total_blocks
(
0
),
lowmem_prunes
(
0
),
min_allocation_unit
(
ALIGN_SIZE
(
min_allocation_unit_arg
)),
min_allocation_unit
(
ALIGN_SIZE
(
min_allocation_unit_arg
)),
min_result_data_size
(
ALIGN_SIZE
(
min_result_data_size_arg
)),
min_result_data_size
(
ALIGN_SIZE
(
min_result_data_size_arg
)),
def_query_hash_size
(
ALIGN_SIZE
(
def_query_hash_size_arg
)),
def_query_hash_size
(
ALIGN_SIZE
(
def_query_hash_size_arg
)),
...
@@ -1512,6 +1512,7 @@ my_bool Query_cache::free_old_query()
...
@@ -1512,6 +1512,7 @@ my_bool Query_cache::free_old_query()
if
(
query_block
!=
0
)
if
(
query_block
!=
0
)
{
{
free_query
(
query_block
);
free_query
(
query_block
);
lowmem_prunes
++
;
DBUG_RETURN
(
0
);
DBUG_RETURN
(
0
);
}
}
}
}
...
...
sql/sql_cache.h
View file @
74f229fd
...
@@ -219,7 +219,7 @@ class Query_cache
...
@@ -219,7 +219,7 @@ class Query_cache
ulong
query_cache_size
,
query_cache_limit
;
ulong
query_cache_size
,
query_cache_limit
;
/* statistics */
/* statistics */
ulong
free_memory
,
queries_in_cache
,
hits
,
inserts
,
refused
,
ulong
free_memory
,
queries_in_cache
,
hits
,
inserts
,
refused
,
free_memory_blocks
,
total_blocks
;
free_memory_blocks
,
total_blocks
,
lowmem_prunes
;
protected:
protected:
/*
/*
...
...
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