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
49429751
Commit
49429751
authored
Jan 22, 2009
by
Satya B
Browse files
Options
Browse Files
Download
Plain Diff
updating to the latest bugteam-5.1 branch
parents
c82ba71f
b88ec2f1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
51 additions
and
0 deletions
+51
-0
mysql-test/r/query_cache_notembedded.result
mysql-test/r/query_cache_notembedded.result
+16
-0
mysql-test/t/query_cache_notembedded.test
mysql-test/t/query_cache_notembedded.test
+32
-0
sql/sql_cache.cc
sql/sql_cache.cc
+3
-0
No files found.
mysql-test/r/query_cache_notembedded.result
View file @
49429751
...
@@ -346,6 +346,22 @@ id
...
@@ -346,6 +346,22 @@ id
drop table t1;
drop table t1;
drop function f1;
drop function f1;
set GLOBAL query_cache_size=0;
set GLOBAL query_cache_size=0;
DROP TABLE IF EXISTS t1;
FLUSH STATUS;
SET GLOBAL query_cache_size=1048576;
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
SHOW STATUS LIKE 'Qcache_queries_in_cache';
Variable_name Value
Qcache_queries_in_cache 0
LOCK TABLES t1 WRITE;
SELECT * FROM t1;
UNLOCK TABLES;
SHOW STATUS LIKE 'Qcache_queries_in_cache';
Variable_name Value
Qcache_queries_in_cache 0
DROP TABLE t1;
SET GLOBAL query_cache_size= default;
SET GLOBAL log_bin_trust_function_creators = 0;
SET GLOBAL log_bin_trust_function_creators = 0;
DROP DATABASE IF EXISTS bug30269;
DROP DATABASE IF EXISTS bug30269;
FLUSH STATUS;
FLUSH STATUS;
...
...
mysql-test/t/query_cache_notembedded.test
View file @
49429751
...
@@ -224,6 +224,38 @@ disconnect con2;
...
@@ -224,6 +224,38 @@ disconnect con2;
connection
default
;
connection
default
;
set
GLOBAL
query_cache_size
=
0
;
set
GLOBAL
query_cache_size
=
0
;
#
# Bug#40264: Aborted cached query causes query to hang indefinitely on next cache hit
#
--
disable_warnings
DROP
TABLE
IF
EXISTS
t1
;
--
enable_warnings
FLUSH
STATUS
;
SET
GLOBAL
query_cache_size
=
1048576
;
CREATE
TABLE
t1
(
a
INT
);
INSERT
INTO
t1
VALUES
(
1
),(
2
),(
3
),(
4
),(
5
);
SHOW
STATUS
LIKE
'Qcache_queries_in_cache'
;
LOCK
TABLES
t1
WRITE
;
connect
(
con1
,
localhost
,
root
,,);
--
send
SELECT
*
FROM
t1
connection
default
;
let
$show_type
=
open
tables
where
`table`
=
't1'
and
in_use
=
2
;
let
$show_pattern
=
'%t1%2%'
;
--
source
include
/
wait_show_pattern
.
inc
dirty_close
con1
;
UNLOCK
TABLES
;
let
$show_type
=
open
tables
where
`table`
=
't1'
and
in_use
=
0
;
let
$show_pattern
=
'%t1%0%'
;
--
source
include
/
wait_show_pattern
.
inc
SHOW
STATUS
LIKE
'Qcache_queries_in_cache'
;
DROP
TABLE
t1
;
SET
GLOBAL
query_cache_size
=
default
;
# End of 5.0 tests
SET
GLOBAL
log_bin_trust_function_creators
=
0
;
SET
GLOBAL
log_bin_trust_function_creators
=
0
;
#
#
...
...
sql/sql_cache.cc
View file @
49429751
...
@@ -781,6 +781,9 @@ void query_cache_end_of_result(THD *thd)
...
@@ -781,6 +781,9 @@ void query_cache_end_of_result(THD *thd)
if
(
thd
->
net
.
query_cache_query
==
0
)
if
(
thd
->
net
.
query_cache_query
==
0
)
DBUG_VOID_RETURN
;
DBUG_VOID_RETURN
;
/* Ensure that only complete results are cached. */
DBUG_ASSERT
(
thd
->
main_da
.
is_eof
());
if
(
thd
->
killed
)
if
(
thd
->
killed
)
{
{
query_cache_abort
(
&
thd
->
net
);
query_cache_abort
(
&
thd
->
net
);
...
...
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