From e8963afaa34177c26a7095ae67b30680272b7f06 Mon Sep 17 00:00:00 2001 From: marko <> Date: Thu, 11 Feb 2010 11:01:18 +0000 Subject: [PATCH] branches/zip: Introduce thr_is_recv(). --- include/que0que.h | 11 +++++++++++ include/que0que.ic | 14 ++++++++++++++ row/row0umod.c | 2 +- 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/include/que0que.h b/include/que0que.h index 420f34550e..c35b75d7d5 100644 --- a/include/que0que.h +++ b/include/que0que.h @@ -30,6 +30,7 @@ Created 5/27/1996 Heikki Tuuri #include "data0data.h" #include "dict0types.h" #include "trx0trx.h" +#include "trx0roll.h" #include "srv0srv.h" #include "usr0types.h" #include "que0types.h" @@ -215,6 +216,16 @@ trx_t* thr_get_trx( /*========*/ que_thr_t* thr); /*!< in: query thread */ +/*******************************************************************//** +Determines if this thread is rolling back an incomplete transaction +in crash recovery. +@return TRUE if thr is rolling back an incomplete transaction in crash +recovery */ +UNIV_INLINE +ibool +thr_is_recv( +/*========*/ + const que_thr_t* thr); /*!< in: query thread */ /***********************************************************************//** Gets the type of a graph node. */ UNIV_INLINE diff --git a/include/que0que.ic b/include/que0que.ic index a1c0dc1e77..f027c74823 100644 --- a/include/que0que.ic +++ b/include/que0que.ic @@ -38,6 +38,20 @@ thr_get_trx( return(thr->graph->trx); } +/*******************************************************************//** +Determines if this thread is rolling back an incomplete transaction +in crash recovery. +@return TRUE if thr is rolling back an incomplete transaction in crash +recovery */ +UNIV_INLINE +ibool +thr_is_recv( +/*========*/ + const que_thr_t* thr) /*!< in: query thread */ +{ + return(trx_is_recv(thr->graph->trx)); +} + /***********************************************************************//** Gets the first thr in a fork. */ UNIV_INLINE diff --git a/row/row0umod.c b/row/row0umod.c index ec96c8fc84..674f0fbe09 100644 --- a/row/row0umod.c +++ b/row/row0umod.c @@ -559,7 +559,7 @@ row_undo_mod_upd_del_sec( does not exist. However, this situation may only occur during the rollback of incomplete transactions. */ - ut_a(trx_is_recv(thr_get_trx(thr))); + ut_a(thr_is_recv(thr)); } else { err = row_undo_mod_del_mark_or_remove_sec( node, thr, index, entry); -- 2.30.9