1
/******************************************************
6
Created 6/25/1996 Heikki Tuuri
7
*******************************************************/
12
#include "usr0sess.ic"
17
/*************************************************************************
18
Closes a session, freeing the memory occupied by it. */
23
sess_t* sess); /* in, own: session object */
25
/*************************************************************************
31
/* out, own: session object */
35
ut_ad(mutex_own(&kernel_mutex));
37
sess = mem_alloc(sizeof(sess_t));
39
sess->state = SESS_ACTIVE;
41
sess->trx = trx_create(sess);
43
UT_LIST_INIT(sess->graphs);
48
/*************************************************************************
49
Closes a session, freeing the memory occupied by it. */
54
sess_t* sess) /* in, own: session object */
56
ut_ad(mutex_own(&kernel_mutex));
57
ut_ad(sess->trx == NULL);
62
/*************************************************************************
63
Closes a session, freeing the memory occupied by it, if it is in a state
64
where it should be closed. */
69
/* out: TRUE if closed */
70
sess_t* sess) /* in, own: session object */
72
ut_ad(mutex_own(&kernel_mutex));
74
if (UT_LIST_GET_LEN(sess->graphs) == 0) {