mirror of
https://github.com/MariaDB/server.git
synced 2025-01-19 13:32:33 +01:00
8a273786ea
Remember the acquired record locks per table handle (row_prebuilt_t) rather than per transaction (trx_t), so that unlock_row should successfully unlock all non-matching rows in multi-table operations. This deficiency was found while investigating Bug #39320. rb://94 approved by Heikki Tuuri.
40 lines
964 B
Text
40 lines
964 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);
|
|
}
|
|
}
|