~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/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
 
Sessions
3
 
 
4
 
(c) 1996 Innobase Oy
5
 
 
6
 
Created 6/25/1996 Heikki Tuuri
7
 
*******************************************************/
8
 
 
9
 
#ifndef usr0sess_h
10
 
#define usr0sess_h
11
 
 
12
 
#include "univ.i"
13
 
#include "ut0byte.h"
14
 
#include "trx0types.h"
15
 
#include "srv0srv.h"
16
 
#include "trx0types.h"
17
 
#include "usr0types.h"
18
 
#include "que0types.h"
19
 
#include "data0data.h"
20
 
#include "rem0rec.h"
21
 
 
22
 
/*************************************************************************
23
 
Opens a session. */
24
 
UNIV_INTERN
25
 
sess_t*
26
 
sess_open(void);
27
 
/*============*/
28
 
                                        /* out, own: session object */
29
 
/*************************************************************************
30
 
Closes a session, freeing the memory occupied by it, if it is in a state
31
 
where it should be closed. */
32
 
UNIV_INTERN
33
 
ibool
34
 
sess_try_close(
35
 
/*===========*/
36
 
                                /* out: TRUE if closed */
37
 
        sess_t*         sess);  /* in, own: session object */
38
 
 
39
 
/* The session handle. All fields are protected by the kernel mutex */
40
 
struct sess_struct{
41
 
        ulint           state;          /* state of the session */
42
 
        trx_t*          trx;            /* transaction object permanently
43
 
                                        assigned for the session: the
44
 
                                        transaction instance designated by the
45
 
                                        trx id changes, but the memory
46
 
                                        structure is preserved */
47
 
        UT_LIST_BASE_NODE_T(que_t)
48
 
                        graphs;         /* query graphs belonging to this
49
 
                                        session */
50
 
};
51
 
 
52
 
/* Session states */
53
 
#define SESS_ACTIVE             1
54
 
#define SESS_ERROR              2       /* session contains an error message
55
 
                                        which has not yet been communicated
56
 
                                        to the client */
57
 
#ifndef UNIV_NONINL
58
 
#include "usr0sess.ic"
59
 
#endif
60
 
 
61
 
#endif