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
d56ab5af
Commit
d56ab5af
authored
Nov 17, 2006
by
bell@desktop.sanja.is.com.ua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix of debbuging mode of query cache (proposed by Monty reviewed by me).
parent
2b9bcb2c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
18 deletions
+24
-18
sql/sql_cache.cc
sql/sql_cache.cc
+24
-18
No files found.
sql/sql_cache.cc
View file @
d56ab5af
...
...
@@ -702,6 +702,7 @@ void query_cache_abort(NET *net)
void
query_cache_end_of_result
(
THD
*
thd
)
{
Query_cache_block
*
query_block
;
DBUG_ENTER
(
"query_cache_end_of_result"
);
/* See the comment on double-check locking usage above. */
...
...
@@ -717,13 +718,9 @@ void query_cache_end_of_result(THD *thd)
if
(
unlikely
(
query_cache
.
query_cache_size
==
0
||
query_cache
.
flush_in_progress
))
{
STRUCT_UNLOCK
(
&
query_cache
.
structure_guard_mutex
);
DBUG_VOID_RETURN
;
}
goto
end
;
Query_cache_block
*
query_block
=
((
Query_cache_block
*
)
thd
->
net
.
query_cache_query
);
query_block
=
((
Query_cache_block
*
)
thd
->
net
.
query_cache_query
);
if
(
query_block
)
{
DUMP
(
&
query_cache
);
...
...
@@ -742,27 +739,25 @@ void query_cache_end_of_result(THD *thd)
header
->
query
()));
query_cache
.
wreck
(
__LINE__
,
""
);
STRUCT_UNLOCK
(
&
query_cache
.
structure_guard_mutex
);
DBUG_VOID_RETURN
;
/*
We do not need call of BLOCK_UNLOCK_WR(query_block); here because
query_cache.wreck() switched query cache off but left content
untouched for investigation (it is debugging method).
*/
goto
end
;
}
#endif
header
->
found_rows
(
current_thd
->
limit_found_rows
);
header
->
result
()
->
type
=
Query_cache_block
::
RESULT
;
header
->
writer
(
0
);
thd
->
net
.
query_cache_query
=
0
;
BLOCK_UNLOCK_WR
(
query_block
);
DBUG_EXECUTE
(
"check_querycache"
,
query_cache
.
check_integrity
(
1
););
STRUCT_UNLOCK
(
&
query_cache
.
structure_guard_mutex
);
BLOCK_UNLOCK_WR
(
query_block
);
}
else
{
// Cache was flushed or resized and query was deleted => do nothing
STRUCT_UNLOCK
(
&
query_cache
.
structure_guard_mutex
);
}
end:
STRUCT_UNLOCK
(
&
query_cache
.
structure_guard_mutex
);
DBUG_VOID_RETURN
;
}
...
...
@@ -3529,7 +3524,7 @@ uint Query_cache::filename_2_table_key (char *key, const char *path,
#if defined(DBUG_OFF) && !defined(USE_QUERY_CACHE_INTEGRITY_CHECK)
void
wreck
(
uint
line
,
const
char
*
message
)
{}
void
wreck
(
uint
line
,
const
char
*
message
)
{
query_cache_size
=
0
;
}
void
bins_dump
()
{}
void
cache_dump
()
{}
void
queries_dump
()
{}
...
...
@@ -3541,6 +3536,17 @@ my_bool in_blocks(Query_cache_block * point) { return 0; }
#else
/*
Debug method which switch query cache off but left content for
investigation.
SYNOPSIS
Query_cache::wreck()
line line of the wreck() call
message message for logging
*/
void
Query_cache
::
wreck
(
uint
line
,
const
char
*
message
)
{
THD
*
thd
=
current_thd
;
...
...
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