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
fb30dc26
Commit
fb30dc26
authored
Apr 07, 2014
by
Rich Prohaska
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#208 debug create temp table and transactions
parent
4a884235
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
14 deletions
+6
-14
storage/tokudb/ha_tokudb.cc
storage/tokudb/ha_tokudb.cc
+4
-7
storage/tokudb/hatoku_hton.cc
storage/tokudb/hatoku_hton.cc
+2
-7
No files found.
storage/tokudb/ha_tokudb.cc
View file @
fb30dc26
...
@@ -4487,7 +4487,7 @@ void ha_tokudb::invalidate_icp() {
...
@@ -4487,7 +4487,7 @@ void ha_tokudb::invalidate_icp() {
// error otherwise
// error otherwise
//
//
int
ha_tokudb
::
index_init
(
uint
keynr
,
bool
sorted
)
{
int
ha_tokudb
::
index_init
(
uint
keynr
,
bool
sorted
)
{
TOKUDB_HANDLER_DBUG_ENTER
(
"%d
"
,
keynr
);
TOKUDB_HANDLER_DBUG_ENTER
(
"%d
%u txn %p"
,
keynr
,
sorted
,
transaction
);
int
error
;
int
error
;
THD
*
thd
=
ha_thd
();
THD
*
thd
=
ha_thd
();
...
@@ -6078,7 +6078,7 @@ int ha_tokudb::create_txn(THD* thd, tokudb_trx_data* trx) {
...
@@ -6078,7 +6078,7 @@ int ha_tokudb::create_txn(THD* thd, tokudb_trx_data* trx) {
goto
cleanup
;
goto
cleanup
;
}
}
if
(
tokudb_debug
&
TOKUDB_DEBUG_TXN
)
{
if
(
tokudb_debug
&
TOKUDB_DEBUG_TXN
)
{
TOKUDB_HANDLER_TRACE
(
"
trx %p just created master %p"
,
trx
,
trx
->
all
);
TOKUDB_HANDLER_TRACE
(
"
created master %p"
,
trx
->
all
);
}
}
trx
->
sp_level
=
trx
->
all
;
trx
->
sp_level
=
trx
->
all
;
trans_register_ha
(
thd
,
true
,
tokudb_hton
);
trans_register_ha
(
thd
,
true
,
tokudb_hton
);
...
@@ -6115,7 +6115,7 @@ int ha_tokudb::create_txn(THD* thd, tokudb_trx_data* trx) {
...
@@ -6115,7 +6115,7 @@ int ha_tokudb::create_txn(THD* thd, tokudb_trx_data* trx) {
}
}
trx
->
sub_sp_level
=
trx
->
stmt
;
trx
->
sub_sp_level
=
trx
->
stmt
;
if
(
tokudb_debug
&
TOKUDB_DEBUG_TXN
)
{
if
(
tokudb_debug
&
TOKUDB_DEBUG_TXN
)
{
TOKUDB_HANDLER_TRACE
(
"
trx %p just created stmt %p %p"
,
trx
,
trx
->
sp_level
,
trx
->
stmt
);
TOKUDB_HANDLER_TRACE
(
"
created stmt %p sp_level %p"
,
trx
->
sp_level
,
trx
->
stmt
);
}
}
reset_stmt_progress
(
&
trx
->
stmt_progress
);
reset_stmt_progress
(
&
trx
->
stmt_progress
);
trans_register_ha
(
thd
,
false
,
tokudb_hton
);
trans_register_ha
(
thd
,
false
,
tokudb_hton
);
...
@@ -6162,9 +6162,6 @@ int ha_tokudb::external_lock(THD * thd, int lock_type) {
...
@@ -6162,9 +6162,6 @@ int ha_tokudb::external_lock(THD * thd, int lock_type) {
error
=
create_tokudb_trx_data_instance
(
&
trx
);
error
=
create_tokudb_trx_data_instance
(
&
trx
);
if
(
error
)
{
goto
cleanup
;
}
if
(
error
)
{
goto
cleanup
;
}
thd_data_set
(
thd
,
tokudb_hton
->
slot
,
trx
);
thd_data_set
(
thd
,
tokudb_hton
->
slot
,
trx
);
if
(
tokudb_debug
&
TOKUDB_DEBUG_TXN
)
{
TOKUDB_HANDLER_TRACE
(
"set trx %p"
,
trx
);
}
}
}
if
(
trx
->
all
==
NULL
)
{
if
(
trx
->
all
==
NULL
)
{
trx
->
sp_level
=
NULL
;
trx
->
sp_level
=
NULL
;
...
@@ -6252,7 +6249,7 @@ int ha_tokudb::start_stmt(THD * thd, thr_lock_type lock_type) {
...
@@ -6252,7 +6249,7 @@ int ha_tokudb::start_stmt(THD * thd, thr_lock_type lock_type) {
goto
cleanup
;
goto
cleanup
;
}
}
if
(
tokudb_debug
&
TOKUDB_DEBUG_TXN
)
{
if
(
tokudb_debug
&
TOKUDB_DEBUG_TXN
)
{
TOKUDB_HANDLER_TRACE
(
"
trx %p %p %p %p %p %u"
,
trx
,
trx
->
all
,
trx
->
stmt
,
trx
->
sp_level
,
trx
->
sub_sp_level
,
trx
->
tokudb_lock_count
);
TOKUDB_HANDLER_TRACE
(
"
%p %p %p %p %u"
,
trx
->
all
,
trx
->
stmt
,
trx
->
sp_level
,
trx
->
sub_sp_level
,
trx
->
tokudb_lock_count
);
}
}
}
}
else
{
else
{
...
...
storage/tokudb/hatoku_hton.cc
View file @
fb30dc26
...
@@ -633,9 +633,6 @@ static int tokudb_close_connection(handlerton * hton, THD * thd) {
...
@@ -633,9 +633,6 @@ static int tokudb_close_connection(handlerton * hton, THD * thd) {
int
error
=
0
;
int
error
=
0
;
tokudb_trx_data
*
trx
=
NULL
;
tokudb_trx_data
*
trx
=
NULL
;
trx
=
(
tokudb_trx_data
*
)
thd_data_get
(
thd
,
tokudb_hton
->
slot
);
trx
=
(
tokudb_trx_data
*
)
thd_data_get
(
thd
,
tokudb_hton
->
slot
);
if
(
tokudb_debug
&
TOKUDB_DEBUG_TXN
)
{
TOKUDB_TRACE
(
"trx %p"
,
trx
);
}
if
(
trx
&&
trx
->
checkpoint_lock_taken
)
{
if
(
trx
&&
trx
->
checkpoint_lock_taken
)
{
error
=
db_env
->
checkpointing_resume
(
db_env
);
error
=
db_env
->
checkpointing_resume
(
db_env
);
}
}
...
@@ -645,7 +642,6 @@ static int tokudb_close_connection(handlerton * hton, THD * thd) {
...
@@ -645,7 +642,6 @@ static int tokudb_close_connection(handlerton * hton, THD * thd) {
struct
tokudb_map_pair
key
=
{
thd
,
NULL
};
struct
tokudb_map_pair
key
=
{
thd
,
NULL
};
struct
tokudb_map_pair
*
found_key
=
(
struct
tokudb_map_pair
*
)
tree_search
(
&
tokudb_map
,
&
key
,
NULL
);
struct
tokudb_map_pair
*
found_key
=
(
struct
tokudb_map_pair
*
)
tree_search
(
&
tokudb_map
,
&
key
,
NULL
);
if
(
found_key
)
{
if
(
found_key
)
{
if
(
0
)
TOKUDB_TRACE
(
"thd %p %p"
,
thd
,
found_key
->
last_lock_timeout
);
tokudb_my_free
(
found_key
->
last_lock_timeout
);
tokudb_my_free
(
found_key
->
last_lock_timeout
);
tree_delete
(
&
tokudb_map
,
found_key
,
sizeof
*
found_key
,
NULL
);
tree_delete
(
&
tokudb_map
,
found_key
,
sizeof
*
found_key
,
NULL
);
}
}
...
@@ -739,7 +735,7 @@ static int tokudb_commit(handlerton * hton, THD * thd, bool all) {
...
@@ -739,7 +735,7 @@ static int tokudb_commit(handlerton * hton, THD * thd, bool all) {
DB_TXN
*
this_txn
=
*
txn
;
DB_TXN
*
this_txn
=
*
txn
;
if
(
this_txn
)
{
if
(
this_txn
)
{
if
(
tokudb_debug
&
TOKUDB_DEBUG_TXN
)
{
if
(
tokudb_debug
&
TOKUDB_DEBUG_TXN
)
{
TOKUDB_TRACE
(
"commit trx %u t
rx %p txn %p"
,
all
,
trx
,
this_txn
);
TOKUDB_TRACE
(
"commit trx %u t
xn %p"
,
all
,
this_txn
);
}
}
// test hook to induce a crash on a debug build
// test hook to induce a crash on a debug build
DBUG_EXECUTE_IF
(
"tokudb_crash_commit_before"
,
DBUG_SUICIDE
(););
DBUG_EXECUTE_IF
(
"tokudb_crash_commit_before"
,
DBUG_SUICIDE
(););
...
@@ -768,7 +764,7 @@ static int tokudb_rollback(handlerton * hton, THD * thd, bool all) {
...
@@ -768,7 +764,7 @@ static int tokudb_rollback(handlerton * hton, THD * thd, bool all) {
DB_TXN
*
this_txn
=
*
txn
;
DB_TXN
*
this_txn
=
*
txn
;
if
(
this_txn
)
{
if
(
this_txn
)
{
if
(
tokudb_debug
&
TOKUDB_DEBUG_TXN
)
{
if
(
tokudb_debug
&
TOKUDB_DEBUG_TXN
)
{
TOKUDB_TRACE
(
"rollback %u t
rx %p txn %p"
,
all
,
trx
,
this_txn
);
TOKUDB_TRACE
(
"rollback %u t
xn %p"
,
all
,
this_txn
);
}
}
tokudb_cleanup_handlers
(
trx
,
this_txn
);
tokudb_cleanup_handlers
(
trx
,
this_txn
);
abort_txn_with_progress
(
this_txn
,
thd
);
abort_txn_with_progress
(
this_txn
,
thd
);
...
@@ -1959,7 +1955,6 @@ static void tokudb_lock_timeout_callback(DB *db, uint64_t requesting_txnid, cons
...
@@ -1959,7 +1955,6 @@ static void tokudb_lock_timeout_callback(DB *db, uint64_t requesting_txnid, cons
THDVAR
(
thd
,
last_lock_timeout
)
=
new_lock_timeout
;
THDVAR
(
thd
,
last_lock_timeout
)
=
new_lock_timeout
;
tokudb_my_free
(
old_lock_timeout
);
tokudb_my_free
(
old_lock_timeout
);
#if TOKU_THDVAR_MEMALLOC_BUG
#if TOKU_THDVAR_MEMALLOC_BUG
if
(
0
)
TOKUDB_TRACE
(
"thd %p %p %p"
,
thd
,
old_lock_timeout
,
new_lock_timeout
);
tokudb_pthread_mutex_lock
(
&
tokudb_map_mutex
);
tokudb_pthread_mutex_lock
(
&
tokudb_map_mutex
);
struct
tokudb_map_pair
old_key
=
{
thd
,
old_lock_timeout
};
struct
tokudb_map_pair
old_key
=
{
thd
,
old_lock_timeout
};
tree_delete
(
&
tokudb_map
,
&
old_key
,
sizeof
old_key
,
NULL
);
tree_delete
(
&
tokudb_map
,
&
old_key
,
sizeof
old_key
,
NULL
);
...
...
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