1
0
mirror of https://github.com/MariaDB/server.git synced 2025-09-02 09:41:40 +03:00

Merge XtraDB 9 into MariaDB.

This commit is contained in:
unknown
2010-01-15 16:58:25 +01:00
155 changed files with 5372 additions and 3094 deletions

View File

@@ -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);
}