summaryrefslogtreecommitdiff
path: root/innobase/trx
diff options
context:
space:
mode:
authorunknown <heikki@hundin.mysql.fi>2004-03-18 14:57:22 +0200
committerunknown <heikki@hundin.mysql.fi>2004-03-18 14:57:22 +0200
commit3caab0f3275fb1d9ba3ad5f595cf171414b13560 (patch)
tree29eb2e12c2d0822a43c99256511631869e7c9e10 /innobase/trx
parent27d2014109bc711a7ba2948696b86a3ebd13af30 (diff)
downloadmariadb-git-3caab0f3275fb1d9ba3ad5f595cf171414b13560.tar.gz
trx0undo.h, trx0undo.c, trx0trx.c:
Update an obsolete comment about trx commit: we can no longer call trx_undo_update_cleanup_by_discard(), and actually, the idea to call it was erroneous, it cannot work innobase/trx/trx0trx.c: Update an obsolete comment about trx commit: we can no longer call trx_undo_update_cleanup_by_discard(), and actually, the idea to call it was erroneous, it cannot work innobase/trx/trx0undo.c: Update an obsolete comment about trx commit: we can no longer call trx_undo_update_cleanup_by_discard(), and actually, the idea to call it was erroneous, it cannot work innobase/include/trx0undo.h: Update an obsolete comment about trx commit: we can no longer call trx_undo_update_cleanup_by_discard(), and actually, the idea to call it was erroneous, it cannot work
Diffstat (limited to 'innobase/trx')
-rw-r--r--innobase/trx/trx0trx.c12
-rw-r--r--innobase/trx/trx0undo.c50
2 files changed, 7 insertions, 55 deletions
diff --git a/innobase/trx/trx0trx.c b/innobase/trx/trx0trx.c
index b509d80e452..54358ad3d4c 100644
--- a/innobase/trx/trx0trx.c
+++ b/innobase/trx/trx0trx.c
@@ -701,11 +701,13 @@ trx_commit_off_kernel(
TRX_SYS_MYSQL_MASTER_LOG_INFO, &mtr);
}
- /* If we did not take the shortcut, the following call
- commits the mini-transaction, making the whole transaction
- committed in the file-based world at this log sequence number;
- otherwise, we get the commit lsn from the call of
- trx_undo_update_cleanup_by_discard above.
+ /* The following call commits the mini-transaction, making the
+ whole transaction committed in the file-based world, at this
+ log sequence number. The transaction becomes 'durable' when
+ we write the log to disk, but in the logical sense the commit
+ in the file-based data structures (undo logs etc.) happens
+ here.
+
NOTE that transaction numbers, which are assigned only to
transactions with an update undo log, do not necessarily come
in exactly the same order as commit lsn's, if the transactions
diff --git a/innobase/trx/trx0undo.c b/innobase/trx/trx0undo.c
index f2b7227d84a..0a47134c163 100644
--- a/innobase/trx/trx0undo.c
+++ b/innobase/trx/trx0undo.c
@@ -1673,56 +1673,6 @@ trx_undo_update_cleanup(
}
}
-/**************************************************************************
-Discards an undo log and puts the segment to the list of cached update undo
-log segments. This optimized function is called if there is no need to keep
-the update undo log because there exist no read views and the transaction
-made no delete markings, which would make purge necessary. We restrict this
-to undo logs of size 1 to make things simpler. */
-
-dulint
-trx_undo_update_cleanup_by_discard(
-/*===============================*/
- /* out: log sequence number at which mtr is
- committed */
- trx_t* trx, /* in: trx owning the update undo log */
- mtr_t* mtr) /* in: mtr */
-{
- trx_rseg_t* rseg;
- trx_undo_t* undo;
- page_t* undo_page;
-
- undo = trx->update_undo;
- rseg = trx->rseg;
-
-#ifdef UNIV_SYNC_DEBUG
- ut_ad(mutex_own(&(rseg->mutex)));
- ut_ad(mutex_own(&kernel_mutex));
-#endif /* UNIV_SYNC_DEBUG */
- ut_ad(undo->size == 1);
- ut_ad(undo->del_marks == FALSE);
- ut_ad(UT_LIST_GET_LEN(trx_sys->view_list) == 1);
-
- /* NOTE: we must hold the kernel mutex, because we must prevent
- creation of new read views before mtr gets committed! */
-
- undo_page = trx_undo_page_get(undo->space, undo->hdr_page_no, mtr);
-
- trx_undo_discard_latest_update_undo(undo_page, mtr);
-
- undo->state = TRX_UNDO_CACHED;
-
- UT_LIST_REMOVE(undo_list, rseg->update_undo_list, undo);
-
- trx->update_undo = NULL;
-
- UT_LIST_ADD_FIRST(undo_list, rseg->update_undo_cached, undo);
-
- mtr_commit(mtr);
-
- return(mtr->end_lsn);
-}
-
/**********************************************************************
Frees or caches an insert undo log after a transaction commit or rollback.
Knowledge of inserts is not needed after a commit or rollback, therefore