summaryrefslogtreecommitdiff
path: root/innobase
diff options
context:
space:
mode:
authorheikki@hundin.mysql.fi <>2004-03-18 14:57:22 +0200
committerheikki@hundin.mysql.fi <>2004-03-18 14:57:22 +0200
commitfd155368084c560460a036c97e9e4daa446ed99a (patch)
tree29eb2e12c2d0822a43c99256511631869e7c9e10 /innobase
parent2de6b5200087134d5ae48ce0ea9ded53455777f6 (diff)
downloadmariadb-git-fd155368084c560460a036c97e9e4daa446ed99a.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
Diffstat (limited to 'innobase')
-rw-r--r--innobase/include/trx0undo.h14
-rw-r--r--innobase/trx/trx0trx.c12
-rw-r--r--innobase/trx/trx0undo.c50
3 files changed, 7 insertions, 69 deletions
diff --git a/innobase/include/trx0undo.h b/innobase/include/trx0undo.h
index 7f0378c68d3..20002076cc3 100644
--- a/innobase/include/trx0undo.h
+++ b/innobase/include/trx0undo.h
@@ -251,20 +251,6 @@ trx_undo_update_cleanup(
page_t* undo_page, /* in: update undo log header page,
x-latched */
mtr_t* mtr); /* in: mtr */
-/**************************************************************************
-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 */
/**********************************************************************
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
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