List:Commits« Previous MessageNext Message »
From:marko.makela Date:January 30 2011 9:11pm
Subject:bzr commit into mysql-trunk-innodb branch (marko.makela:3471)
View as plain text  
#At file:///home/marko/innobase/dev/mysql2a/5.6-innodb/ based on revid:marko.makela@stripped58zzr5v1i1xm

 3471 Marko Mäkelä	2011-01-30
      Clarify the comment of trx_state_eq().

    modified:
      storage/innobase/include/trx0trx.h
      storage/innobase/include/trx0trx.ic
=== modified file 'storage/innobase/include/trx0trx.h'
--- a/storage/innobase/include/trx0trx.h	revid:marko.makela@strippedi1xm
+++ b/storage/innobase/include/trx0trx.h	revid:marko.makela@stripped
@@ -319,13 +319,17 @@ trx_set_dict_operation(
 Determines if a transaction is in the given state.
 The caller must hold trx_sys->lock, or it must be the thread
 that is serving a running transaction.
+A running transaction must be in trx_sys->trx_list.
 @return	TRUE if trx->state == state */
 UNIV_INLINE
 ibool
 trx_state_eq(
 /*=========*/
 	const trx_t*	trx,	/*!< in: transaction */
-	trx_state_t	state)	/*!< in: state */
+	trx_state_t	state)	/*!< in: state;
+				if state != TRX_STATE_NOT_STARTED
+				asserts that
+				trx->state != TRX_STATE_NOT_STARTED */
 	__attribute__((nonnull, warn_unused_result));
 # ifdef UNIV_DEBUG
 /**********************************************************************//**

=== modified file 'storage/innobase/include/trx0trx.ic'
--- a/storage/innobase/include/trx0trx.ic	revid:marko.makela@strippedr5v1i1xm
+++ b/storage/innobase/include/trx0trx.ic	revid:marko.makela@stripped
@@ -27,13 +27,17 @@ Created 3/26/1996 Heikki Tuuri
 Determines if a transaction is in the given state.
 The caller must hold trx_sys->lock, or it must be the thread
 that is serving a running transaction.
+A running transaction must be in trx_sys->trx_list.
 @return	TRUE if trx->state == state */
 UNIV_INLINE
 ibool
 trx_state_eq(
 /*=========*/
 	const trx_t*	trx,	/*!< in: transaction */
-	trx_state_t	state)	/*!< in: state */
+	trx_state_t	state)	/*!< in: state;
+				if state != TRX_STATE_NOT_STARTED
+				asserts that
+				trx->state != TRX_STATE_NOT_STARTED */
 {
 #ifdef UNIV_DEBUG
 	switch (trx->state) {

Attachment: [text/bzr-bundle] bzr/marko.makela@oracle.com-20110130211114-zh2186mt6n8q88h8.bundle
Thread
bzr commit into mysql-trunk-innodb branch (marko.makela:3471) marko.makela30 Jan