summaryrefslogtreecommitdiff
path: root/storage/innobase/include/trx0trx.ic
blob: 78e5acda1482fa7dc58ac88a8c53a04c5e262e51 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/******************************************************
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);
	}
}