summaryrefslogtreecommitdiff
path: root/storage/innobase/include
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-04-29 11:50:03 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2020-04-29 11:50:03 +0300
commitcfbbf5424bc68a31a996ab42a253f2c96365599c (patch)
treebef47954d25bd7ed563a4382ae9196e68b0cd8bb /storage/innobase/include
parent0632b8034b08c88176dc7db12ba53df04edd9300 (diff)
downloadmariadb-git-cfbbf5424bc68a31a996ab42a253f2c96365599c.tar.gz
MDEV-7962: Follow-up fix for 10.4
Replace wsrep_on() with trx_t::is_wsrep() where possible. Also, rename some functions to member functions and remove unused DBUG_EXECUTE_IF instrumentation: trx_t::commit(): Renamed from trx_commit(). trx_t::commit_low(): Renamed from trx_commit_low(). trx_t::commit_in_memory(): Renamed from trx_commit_in_memory().
Diffstat (limited to 'storage/innobase/include')
-rw-r--r--storage/innobase/include/trx0trx.h36
1 files changed, 17 insertions, 19 deletions
diff --git a/storage/innobase/include/trx0trx.h b/storage/innobase/include/trx0trx.h
index 6911f2ec084..3856915f8a6 100644
--- a/storage/innobase/include/trx0trx.h
+++ b/storage/innobase/include/trx0trx.h
@@ -181,17 +181,6 @@ trx_start_for_ddl_low(
trx_start_for_ddl_low((t), (o))
#endif /* UNIV_DEBUG */
-/****************************************************************//**
-Commits a transaction. */
-void
-trx_commit(
-/*=======*/
- trx_t* trx); /*!< in/out: transaction */
-
-/** Commit a transaction and a mini-transaction.
-@param[in,out] trx transaction
-@param[in,out] mtr mini-transaction (NULL if no modifications) */
-void trx_commit_low(trx_t* trx, mtr_t* mtr);
/**********************************************************************//**
Does the transaction commit for MySQL.
@return DB_SUCCESS or error number */
@@ -898,10 +887,10 @@ public:
defer flush of the logs to disk
until after we release the
mutex. */
- bool must_flush_log_later;/*!< this flag is set to TRUE in
- trx_commit() if flush_log_later was
- TRUE, and there were modifications by
- the transaction; in that case we must
+ bool must_flush_log_later;/*!< set in commit()
+ if flush_log_later was
+ set and redo log was written;
+ in that case we will
flush the log in
trx_commit_complete_for_mysql() */
ulint duplicates; /*!< TRX_DUP_IGNORE | TRX_DUP_REPLACE */
@@ -1132,11 +1121,20 @@ public:
@param[in] table_id table identifier */
void evict_table(table_id_t table_id);
+private:
+ /** Mark a transaction committed in the main memory data structures. */
+ inline void commit_in_memory(const mtr_t *mtr);
+public:
+ /** Commit the transaction. */
+ void commit();
- bool is_referenced()
- {
- return n_ref > 0;
- }
+ /** Commit the transaction in a mini-transaction.
+ @param mtr mini-transaction (if there are any persistent modifications) */
+ void commit_low(mtr_t *mtr= nullptr);
+
+
+
+ bool is_referenced() const { return n_ref > 0; }
void reference()