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
7ce0bd7a
Commit
7ce0bd7a
authored
Jan 29, 2007
by
df@kahlann.erinye.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
apply holyfoot's patch for BUG#25895
parent
eadd2c4e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
sql/item_func.cc
sql/item_func.cc
+10
-4
No files found.
sql/item_func.cc
View file @
7ce0bd7a
...
...
@@ -3084,7 +3084,13 @@ class User_level_lock
int
count
;
bool
locked
;
pthread_cond_t
cond
;
#ifndef EMBEDDED_LIBRARY
pthread_t
thread
;
void
set_thread
(
THD
*
thd
)
{
thread
=
thd
->
real_id
;
}
#else
THD
*
thread
;
void
set_thread
(
THD
*
thd
)
{
thread
=
thd
;
}
#endif
/*EMBEDDED_LIBRARY*/
ulong
thread_id
;
User_level_lock
(
const
char
*
key_arg
,
uint
length
,
ulong
id
)
...
...
@@ -3238,7 +3244,7 @@ void debug_sync_point(const char* lock_name, uint lock_timeout)
else
{
ull
->
locked
=
1
;
ull
->
thread
=
thd
->
real_id
;
ull
->
set_thread
(
thd
)
;
thd
->
ull
=
ull
;
}
pthread_mutex_unlock
(
&
LOCK_user_locks
);
...
...
@@ -3313,7 +3319,7 @@ longlong Item_func_get_lock::val_int()
null_value
=
1
;
// Probably out of memory
return
0
;
}
ull
->
thread
=
thd
->
real_id
;
ull
->
set_thread
(
thd
)
;
thd
->
ull
=
ull
;
pthread_mutex_unlock
(
&
LOCK_user_locks
);
return
1
;
// Got new lock
...
...
@@ -3354,7 +3360,7 @@ longlong Item_func_get_lock::val_int()
else
// We got the lock
{
ull
->
locked
=
1
;
ull
->
thread
=
thd
->
real_id
;
ull
->
set_thread
(
thd
)
;
ull
->
thread_id
=
thd
->
thread_id
;
thd
->
ull
=
ull
;
error
=
0
;
...
...
@@ -3403,7 +3409,7 @@ longlong Item_func_release_lock::val_int()
else
{
#ifdef EMBEDDED_LIBRARY
if
(
ull
->
locked
&&
pthread_equal
(
current_thd
->
real_id
,
ull
->
thread
))
if
(
ull
->
locked
&&
(
current_thd
==
ull
->
thread
))
#else
if
(
ull
->
locked
&&
pthread_equal
(
pthread_self
(),
ull
->
thread
))
#endif
...
...
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