MySQL 8.4.2
Source Code Documentation
usr0sess.h
Go to the documentation of this file.
1/*****************************************************************************
2
3Copyright (c) 1996, 2024, Oracle and/or its affiliates.
4
5This program is free software; you can redistribute it and/or modify it under
6the terms of the GNU General Public License, version 2.0, as published by the
7Free Software Foundation.
8
9This program is designed to work with certain software (including
10but not limited to OpenSSL) that is licensed under separate terms,
11as designated in a particular file or component or in included license
12documentation. The authors of MySQL hereby grant you an additional
13permission to link the program and your derivative works with the
14separately licensed software that they have either included with
15the program or referenced in the documentation.
16
17This program is distributed in the hope that it will be useful, but WITHOUT
18ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
19FOR A PARTICULAR PURPOSE. See the GNU General Public License, version 2.0,
20for more details.
21
22You should have received a copy of the GNU General Public License along with
23this program; if not, write to the Free Software Foundation, Inc.,
2451 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 */
48sess_t *sess_open(void);
49/** Closes a session, freeing the memory occupied by it. */
50void sess_close(sess_t *sess); /* in, own: session object */
51
52/* The session handle. This data structure is only used by purge and is
53not really necessary. We should get rid of it. */
54struct 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 */
64constexpr uint32_t SESS_ACTIVE = 1;
65/** session contains an error message which has not yet been communicated to the
66client */
67constexpr uint32_t SESS_ERROR = 2;
68
69#endif
SQL data field and tuple.
Query graph global types.
Record manager.
The server main program.
Definition: usr0sess.h:54
ulint state
state of the session
Definition: usr0sess.h:55
trx_t * trx
transaction object permanently assigned for the session: the transaction instance designated by the t...
Definition: usr0sess.h:56
Definition: trx0trx.h:684
Transaction system global type definitions.
Version control for database, common definitions, and include files.
unsigned long int ulint
Definition: univ.i:406
constexpr uint32_t SESS_ERROR
session contains an error message which has not yet been communicated to the client
Definition: usr0sess.h:67
sess_t * sess_open(void)
Opens a session.
Definition: usr0sess.cc:39
void sess_close(sess_t *sess)
Closes a session, freeing the memory occupied by it.
Definition: usr0sess.cc:54
constexpr uint32_t SESS_ACTIVE
Definition: usr0sess.h:64
Users and sessions global types.
Utilities for byte operations.