diff options
author | Jan Lindström <jan.lindstrom@mariadb.com> | 2015-06-24 07:16:08 +0300 |
---|---|---|
committer | Jan Lindström <jan.lindstrom@mariadb.com> | 2015-06-24 07:16:08 +0300 |
commit | 2e4984c185ddcd2da789017cd147338846ff409a (patch) | |
tree | 0293831900c860600efbaa747ea886d9d1cbf5bd /storage/tokudb/ft-index/src/ydb_txn.cc | |
parent | 792b53e80806df893ee62c9a1c1bd117114c8c6d (diff) | |
parent | a6087e7dc1ef3561d8189c8db15e9591d0f9b520 (diff) | |
download | mariadb-git-2e4984c185ddcd2da789017cd147338846ff409a.tar.gz |
Merge tag 'mariadb-10.0.20' into 10.0-FusionIO10.0-FusionIO
Conflicts:
storage/innobase/os/os0file.cc
storage/xtradb/os/os0file.cc
storage/xtradb/srv/srv0start.cc
Diffstat (limited to 'storage/tokudb/ft-index/src/ydb_txn.cc')
-rw-r--r-- | storage/tokudb/ft-index/src/ydb_txn.cc | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/storage/tokudb/ft-index/src/ydb_txn.cc b/storage/tokudb/ft-index/src/ydb_txn.cc index ce06e78b23f..885c6b713b2 100644 --- a/storage/tokudb/ft-index/src/ydb_txn.cc +++ b/storage/tokudb/ft-index/src/ydb_txn.cc @@ -240,7 +240,7 @@ static int toku_txn_abort(DB_TXN * txn, return r; } -static int toku_txn_xa_prepare (DB_TXN *txn, TOKU_XA_XID *xid) { +static int toku_txn_xa_prepare (DB_TXN *txn, TOKU_XA_XID *xid, uint32_t flags) { int r = 0; if (!txn) { r = EINVAL; @@ -273,9 +273,11 @@ static int toku_txn_xa_prepare (DB_TXN *txn, TOKU_XA_XID *xid) { HANDLE_PANICKED_ENV(txn->mgrp); } assert(!db_txn_struct_i(txn)->child); + int nosync; + nosync = (flags & DB_TXN_NOSYNC)!=0 || (db_txn_struct_i(txn)->flags&DB_TXN_NOSYNC); TOKUTXN ttxn; ttxn = db_txn_struct_i(txn)->tokutxn; - toku_txn_prepare_txn(ttxn, xid); + toku_txn_prepare_txn(ttxn, xid, nosync); TOKULOGGER logger; logger = txn->mgrp->i->logger; LSN do_fsync_lsn; @@ -292,14 +294,14 @@ exit: // requires: must hold the multi operation lock. it is // released in toku_txn_xa_prepare before the fsync. -static int toku_txn_prepare (DB_TXN *txn, uint8_t gid[DB_GID_SIZE]) { +static int toku_txn_prepare (DB_TXN *txn, uint8_t gid[DB_GID_SIZE], uint32_t flags) { TOKU_XA_XID xid; TOKU_ANNOTATE_NEW_MEMORY(&xid, sizeof(xid)); xid.formatID=0x756b6f54; // "Toku" xid.gtrid_length=DB_GID_SIZE/2; // The maximum allowed gtrid length is 64. See the XA spec in source:/import/opengroup.org/C193.pdf page 20. xid.bqual_length=DB_GID_SIZE/2; // The maximum allowed bqual length is 64. memcpy(xid.data, gid, DB_GID_SIZE); - return toku_txn_xa_prepare(txn, &xid); + return toku_txn_xa_prepare(txn, &xid, flags); } static int toku_txn_txn_stat (DB_TXN *txn, struct txn_stat **txn_stat) { @@ -427,6 +429,15 @@ static bool toku_txn_is_prepared(DB_TXN *txn) { return toku_txn_get_state(ttxn) == TOKUTXN_PREPARING; } +static DB_TXN *toku_txn_get_child(DB_TXN *txn) { + return db_txn_struct_i(txn)->child; +} + +static uint64_t toku_txn_get_start_time(DB_TXN *txn) { + TOKUTXN ttxn = db_txn_struct_i(txn)->tokutxn; + return toku_txn_get_start_time(ttxn); +} + static inline void txn_func_init(DB_TXN *txn) { #define STXN(name) txn->name = locked_txn_ ## name STXN(abort); @@ -444,6 +455,8 @@ static inline void txn_func_init(DB_TXN *txn) { #undef SUTXN txn->id64 = toku_txn_id64; txn->is_prepared = toku_txn_is_prepared; + txn->get_child = toku_txn_get_child; + txn->get_start_time = toku_txn_get_start_time; } // |