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
011fed60
Commit
011fed60
authored
Aug 07, 2002
by
bell@sanja.is.com.ua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bug in query cache after temporary table creation.
parent
cf30288d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
41 additions
and
3 deletions
+41
-3
Docs/manual.texi
Docs/manual.texi
+2
-0
mysql-test/r/query_cache.result
mysql-test/r/query_cache.result
+20
-0
mysql-test/t/query_cache.test
mysql-test/t/query_cache.test
+15
-0
sql/sql_cache.cc
sql/sql_cache.cc
+4
-3
No files found.
Docs/manual.texi
View file @
011fed60
...
@@ -50147,6 +50147,8 @@ each individual 4.0.x release.
...
@@ -50147,6 +50147,8 @@ each individual 4.0.x release.
@itemize @bullet
@itemize @bullet
@item
@item
Fixed bug in query cache after temporary table creation.
@item
Fixed bug in multi-table @code{UPDATE}: when updating a table,
Fixed bug in multi-table @code{UPDATE}: when updating a table,
@code{do_select()} became confused about reading records from a cache.
@code{do_select()} became confused about reading records from a cache.
@item
@item
mysql-test/r/query_cache.result
View file @
011fed60
...
@@ -506,3 +506,23 @@ set GLOBAL query_cache_size=1900;
...
@@ -506,3 +506,23 @@ set GLOBAL query_cache_size=1900;
show global variables like "query_cache_size";
show global variables like "query_cache_size";
Variable_name Value
Variable_name Value
query_cache_size 1024
query_cache_size 1024
set GLOBAL query_cache_size=1048576;
create table t1 (i int not null);
create table t2 (i int not null);
select * from t1;
i
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 1
create temporary table t3 (i int not null);
select * from t2;
i
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 2
select * from t3;
i
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 2
drop table t1, t2, t3;
mysql-test/t/query_cache.test
View file @
011fed60
...
@@ -352,3 +352,18 @@ set GLOBAL query_cache_size=1700;
...
@@ -352,3 +352,18 @@ set GLOBAL query_cache_size=1700;
set
GLOBAL
query_cache_size
=
1800
;
set
GLOBAL
query_cache_size
=
1800
;
set
GLOBAL
query_cache_size
=
1900
;
set
GLOBAL
query_cache_size
=
1900
;
show
global
variables
like
"query_cache_size"
;
show
global
variables
like
"query_cache_size"
;
#
# Temporary tables
#
set
GLOBAL
query_cache_size
=
1048576
;
create
table
t1
(
i
int
not
null
);
create
table
t2
(
i
int
not
null
);
select
*
from
t1
;
show
status
like
"Qcache_queries_in_cache"
;
create
temporary
table
t3
(
i
int
not
null
);
select
*
from
t2
;
show
status
like
"Qcache_queries_in_cache"
;
select
*
from
t3
;
show
status
like
"Qcache_queries_in_cache"
;
drop
table
t1
,
t2
,
t3
;
sql/sql_cache.cc
View file @
011fed60
...
@@ -2395,7 +2395,6 @@ TABLE_COUNTER_TYPE Query_cache::is_cacheable(THD *thd, uint32 query_len,
...
@@ -2395,7 +2395,6 @@ TABLE_COUNTER_TYPE Query_cache::is_cacheable(THD *thd, uint32 query_len,
DBUG_ENTER
(
"Query_cache::is_cacheable"
);
DBUG_ENTER
(
"Query_cache::is_cacheable"
);
if
(
lex
->
sql_command
==
SQLCOM_SELECT
&&
if
(
lex
->
sql_command
==
SQLCOM_SELECT
&&
thd
->
temporary_tables
==
0
&&
(
thd
->
variables
.
query_cache_type
==
1
||
(
thd
->
variables
.
query_cache_type
==
1
||
(
thd
->
variables
.
query_cache_type
==
2
&&
(
lex
->
select
->
options
&
(
thd
->
variables
.
query_cache_type
==
2
&&
(
lex
->
select
->
options
&
OPTION_TO_QUERY_CACHE
)))
&&
OPTION_TO_QUERY_CACHE
)))
&&
...
@@ -2416,9 +2415,11 @@ TABLE_COUNTER_TYPE Query_cache::is_cacheable(THD *thd, uint32 query_len,
...
@@ -2416,9 +2415,11 @@ TABLE_COUNTER_TYPE Query_cache::is_cacheable(THD *thd, uint32 query_len,
has_transactions
=
(
has_transactions
||
has_transactions
=
(
has_transactions
||
tables_used
->
table
->
file
->
has_transactions
());
tables_used
->
table
->
file
->
has_transactions
());
if
(
tables_used
->
table
->
db_type
==
DB_TYPE_MRG_ISAM
)
if
(
tables_used
->
table
->
db_type
==
DB_TYPE_MRG_ISAM
||
tables_used
->
table
->
tmp_table
!=
NO_TMP_TABLE
)
{
{
DBUG_PRINT
(
"qcache"
,
(
"select not cacheable: used MRG_ISAM table(s)"
));
DBUG_PRINT
(
"qcache"
,
(
"select not cacheable: used MRG_ISAM or temporary table(s)"
));
DBUG_RETURN
(
0
);
DBUG_RETURN
(
0
);
}
}
if
(
tables_used
->
table
->
db_type
==
DB_TYPE_MRG_MYISAM
)
if
(
tables_used
->
table
->
db_type
==
DB_TYPE_MRG_MYISAM
)
...
...
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