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
0251fd6e
Commit
0251fd6e
authored
Dec 03, 2013
by
Rich Prohaska
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#142 remove tokudb_meta_mutex
parent
0aa72f43
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
11 deletions
+3
-11
storage/tokudb/ha_tokudb.cc
storage/tokudb/ha_tokudb.cc
+3
-7
storage/tokudb/hatoku_hton.cc
storage/tokudb/hatoku_hton.cc
+0
-3
storage/tokudb/hatoku_hton.h
storage/tokudb/hatoku_hton.h
+0
-1
No files found.
storage/tokudb/ha_tokudb.cc
View file @
0251fd6e
...
...
@@ -1094,7 +1094,6 @@ cleanup:
static
int
check_table_in_metadata
(
const
char
*
name
,
bool
*
table_found
,
DB_TXN
*
txn
)
{
int
error
=
0
;
DBT
key
;
pthread_mutex_lock
(
&
tokudb_meta_mutex
);
memset
((
void
*
)
&
key
,
0
,
sizeof
(
key
));
key
.
data
=
(
void
*
)
name
;
key
.
size
=
strlen
(
name
)
+
1
;
...
...
@@ -1116,7 +1115,6 @@ static int check_table_in_metadata(const char *name, bool* table_found, DB_TXN*
error
=
0
;
}
pthread_mutex_unlock
(
&
tokudb_meta_mutex
);
return
error
;
}
...
...
@@ -6951,6 +6949,8 @@ static inline enum row_type row_format_to_row_type(srv_row_format_t row_format)
return
ROW_TYPE_DEFAULT
;
}
volatile
int
tokudb_create_wait
=
0
;
//
// Creates a new table
// Parameters:
...
...
@@ -6963,6 +6963,7 @@ static inline enum row_type row_format_to_row_type(srv_row_format_t row_format)
//
int
ha_tokudb
::
create
(
const
char
*
name
,
TABLE
*
form
,
HA_CREATE_INFO
*
create_info
)
{
TOKUDB_DBUG_ENTER
(
"ha_tokudb::create %p %s"
,
this
,
name
);
while
(
tokudb_create_wait
)
sleep
(
1
);
int
error
;
DB
*
status_block
=
NULL
;
uint
version
;
...
...
@@ -6976,8 +6977,6 @@ int ha_tokudb::create(const char *name, TABLE * form, HA_CREATE_INFO * create_in
bool
create_from_engine
=
(
create_info
->
table_options
&
HA_OPTION_CREATE_FROM_ENGINE
);
memset
(
&
kc_info
,
0
,
sizeof
(
kc_info
));
pthread_mutex_lock
(
&
tokudb_meta_mutex
);
trx
=
(
tokudb_trx_data
*
)
thd_data_get
(
ha_thd
(),
tokudb_hton
->
slot
);
const
enum
row_type
row_type
=
((
create_info
->
used_fields
&
HA_CREATE_USED_ROW_FORMAT
)
...
...
@@ -7105,7 +7104,6 @@ cleanup:
}
}
tokudb_my_free
(
newname
);
pthread_mutex_unlock
(
&
tokudb_meta_mutex
);
TOKUDB_DBUG_RETURN
(
error
);
}
...
...
@@ -7201,7 +7199,6 @@ int ha_tokudb::delete_or_rename_table (const char* from_name, const char* to_nam
DBT
curr_val
;
memset
(
&
curr_key
,
0
,
sizeof
(
curr_key
));
memset
(
&
curr_val
,
0
,
sizeof
(
curr_val
));
pthread_mutex_lock
(
&
tokudb_meta_mutex
);
DB_TXN
*
parent_txn
=
NULL
;
tokudb_trx_data
*
trx
=
NULL
;
...
...
@@ -7292,7 +7289,6 @@ cleanup:
commit_txn
(
txn
,
0
);
}
}
pthread_mutex_unlock
(
&
tokudb_meta_mutex
);
return
error
;
}
...
...
storage/tokudb/hatoku_hton.cc
View file @
0251fd6e
...
...
@@ -173,7 +173,6 @@ DB_ENV *db_env;
DB
*
metadata_db
;
HASH
tokudb_open_tables
;
pthread_mutex_t
tokudb_mutex
;
pthread_mutex_t
tokudb_meta_mutex
;
#if TOKU_INCLUDE_HANDLERTON_HANDLE_FATAL_SIGNAL
static
my_bool
tokudb_gdb_on_fatal
;
...
...
@@ -315,7 +314,6 @@ static int tokudb_init_func(void *p) {
tokudb_hton
=
(
handlerton
*
)
p
;
pthread_mutex_init
(
&
tokudb_mutex
,
MY_MUTEX_INIT_FAST
);
pthread_mutex_init
(
&
tokudb_meta_mutex
,
MY_MUTEX_INIT_FAST
);
(
void
)
my_hash_init
(
&
tokudb_open_tables
,
table_alias_charset
,
32
,
0
,
0
,
(
my_hash_get_key
)
tokudb_get_key
,
0
,
0
);
tokudb_hton
->
state
=
SHOW_OPTION_YES
;
...
...
@@ -567,7 +565,6 @@ static int tokudb_done_func(void *p) {
toku_global_status_rows
=
NULL
;
my_hash_free
(
&
tokudb_open_tables
);
pthread_mutex_destroy
(
&
tokudb_mutex
);
pthread_mutex_destroy
(
&
tokudb_meta_mutex
);
#if defined(_WIN64)
toku_ydb_destroy
();
#endif
...
...
storage/tokudb/hatoku_hton.h
View file @
0251fd6e
...
...
@@ -379,7 +379,6 @@ static uint64_t tokudb_get_loader_memory_size_callback(void) {
extern
HASH
tokudb_open_tables
;
extern
pthread_mutex_t
tokudb_mutex
;
extern
pthread_mutex_t
tokudb_meta_mutex
;
extern
uint32_t
tokudb_write_status_frequency
;
extern
uint32_t
tokudb_read_status_frequency
;
...
...
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