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