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
aa07e4bd
Commit
aa07e4bd
authored
Sep 10, 2013
by
Rich Prohaska
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refs #71 rearrange IS code
parent
515773c4
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
800 additions
and
797 deletions
+800
-797
storage/tokudb/ha_tokudb.cc
storage/tokudb/ha_tokudb.cc
+15
-15
storage/tokudb/hatoku_defines.h
storage/tokudb/hatoku_defines.h
+1
-1
storage/tokudb/hatoku_hton.cc
storage/tokudb/hatoku_hton.cc
+784
-781
No files found.
storage/tokudb/ha_tokudb.cc
View file @
aa07e4bd
...
...
@@ -1717,7 +1717,7 @@ int ha_tokudb::initialize_share(
}
else
{
do_commit
=
true
;
error
=
txn_begin
(
db_env
,
0
,
&
txn
,
0
);
error
=
txn_begin
(
db_env
,
0
,
&
txn
,
0
,
thd
);
if
(
error
)
{
goto
exit
;
}
}
...
...
@@ -2002,7 +2002,7 @@ int ha_tokudb::estimate_num_rows(DB* db, uint64_t* num_rows, DB_TXN* txn) {
DB_TXN
*
txn_to_use
=
NULL
;
if
(
txn
==
NULL
)
{
error
=
txn_begin
(
db_env
,
0
,
&
txn_to_use
,
DB_READ_UNCOMMITTED
);
error
=
txn_begin
(
db_env
,
0
,
&
txn_to_use
,
DB_READ_UNCOMMITTED
,
ha_thd
()
);
if
(
error
)
goto
cleanup
;
do_commit
=
true
;
}
...
...
@@ -2050,7 +2050,7 @@ int ha_tokudb::remove_metadata(DB* db, void* key_data, uint key_size, DB_TXN* tr
// transaction to be used for putting metadata into status.tokudb
//
if
(
transaction
==
NULL
)
{
error
=
txn_begin
(
db_env
,
0
,
&
txn
,
0
);
error
=
txn_begin
(
db_env
,
0
,
&
txn
,
0
,
ha_thd
()
);
if
(
error
)
{
goto
cleanup
;
}
...
...
@@ -2094,7 +2094,7 @@ int ha_tokudb::write_metadata(DB* db, void* key_data, uint key_size, void* val_d
// transaction to be used for putting metadata into status.tokudb
//
if
(
transaction
==
NULL
)
{
error
=
txn_begin
(
db_env
,
0
,
&
txn
,
0
);
error
=
txn_begin
(
db_env
,
0
,
&
txn
,
0
,
ha_thd
()
);
if
(
error
)
{
goto
cleanup
;
}
...
...
@@ -3073,7 +3073,7 @@ void ha_tokudb::init_hidden_prim_key_info() {
}
else
{
do_commit
=
true
;
error
=
txn_begin
(
db_env
,
0
,
&
txn
,
0
);
error
=
txn_begin
(
db_env
,
0
,
&
txn
,
0
,
thd
);
assert
(
error
==
0
);
}
...
...
@@ -3290,7 +3290,7 @@ bool ha_tokudb::may_table_be_empty(DB_TXN *txn) {
DB_TXN
*
tmp_txn
=
NULL
;
if
(
txn
==
NULL
)
{
error
=
txn_begin
(
db_env
,
0
,
&
tmp_txn
,
0
);
error
=
txn_begin
(
db_env
,
0
,
&
tmp_txn
,
0
,
ha_thd
()
);
if
(
error
)
{
goto
cleanup
;
}
...
...
@@ -4074,7 +4074,7 @@ int ha_tokudb::write_row(uchar * record) {
create_sub_trans
=
(
using_ignore
&&
!
(
do_ignore_flag_optimization
(
thd
,
table
,
share
->
replace_into_fast
)));
if
(
create_sub_trans
)
{
error
=
txn_begin
(
db_env
,
transaction
,
&
sub_trans
,
DB_INHERIT_ISOLATION
);
error
=
txn_begin
(
db_env
,
transaction
,
&
sub_trans
,
DB_INHERIT_ISOLATION
,
thd
);
if
(
error
)
{
goto
cleanup
;
}
...
...
@@ -4238,7 +4238,7 @@ int ha_tokudb::update_row(const uchar * old_row, uchar * new_row) {
curr_num_DBs
=
share
->
num_DBs
;
if
(
using_ignore
)
{
error
=
txn_begin
(
db_env
,
transaction
,
&
sub_trans
,
DB_INHERIT_ISOLATION
);
error
=
txn_begin
(
db_env
,
transaction
,
&
sub_trans
,
DB_INHERIT_ISOLATION
,
thd
);
if
(
error
)
{
goto
cleanup
;
}
...
...
@@ -5936,7 +5936,7 @@ int ha_tokudb::info(uint flag) {
TOKU_DB_FRAGMENTATION_S
frag_info
;
memset
(
&
frag_info
,
0
,
sizeof
frag_info
);
error
=
txn_begin
(
db_env
,
NULL
,
&
txn
,
DB_READ_UNCOMMITTED
);
error
=
txn_begin
(
db_env
,
NULL
,
&
txn
,
DB_READ_UNCOMMITTED
,
ha_thd
()
);
if
(
error
)
{
goto
cleanup
;
}
// we should always have a primary key
...
...
@@ -6150,7 +6150,7 @@ int ha_tokudb::create_txn(THD* thd, tokudb_trx_data* trx) {
(
thd_sql_command
(
thd
)
!=
SQLCOM_ALTER_TABLE
))
{
/* QQQ We have to start a master transaction */
// DBUG_PRINT("trans", ("starting transaction all "));
if
((
error
=
txn_begin
(
db_env
,
NULL
,
&
trx
->
all
,
toku_iso_to_txn_flag
(
toku_iso_level
))))
{
if
((
error
=
txn_begin
(
db_env
,
NULL
,
&
trx
->
all
,
toku_iso_to_txn_flag
(
toku_iso_level
)
,
thd
)))
{
trx
->
tokudb_lock_count
--
;
// We didn't get the lock
goto
cleanup
;
}
...
...
@@ -6186,7 +6186,7 @@ int ha_tokudb::create_txn(THD* thd, tokudb_trx_data* trx) {
else
{
txn_begin_flags
=
DB_INHERIT_ISOLATION
;
}
if
((
error
=
txn_begin
(
db_env
,
trx
->
sp_level
,
&
trx
->
stmt
,
txn_begin_flags
)))
{
if
((
error
=
txn_begin
(
db_env
,
trx
->
sp_level
,
&
trx
->
stmt
,
txn_begin_flags
,
thd
)))
{
/* We leave the possible master transaction open */
trx
->
tokudb_lock_count
--
;
// We didn't get the lock
goto
cleanup
;
...
...
@@ -6993,7 +6993,7 @@ int ha_tokudb::create(const char *name, TABLE * form, HA_CREATE_INFO * create_in
}
else
{
do_commit
=
true
;
error
=
txn_begin
(
db_env
,
0
,
&
txn
,
0
);
error
=
txn_begin
(
db_env
,
0
,
&
txn
,
0
,
thd
);
if
(
error
)
{
goto
cleanup
;
}
}
...
...
@@ -7179,7 +7179,7 @@ int ha_tokudb::delete_or_rename_table (const char* from_name, const char* to_nam
memset
(
&
curr_val
,
0
,
sizeof
(
curr_val
));
pthread_mutex_lock
(
&
tokudb_meta_mutex
);
error
=
txn_begin
(
db_env
,
0
,
&
txn
,
0
);
error
=
txn_begin
(
db_env
,
0
,
&
txn
,
0
,
ha_thd
()
);
if
(
error
)
{
goto
cleanup
;
}
//
...
...
@@ -7524,7 +7524,7 @@ void ha_tokudb::init_auto_increment() {
value
.
flags
=
DB_DBT_USERMEM
;
DB_TXN
*
txn
=
NULL
;
error
=
txn_begin
(
db_env
,
0
,
&
txn
,
0
);
error
=
txn_begin
(
db_env
,
0
,
&
txn
,
0
,
ha_thd
()
);
if
(
error
)
{
share
->
last_auto_increment
=
0
;
}
...
...
@@ -8255,7 +8255,7 @@ int ha_tokudb::delete_all_rows_internal() {
uint
curr_num_DBs
=
0
;
DB_TXN
*
txn
=
NULL
;
error
=
txn_begin
(
db_env
,
0
,
&
txn
,
0
);
error
=
txn_begin
(
db_env
,
0
,
&
txn
,
0
,
ha_thd
()
);
if
(
error
)
{
goto
cleanup
;
}
curr_num_DBs
=
table
->
s
->
keys
+
test
(
hidden_primary_key
);
...
...
storage/tokudb/hatoku_defines.h
View file @
aa07e4bd
...
...
@@ -329,7 +329,7 @@ static inline void make_name(char *newname, const char *tablename, const char *d
nn
+=
sprintf
(
nn
,
"-%s"
,
dictname
);
}
static
inline
int
txn_begin
(
DB_ENV
*
env
,
DB_TXN
*
parent
,
DB_TXN
**
txn
,
uint32_t
flags
)
{
static
inline
int
txn_begin
(
DB_ENV
*
env
,
DB_TXN
*
parent
,
DB_TXN
**
txn
,
uint32_t
flags
,
THD
*
thd
)
{
int
r
=
env
->
txn_begin
(
env
,
parent
,
txn
,
flags
);
if
((
tokudb_debug
&
TOKUDB_DEBUG_TXN
)
&&
r
==
0
)
{
TOKUDB_TRACE
(
"begin txn %p %p %u
\n
"
,
parent
,
*
txn
,
flags
);
...
...
storage/tokudb/hatoku_hton.cc
View file @
aa07e4bd
This diff is collapsed.
Click to expand it.
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