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
007b4101
Commit
007b4101
authored
Oct 29, 2007
by
joerg@trift2
Browse files
Options
Browse Files
Download
Plain Diff
Merge trift2.:/MySQL/M50/clone-5.0
into trift2.:/MySQL/M50/push-5.0
parents
40872761
af22cc40
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
sql/sql_cache.cc
sql/sql_cache.cc
+6
-0
No files found.
sql/sql_cache.cc
View file @
007b4101
...
...
@@ -1032,12 +1032,14 @@ Query_cache::send_result_to_client(THD *thd, char *sql, uint query_length)
Query_cache_block_table
*
block_table
,
*
block_table_end
;
ulong
tot_length
;
Query_cache_query_flags
flags
;
#ifndef __WIN__
const
uint
spin_treshold
=
50000
;
const
double
lock_time_treshold
=
0.1
;
/* Time in seconds */
uint
spin_count
=
0
;
int
lock_status
=
0
;
ulong
new_time
=
0
;
ulong
stop_time
=
0
;
#endif
DBUG_ENTER
(
"Query_cache::send_result_to_client"
);
...
...
@@ -1085,6 +1087,9 @@ Query_cache::send_result_to_client(THD *thd, char *sql, uint query_length)
}
}
#ifdef __WIN__
STRUCT_LOCK
(
&
structure_guard_mutex
);
#else
stop_time
=
my_clock
()
+
(
ulong
)
lock_time_treshold
*
CLOCKS_PER_SEC
;
while
((
lock_status
=
pthread_mutex_trylock
(
&
structure_guard_mutex
))
==
EBUSY
&&
spin_count
<
spin_treshold
...
...
@@ -1107,6 +1112,7 @@ Query_cache::send_result_to_client(THD *thd, char *sql, uint query_length)
thd
->
lex
->
safe_to_cache_query
=
FALSE
;
goto
err
;
}
#endif
if
(
query_cache_size
==
0
||
flush_in_progress
)
{
...
...
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