mariadb/innobase/include/trx0trx.ic
heikki@hundin.mysql.fi 55807d9553 trx0trx.ic, trx0trx.h, srv0srv.h, row0sel.h, dict0mem.h:
Modifications for query cache + trxs, fix of q.c.+ foreign keys
2002-09-20 05:18:55 +03:00

42 lines
968 B
Text

/******************************************************
The transaction
(c) 1996 Innobase Oy
Created 3/26/1996 Heikki Tuuri
*******************************************************/
/*****************************************************************
Starts the transaction if it is not yet started. */
UNIV_INLINE
void
trx_start_if_not_started(
/*=====================*/
trx_t* trx) /* in: transaction */
{
ut_ad(trx->conc_state != TRX_COMMITTED_IN_MEMORY);
if (trx->conc_state == TRX_NOT_STARTED) {
trx_start(trx, ULINT_UNDEFINED);
}
}
/*****************************************************************
Starts the transaction if it is not yet started. Assumes we have reserved
the kernel mutex! */
UNIV_INLINE
void
trx_start_if_not_started_low(
/*=========================*/
trx_t* trx) /* in: transaction */
{
ut_ad(trx->conc_state != TRX_COMMITTED_IN_MEMORY);
if (trx->conc_state == TRX_NOT_STARTED) {
trx_start_low(trx, ULINT_UNDEFINED);
}
}