~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/innobase/include/usr0sess.h

  • Committer: Daniel Nichter
  • Date: 2011-10-23 16:01:37 UTC
  • mto: This revision was merged to the branch mainline in revision 2448.
  • Revision ID: daniel@percona.com-20111023160137-7ac3blgz8z4tf8za
Add Administration Getting Started and Logging.  Capitalize SQL clause keywords.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*****************************************************************************
 
2
 
 
3
Copyright (C) 1996, 2009, Innobase Oy. All Rights Reserved.
 
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
 
14
this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
 
15
St, Fifth Floor, Boston, MA 02110-1301 USA
 
16
 
 
17
*****************************************************************************/
 
18
 
 
19
/**************************************************//**
 
20
@file include/usr0sess.h
 
21
Sessions
 
22
 
 
23
Created 6/25/1996 Heikki Tuuri
 
24
*******************************************************/
 
25
 
 
26
#pragma once
 
27
#ifndef usr0sess_h
 
28
#define usr0sess_h
 
29
 
 
30
#include "univ.i"
 
31
#include "ut0byte.h"
 
32
#include "trx0types.h"
 
33
#include "srv0srv.h"
 
34
#include "trx0types.h"
 
35
#include "usr0types.h"
 
36
#include "que0types.h"
 
37
#include "data0data.h"
 
38
#include "rem0rec.h"
 
39
 
 
40
/*********************************************************************//**
 
41
Opens a session.
 
42
@return own: session object */
 
43
UNIV_INTERN
 
44
sess_t*
 
45
sess_open(void);
 
46
/*============*/
 
47
/*********************************************************************//**
 
48
Closes a session, freeing the memory occupied by it. */
 
49
UNIV_INTERN
 
50
void
 
51
sess_close(
 
52
/*=======*/
 
53
        sess_t*         sess);          /* in, own: session object */
 
54
 
 
55
/* The session handle. All fields are protected by the kernel mutex */
 
56
struct sess_struct{
 
57
        ulint           state;          /*!< state of the session */
 
58
        trx_t*          trx;            /*!< transaction object permanently
 
59
                                        assigned for the session: the
 
60
                                        transaction instance designated by the
 
61
                                        trx id changes, but the memory
 
62
                                        structure is preserved */
 
63
        UT_LIST_BASE_NODE_T(que_t)
 
64
                        graphs;         /*!< query graphs belonging to this
 
65
                                        session */
 
66
};
 
67
 
 
68
/* Session states */
 
69
#define SESS_ACTIVE             1
 
70
#define SESS_ERROR              2       /* session contains an error message
 
71
                                        which has not yet been communicated
 
72
                                        to the client */
 
73
#ifndef UNIV_NONINL
 
74
#include "usr0sess.ic"
 
75
#endif
 
76
 
 
77
#endif