mirror of
https://github.com/MariaDB/server.git
synced 2025-01-27 17:33:44 +01:00
Revert "MDEV-6928: Add trx pointer to struct mtr_t"
This reverts commit 3486135bb5
.
The commit comment ended in the words: "This is needed later."
Apparently the "later" never arrived.
This commit is contained in:
parent
7cdf759c86
commit
d9c77f0341
4 changed files with 14 additions and 28 deletions
storage/innobase
|
@ -37,8 +37,6 @@ Created 11/26/1995 Heikki Tuuri
|
|||
|
||||
/** Start a mini-transaction. */
|
||||
#define mtr_start(m) (m)->start()
|
||||
/** Start a mini-transaction. */
|
||||
#define mtr_start_trx(m, t) (m)->start((t))
|
||||
|
||||
/** Start a synchronous mini-transaction */
|
||||
#define mtr_start_sync(m) (m)->start(true)
|
||||
|
@ -217,9 +215,6 @@ struct mtr_t {
|
|||
|
||||
/** Owning mini-transaction */
|
||||
mtr_t* m_mtr;
|
||||
|
||||
/* Transaction handle */
|
||||
trx_t* m_trx;
|
||||
};
|
||||
|
||||
mtr_t()
|
||||
|
@ -239,15 +234,7 @@ struct mtr_t {
|
|||
/** Start a mini-transaction.
|
||||
@param sync true if it is a synchronous mini-transaction
|
||||
@param read_only true if read only mini-transaction */
|
||||
void start(bool sync = true, bool read_only = false)
|
||||
{
|
||||
start(NULL, sync, read_only);
|
||||
}
|
||||
|
||||
/** Start a mini-transaction.
|
||||
@param sync true if it is a synchronous mini-transaction
|
||||
@param read_only true if read only mini-transaction */
|
||||
void start(trx_t* trx, bool sync = true, bool read_only = false);
|
||||
void start(bool sync = true, bool read_only = false);
|
||||
|
||||
/** @return whether this is an asynchronous mini-transaction. */
|
||||
bool is_async() const
|
||||
|
|
|
@ -492,7 +492,7 @@ mtr_write_log(
|
|||
@param sync true if it is a synchronous mini-transaction
|
||||
@param read_only true if read only mini-transaction */
|
||||
void
|
||||
mtr_t::start(trx_t* trx, bool sync, bool read_only)
|
||||
mtr_t::start(bool sync, bool read_only)
|
||||
{
|
||||
UNIV_MEM_INVALID(this, sizeof(*this));
|
||||
|
||||
|
@ -517,7 +517,6 @@ mtr_t::start(trx_t* trx, bool sync, bool read_only)
|
|||
m_impl.m_undo_space = NULL;
|
||||
m_impl.m_sys_space = NULL;
|
||||
m_impl.m_flush_observer = NULL;
|
||||
m_impl.m_trx = trx;
|
||||
|
||||
ut_d(m_impl.m_magic_n = MTR_MAGIC_N);
|
||||
}
|
||||
|
|
|
@ -306,7 +306,7 @@ row_undo_mod_clust(
|
|||
/* We may have to modify tree structure: do a pessimistic
|
||||
descent down the index tree */
|
||||
|
||||
mtr_start_trx(&mtr, thr_get_trx(thr));
|
||||
mtr.start();
|
||||
if (index->table->is_temporary()) {
|
||||
mtr.set_log_mode(MTR_LOG_NO_REDO);
|
||||
} else {
|
||||
|
@ -366,7 +366,7 @@ row_undo_mod_clust(
|
|||
|
||||
if (err == DB_SUCCESS && node->rec_type == TRX_UNDO_UPD_DEL_REC) {
|
||||
|
||||
mtr_start_trx(&mtr, thr_get_trx(thr));
|
||||
mtr.start();
|
||||
if (index->table->is_temporary()) {
|
||||
mtr.set_log_mode(MTR_LOG_NO_REDO);
|
||||
} else {
|
||||
|
@ -384,7 +384,7 @@ row_undo_mod_clust(
|
|||
/* We may have to modify tree structure: do a
|
||||
pessimistic descent down the index tree */
|
||||
|
||||
mtr_start_trx(&mtr, thr_get_trx(thr));
|
||||
mtr.start();
|
||||
if (index->table->is_temporary()) {
|
||||
mtr.set_log_mode(MTR_LOG_NO_REDO);
|
||||
} else {
|
||||
|
@ -498,7 +498,7 @@ row_undo_mod_del_mark_or_remove_sec_low(
|
|||
which cannot be purged yet, requires its existence. If some requires,
|
||||
we should delete mark the record. */
|
||||
|
||||
mtr_start_trx(&mtr_vers, thr_get_trx(thr));
|
||||
mtr_vers.start();
|
||||
|
||||
success = btr_pcur_restore_position(BTR_SEARCH_LEAF, &(node->pcur),
|
||||
&mtr_vers);
|
||||
|
|
|
@ -248,7 +248,7 @@ row_upd_check_references_constraints(
|
|||
|
||||
DEBUG_SYNC_C("foreign_constraint_check_for_update");
|
||||
|
||||
mtr_start_trx(mtr, trx);
|
||||
mtr->start();
|
||||
|
||||
if (trx->dict_operation_lock_mode == 0) {
|
||||
got_s_lock = TRUE;
|
||||
|
@ -2298,7 +2298,7 @@ row_upd_sec_index_entry(
|
|||
DEBUG_SYNC_C_IF_THD(trx->mysql_thd,
|
||||
"before_row_upd_sec_index_entry");
|
||||
|
||||
mtr_start_trx(&mtr, trx);
|
||||
mtr.start();
|
||||
|
||||
switch (index->space) {
|
||||
case SRV_TMP_SPACE_ID:
|
||||
|
@ -2858,7 +2858,7 @@ row_upd_clust_rec(
|
|||
/* We may have to modify the tree structure: do a pessimistic descent
|
||||
down the index tree */
|
||||
|
||||
mtr_start_trx(mtr, thr_get_trx(thr));
|
||||
mtr->start();
|
||||
mtr->set_named_space(index->space);
|
||||
|
||||
/* Disable REDO logging as lifetime of temp-tables is limited to
|
||||
|
@ -3045,7 +3045,7 @@ row_upd_clust_step(
|
|||
|
||||
/* We have to restore the cursor to its position */
|
||||
|
||||
mtr_start_trx(&mtr, thr_get_trx(thr));
|
||||
mtr.start();
|
||||
mtr.set_named_space(index->space);
|
||||
|
||||
/* Disable REDO logging as lifetime of temp-tables is limited to
|
||||
|
@ -3103,9 +3103,9 @@ row_upd_clust_step(
|
|||
dict_drop_index_tree(
|
||||
btr_pcur_get_rec(pcur), pcur, &mtr);
|
||||
|
||||
mtr_commit(&mtr);
|
||||
mtr.commit();
|
||||
|
||||
mtr_start_trx(&mtr, thr_get_trx(thr));
|
||||
mtr.start();
|
||||
mtr.set_named_space(index->space);
|
||||
|
||||
success = btr_pcur_restore_position(BTR_MODIFY_LEAF, pcur,
|
||||
|
@ -3113,7 +3113,7 @@ row_upd_clust_step(
|
|||
if (!success) {
|
||||
err = DB_ERROR;
|
||||
|
||||
mtr_commit(&mtr);
|
||||
mtr.commit();
|
||||
|
||||
return(err);
|
||||
}
|
||||
|
@ -3128,7 +3128,7 @@ row_upd_clust_step(
|
|||
0, btr_pcur_get_block(pcur),
|
||||
rec, index, offsets, thr);
|
||||
if (err != DB_SUCCESS) {
|
||||
mtr_commit(&mtr);
|
||||
mtr.commit();
|
||||
goto exit_func;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue