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
29248787
Commit
29248787
authored
Dec 10, 2013
by
Rich Prohaska
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#141 fix another open close race
parent
1940f717
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
storage/tokudb/ha_tokudb.cc
storage/tokudb/ha_tokudb.cc
+3
-1
storage/tokudb/ha_tokudb.h
storage/tokudb/ha_tokudb.h
+1
-0
No files found.
storage/tokudb/ha_tokudb.cc
View file @
29248787
...
@@ -308,6 +308,8 @@ static int free_share(TOKUDB_SHARE * share) {
...
@@ -308,6 +308,8 @@ static int free_share(TOKUDB_SHARE * share) {
if
(
error
)
{
if
(
error
)
{
result
=
error
;
result
=
error
;
}
}
if
(
share
->
key_file
[
i
]
==
share
->
file
)
share
->
file
=
NULL
;
share
->
key_file
[
i
]
=
NULL
;
share
->
key_file
[
i
]
=
NULL
;
}
}
}
}
...
@@ -321,7 +323,6 @@ static int free_share(TOKUDB_SHARE * share) {
...
@@ -321,7 +323,6 @@ static int free_share(TOKUDB_SHARE * share) {
tokudb_pthread_mutex_lock
(
&
share
->
mutex
);
tokudb_pthread_mutex_lock
(
&
share
->
mutex
);
share
->
m_state
=
TOKUDB_SHARE
::
CLOSED
;
share
->
m_state
=
TOKUDB_SHARE
::
CLOSED
;
if
(
share
->
use_count
>
0
)
{
if
(
share
->
use_count
>
0
)
{
fprintf
(
stderr
,
"%ld %s:%u free_share %p %d
\n
"
,
syscall
(
186
),
__FILE__
,
__LINE__
,
share
,
share
->
use_count
);
tokudb_pthread_cond_broadcast
(
&
share
->
m_openclose_cond
);
tokudb_pthread_cond_broadcast
(
&
share
->
m_openclose_cond
);
tokudb_pthread_mutex_unlock
(
&
share
->
mutex
);
tokudb_pthread_mutex_unlock
(
&
share
->
mutex
);
tokudb_pthread_mutex_unlock
(
&
tokudb_mutex
);
tokudb_pthread_mutex_unlock
(
&
tokudb_mutex
);
...
@@ -1600,6 +1601,7 @@ int ha_tokudb::initialize_share(
...
@@ -1600,6 +1601,7 @@ int ha_tokudb::initialize_share(
}
}
DBUG_PRINT
(
"info"
,
(
"share->use_count %u"
,
share
->
use_count
));
DBUG_PRINT
(
"info"
,
(
"share->use_count %u"
,
share
->
use_count
));
share
->
m_initialize_count
++
;
error
=
get_status
(
txn
);
error
=
get_status
(
txn
);
if
(
error
)
{
if
(
error
)
{
...
...
storage/tokudb/ha_tokudb.h
View file @
29248787
...
@@ -192,6 +192,7 @@ public:
...
@@ -192,6 +192,7 @@ public:
pthread_cond_t
m_openclose_cond
;
pthread_cond_t
m_openclose_cond
;
enum
{
CLOSED
,
OPENING
,
OPENED
,
CLOSING
,
ERROR
}
m_state
;
enum
{
CLOSED
,
OPENING
,
OPENED
,
CLOSING
,
ERROR
}
m_state
;
int
m_error
;
int
m_error
;
int
m_initialize_count
;
};
};
typedef
struct
st_filter_key_part_info
{
typedef
struct
st_filter_key_part_info
{
...
...
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