Commit 83d0e72b authored by Marko Mäkelä's avatar Marko Mäkelä

Cleanup: Remove thr_is_recv(), trx_is_recv()

Compare to trx_roll_crash_recv_trx directly where needed.
parent c50b7bee
......@@ -3998,7 +3998,7 @@ btr_cur_optimistic_update(
ULINT_UNDEFINED, heap);
#if defined UNIV_DEBUG || defined UNIV_BLOB_LIGHT_DEBUG
ut_a(!rec_offs_any_null_extern(rec, *offsets)
|| trx_is_recv(thr_get_trx(thr)));
|| thr_get_trx(thr) == trx_roll_crash_recv_trx);
#endif /* UNIV_DEBUG || UNIV_BLOB_LIGHT_DEBUG */
if (!row_upd_changes_field_size_or_external(index, *offsets, update)) {
......
/*****************************************************************************
Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2017, 2019, MariaDB Corporation.
Copyright (c) 2017, 2020, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
......@@ -169,16 +169,6 @@ 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
......
/*****************************************************************************
Copyright (c) 1996, 2013, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2020, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
......@@ -36,20 +37,6 @@ 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
......
/*****************************************************************************
Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2015, 2019, MariaDB Corporation.
Copyright (c) 2015, 2020, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
......@@ -34,15 +34,6 @@ Created 3/26/1996 Heikki Tuuri
extern bool trx_rollback_or_clean_is_active;
extern const trx_t* trx_roll_crash_recv_trx;
/*******************************************************************//**
Determines if this transaction is rolling back an incomplete transaction
in crash recovery.
@return TRUE if trx is an incomplete transaction that is being rolled
back in crash recovery */
ibool
trx_is_recv(
/*========*/
const trx_t* trx); /*!< in: transaction */
/*******************************************************************//**
Returns a transaction savepoint taken at this point in time.
@return savepoint */
......
......@@ -884,7 +884,7 @@ row_undo_mod_upd_del_sec(
does not exist. However, this situation may
only occur during the rollback of incomplete
transactions. */
ut_a(thr_is_recv(thr));
ut_a(thr_get_trx(thr) == trx_roll_crash_recv_trx);
} else {
err = row_undo_mod_del_mark_or_remove_sec(
node, thr, index, entry);
......
......@@ -1882,7 +1882,8 @@ row_upd_changes_ord_field_binary_func(
when the server had crashed before
storing the field. */
ut_ad(thr->graph->trx->is_recovered);
ut_ad(trx_is_recv(thr->graph->trx));
ut_ad(thr->graph->trx
== trx_roll_crash_recv_trx);
return(TRUE);
}
......
......@@ -551,19 +551,6 @@ trx_release_savepoint_for_mysql(
return(savep != NULL ? DB_SUCCESS : DB_NO_SAVEPOINT);
}
/*******************************************************************//**
Determines if this transaction is rolling back an incomplete transaction
in crash recovery.
@return TRUE if trx is an incomplete transaction that is being rolled
back in crash recovery */
ibool
trx_is_recv(
/*========*/
const trx_t* trx) /*!< in: transaction */
{
return(trx == trx_roll_crash_recv_trx);
}
/*******************************************************************//**
Returns a transaction savepoint taken at this point in time.
@return savepoint */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment