~drizzle-trunk/drizzle/development

641.2.2 by Monty Taylor
InnoDB Plugin 1.0.3
1
/*****************************************************************************
2
1999.6.1 by kalebral at gmail
update Copyright strings to a more common format to help with creating the master debian copyright file
3
Copyright (C) 1996, 2009, Innobase Oy. All Rights Reserved.
641.2.2 by Monty Taylor
InnoDB Plugin 1.0.3
4
5
This program is free software; you can redistribute it and/or modify it under
6
the terms of the GNU General Public License as published by the Free Software
7
Foundation; version 2 of the License.
8
9
This program is distributed in the hope that it will be useful, but WITHOUT
10
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
12
13
You should have received a copy of the GNU General Public License along with
1802.10.2 by Monty Taylor
Update all of the copyright headers to include the correct address.
14
this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
15
St, Fifth Floor, Boston, MA 02110-1301 USA
641.2.2 by Monty Taylor
InnoDB Plugin 1.0.3
16
17
*****************************************************************************/
18
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
19
/**************************************************//**
20
@file include/usr0sess.h
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
21
Sessions
22
23
Created 6/25/1996 Heikki Tuuri
24
*******************************************************/
25
26
#ifndef usr0sess_h
27
#define usr0sess_h
28
29
#include "univ.i"
30
#include "ut0byte.h"
31
#include "trx0types.h"
32
#include "srv0srv.h"
33
#include "trx0types.h"
34
#include "usr0types.h"
35
#include "que0types.h"
36
#include "data0data.h"
37
#include "rem0rec.h"
38
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
39
/*********************************************************************//**
40
Opens a session.
41
@return	own: session object */
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
42
UNIV_INTERN
43
sess_t*
44
sess_open(void);
45
/*============*/
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
46
/*********************************************************************//**
1819.5.106 by stewart at flamingspork
[patch 106/129] Merge patch for revision 1915 from InnoDB SVN:
47
Closes a session, freeing the memory occupied by it. */
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
48
UNIV_INTERN
1819.5.106 by stewart at flamingspork
[patch 106/129] Merge patch for revision 1915 from InnoDB SVN:
49
void
50
sess_close(
51
/*=======*/
52
	sess_t*		sess);		/* in, own: session object */
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
53
54
/* The session handle. All fields are protected by the kernel mutex */
55
struct sess_struct{
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
56
	ulint		state;		/*!< state of the session */
57
	trx_t*		trx;		/*!< transaction object permanently
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
58
					assigned for the session: the
59
					transaction instance designated by the
60
					trx id changes, but the memory
61
					structure is preserved */
62
	UT_LIST_BASE_NODE_T(que_t)
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
63
			graphs;		/*!< query graphs belonging to this
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
64
					session */
65
};
66
67
/* Session states */
68
#define SESS_ACTIVE		1
69
#define SESS_ERROR		2	/* session contains an error message
70
					which has not yet been communicated
71
					to the client */
72
#ifndef UNIV_NONINL
73
#include "usr0sess.ic"
74
#endif
75
76
#endif