Debian Codegraph @

storage/innobase/include/usr0sess.h

raw
1 /*****************************************************************************
2
3 Copyright (c) 1996, 2026, Oracle and/or its affiliates.
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, version 2.0, as published by the
7 Free Software Foundation.
8
9 This program is designed to work with certain software (including
10 but not limited to OpenSSL) that is licensed under separate terms,
11 as designated in a particular file or component or in included license
12 documentation. The authors of MySQL hereby grant you an additional
13 permission to link the program and your derivative works with the
14 separately licensed software that they have either included with
15 the program or referenced in the documentation.
16
17 This program is distributed in the hope that it will be useful, but WITHOUT
18 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
19 FOR A PARTICULAR PURPOSE. See the GNU General Public License, version 2.0,
20 for more details.
21
22 You should have received a copy of the GNU General Public License along with
23 this program; if not, write to the Free Software Foundation, Inc.,
24 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25
26 *****************************************************************************/
27
28 /** @file include/usr0sess.h
29 Sessions
30
31 Created 6/25/1996 Heikki Tuuri
32 *******************************************************/
33
34 #ifndef usr0sess_h
35 #define usr0sess_h
36
37 #include "data0data.h"
38 #include "que0types.h"
39 #include "rem0rec.h"
40 #include "srv0srv.h"
41 #include "trx0types.h"
42 #include "univ.i"
43 #include "usr0types.h"
44 #include "ut0byte.h"
45
46 /** Opens a session.
47 @return own: session object */
48 sess_t *sess_open(void);
49 /** Closes a session, freeing the memory occupied by it. */
50 void sess_close(sess_t *sess); /* in, own: session object */
51
52 /* The session handle. This data structure is only used by purge and is
53 not really necessary. We should get rid of it. */
54 struct sess_t {
55 ulint state; /*!< state of the session */
56 trx_t *trx; /*!< transaction object permanently
57 assigned for the session: the
58 transaction instance designated by the
59 trx id changes, but the memory
60 structure is preserved */
61 };
62
63 /* Session states */
64 constexpr uint32_t SESS_ACTIVE = 1;
65 /** session contains an error message which has not yet been communicated to the
66 client */
67 constexpr uint32_t SESS_ERROR = 2;
68
69 #endif