1mysql_session_track_get_first(3M)ariaDB Connectorm/yCsql_session_track_get_first(3)
2
3
4
5   Name
6       mysql_session_track_get_first  -  retrieves first session status change
7       information
8
9   Synopsis
10              #include <mysql.h>
11
12              int mysql_session_track_get_first(MYSQL * mysql,
13                                                enum enum_session_state_type type,
14                                                const char **data,
15                                                size_t *length );
16
17   Description
18       mysql_session_track_get_first()  retrieves  the  first  session  status
19       change information received from the server.
20
21       Depending on the specified type the read only data pointer will contain
22       the following information: * SESSION_TRACK_SCHEMA: The name of the  de‐
23       fault  schema (database) * SESSION_TRACK_SYSTEM_VARIABLES: If a session
24       system variable is changed, the first call contains  the  name  of  the
25       changed  system variable, the second call contains the new value.  Both
26       name   and   value   are    represented    as    strings.     *    SES‐
27       SION_TRACK_STATE_CHANGE:  shows whether the session status has changed.
28       The value is changed as string “1” (changed) or “0” (unchanged).
29
30       Further   data   needs   to   be   obtained   by   calling   mysql_ses‐
31       sion_track_get_next(3).
32
33   Parameter
34       • mysql - mysql handle, which was previously allocated by mysql_init(3)
35         and connected by mysql_real_connect(3).
36
37       • type - type of information.  Valid values are
38
39         • SESSION_TRACK_SYSTEM_VARIABLES
40
41         • SESSION_TRACK_SCHEMA
42
43         • SESSION_TRACK_STATE_CHANGE
44
45         • SESSION_TRACK_GTIDS (unsupported)
46
47       • data - pointer to data, which must be declared as const char *
48
49       • length - pointer to a size_t variable, which will contain the  length
50         of data
51
52   Returns
53       Zero  for success, nonzero if no session tracking information is avail‐
54       able.
55
56   History
57       mysql_session_track_get_first() was added in Connector/C 3.0 and  Mari‐
58       aDB Server 10.2.
59
60   See also
61mysql_session_track_get_next(3)
62
63
64
65Version 3.3.1                                 mysql_session_track_get_first(3)
Impressum