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
fd0989e7
Commit
fd0989e7
authored
Jul 28, 2002
by
bell@sanja.is.com.ua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed query cahe resize bug
parent
28142456
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
3 deletions
+36
-3
mysql-test/r/query_cache.result
mysql-test/r/query_cache.result
+16
-0
mysql-test/t/query_cache.test
mysql-test/t/query_cache.test
+16
-0
sql/set_var.cc
sql/set_var.cc
+1
-1
sql/sql_cache.cc
sql/sql_cache.cc
+3
-2
No files found.
mysql-test/r/query_cache.result
View file @
fd0989e7
...
...
@@ -490,3 +490,19 @@ drop table t1;
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 0
set GLOBAL query_cache_size=1000;
show global variables like "query_cache_size";
Variable_name Value
query_cache_size 0
set GLOBAL query_cache_size=1100;
set GLOBAL query_cache_size=1200;
set GLOBAL query_cache_size=1300;
set GLOBAL query_cache_size=1400;
set GLOBAL query_cache_size=1500;
set GLOBAL query_cache_size=1600;
set GLOBAL query_cache_size=1700;
set GLOBAL query_cache_size=1800;
set GLOBAL query_cache_size=1900;
show global variables like "query_cache_size";
Variable_name Value
query_cache_size 1024
mysql-test/t/query_cache.test
View file @
fd0989e7
...
...
@@ -336,3 +336,19 @@ select a from t1;
show
status
like
"Qcache_queries_in_cache"
;
drop
table
t1
;
show
status
like
"Qcache_queries_in_cache"
;
#
# Test of query cache resizing
#
set
GLOBAL
query_cache_size
=
1000
;
show
global
variables
like
"query_cache_size"
;
set
GLOBAL
query_cache_size
=
1100
;
set
GLOBAL
query_cache_size
=
1200
;
set
GLOBAL
query_cache_size
=
1300
;
set
GLOBAL
query_cache_size
=
1400
;
set
GLOBAL
query_cache_size
=
1500
;
set
GLOBAL
query_cache_size
=
1600
;
set
GLOBAL
query_cache_size
=
1700
;
set
GLOBAL
query_cache_size
=
1800
;
set
GLOBAL
query_cache_size
=
1900
;
show
global
variables
like
"query_cache_size"
;
sql/set_var.cc
View file @
fd0989e7
...
...
@@ -467,7 +467,7 @@ struct show_var_st init_vars[]= {
{
sys_read_buff_size
.
name
,
(
char
*
)
&
sys_read_buff_size
,
SHOW_SYS
},
{
sys_read_rnd_buff_size
.
name
,(
char
*
)
&
sys_read_rnd_buff_size
,
SHOW_SYS
},
{
sys_rpl_recovery_rank
.
name
,(
char
*
)
&
sys_rpl_recovery_rank
,
SHOW_SYS
},
#ifdef HAVE_QUER
T
Y_CACHE
#ifdef HAVE_QUERY_CACHE
{
sys_query_cache_limit
.
name
,(
char
*
)
&
sys_query_cache_limit
,
SHOW_SYS
},
{
sys_query_cache_size
.
name
,
(
char
*
)
&
sys_query_cache_size
,
SHOW_SYS
},
{
sys_query_cache_type
.
name
,
(
char
*
)
&
sys_query_cache_type
,
SHOW_SYS
},
...
...
sql/sql_cache.cc
View file @
fd0989e7
...
...
@@ -1276,10 +1276,11 @@ ulong Query_cache::init_cache()
query_cache_size
-=
additional_data_size
;
STRUCT_LOCK
(
&
structure_guard_mutex
);
if
(
query_cache
_size
<=
min_allocation_unit
)
if
(
max_mem_bin
_size
<=
min_allocation_unit
)
{
DBUG_PRINT
(
"qcache"
,
(
" query_cache_size <= min_allocation_unit => cache disabled"
));
(
" max bin size (%lu) <= min_allocation_unit => cache disabled"
,
max_mem_bin_size
));
STRUCT_UNLOCK
(
&
structure_guard_mutex
);
goto
err
;
}
...
...
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