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
e7a47670
Commit
e7a47670
authored
Nov 21, 2014
by
Rich Prohaska
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into releases/tokudb-7.5
parents
ce963698
1d7f9ec2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
2 deletions
+17
-2
storage/tokudb/hatoku_hton.cc
storage/tokudb/hatoku_hton.cc
+17
-2
No files found.
storage/tokudb/hatoku_hton.cc
View file @
e7a47670
...
@@ -772,16 +772,31 @@ static void tokudb_cleanup_handlers(tokudb_trx_data *trx, DB_TXN *txn) {
...
@@ -772,16 +772,31 @@ static void tokudb_cleanup_handlers(tokudb_trx_data *trx, DB_TXN *txn) {
}
}
}
}
#if MYSQL_VERSION_ID >= 50600
extern
"C"
enum
durability_properties
thd_get_durability_property
(
const
MYSQL_THD
thd
);
#endif
// Determine if an fsync is used when a transaction is committed. The MySQL durability property
// has precedence over the tokudb commit sync setting as it has a better idea of what is going on.
static
bool
tokudb_fsync_on_commit
(
THD
*
thd
)
{
#if MYSQL_VERSION_ID >= 50600
if
(
thd_get_durability_property
(
thd
)
==
HA_IGNORE_DURABILITY
)
return
false
;
else
#endif
return
THDVAR
(
thd
,
commit_sync
)
!=
0
;
}
static
int
tokudb_commit
(
handlerton
*
hton
,
THD
*
thd
,
bool
all
)
{
static
int
tokudb_commit
(
handlerton
*
hton
,
THD
*
thd
,
bool
all
)
{
TOKUDB_DBUG_ENTER
(
""
);
TOKUDB_DBUG_ENTER
(
""
);
DBUG_PRINT
(
"trans"
,
(
"ending transaction %s"
,
all
?
"all"
:
"stmt"
));
DBUG_PRINT
(
"trans"
,
(
"ending transaction %s"
,
all
?
"all"
:
"stmt"
));
uint32_t
syncflag
=
THDVAR
(
thd
,
commit_sync
)
?
0
:
DB_TXN_NOSYNC
;
uint32_t
syncflag
=
tokudb_fsync_on_commit
(
thd
)
?
0
:
DB_TXN_NOSYNC
;
tokudb_trx_data
*
trx
=
(
tokudb_trx_data
*
)
thd_get_ha_data
(
thd
,
hton
);
tokudb_trx_data
*
trx
=
(
tokudb_trx_data
*
)
thd_get_ha_data
(
thd
,
hton
);
DB_TXN
**
txn
=
all
?
&
trx
->
all
:
&
trx
->
stmt
;
DB_TXN
**
txn
=
all
?
&
trx
->
all
:
&
trx
->
stmt
;
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 txn %p
"
,
all
,
this_txn
);
TOKUDB_TRACE
(
"commit trx %u txn %p
syncflag %u"
,
all
,
this_txn
,
syncflag
);
}
}
// 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
(););
...
...
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