mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge Innodb Plugin 1.0.6 from mysql-5.1-bugteam storage/innodb_plugin to mysql-trunk-merge.
Merging revisions 3221 to 3230 from mysql-5.1-bugteam
This commit is contained in:
@ -31,14 +31,6 @@ Created 6/25/1996 Heikki Tuuri
|
||||
|
||||
#include "trx0trx.h"
|
||||
|
||||
/*********************************************************************//**
|
||||
Closes a session, freeing the memory occupied by it. */
|
||||
static
|
||||
void
|
||||
sess_close(
|
||||
/*=======*/
|
||||
sess_t* sess); /*!< in, own: session object */
|
||||
|
||||
/*********************************************************************//**
|
||||
Opens a session.
|
||||
@return own: session object */
|
||||
@ -64,35 +56,16 @@ sess_open(void)
|
||||
|
||||
/*********************************************************************//**
|
||||
Closes a session, freeing the memory occupied by it. */
|
||||
static
|
||||
UNIV_INTERN
|
||||
void
|
||||
sess_close(
|
||||
/*=======*/
|
||||
sess_t* sess) /*!< in, own: session object */
|
||||
{
|
||||
ut_ad(mutex_own(&kernel_mutex));
|
||||
ut_ad(sess->trx == NULL);
|
||||
ut_ad(!mutex_own(&kernel_mutex));
|
||||
|
||||
ut_a(UT_LIST_GET_LEN(sess->graphs) == 0);
|
||||
|
||||
trx_free_for_background(sess->trx);
|
||||
mem_free(sess);
|
||||
}
|
||||
|
||||
/*********************************************************************//**
|
||||
Closes a session, freeing the memory occupied by it, if it is in a state
|
||||
where it should be closed.
|
||||
@return TRUE if closed */
|
||||
UNIV_INTERN
|
||||
ibool
|
||||
sess_try_close(
|
||||
/*===========*/
|
||||
sess_t* sess) /*!< in, own: session object */
|
||||
{
|
||||
ut_ad(mutex_own(&kernel_mutex));
|
||||
|
||||
if (UT_LIST_GET_LEN(sess->graphs) == 0) {
|
||||
sess_close(sess);
|
||||
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
return(FALSE);
|
||||
}
|
||||
|
Reference in New Issue
Block a user