MySQL 8.0.39
Source Code Documentation
mysql_connection_attributes_iterator_imp.h
Go to the documentation of this file.
1/* Copyright (c) 2020, 2024, Oracle and/or its affiliates.
2
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License, version 2.0,
5 as published by the Free Software Foundation.
6
7 This program is designed to work with certain software (including
8 but not limited to OpenSSL) that is licensed under separate terms,
9 as designated in a particular file or component or in included license
10 documentation. The authors of MySQL hereby grant you an additional
11 permission to link the program and your derivative works with the
12 separately licensed software that they have either included with
13 the program or referenced in the documentation.
14
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License, version 2.0, for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
23
24#ifndef MYSQL_CONNECTION_ATTRIBUTES_ITERATOR_IMP_H
25#define MYSQL_CONNECTION_ATTRIBUTES_ITERATOR_IMP_H
26
29
30/**
31 @class mysql_thd_variables_service_imp
32
33 Thread variables' service implementation.
34
35 This service provides functions for plugins and storage engines to
36 obtain the thread's THD variables.
37
38 @sa mysql_connection_attributes_iterator
39*/
40
42 public:
43 /**
44 Initialize an iterator.
45
46 Also position at the first attribute.
47
48 @param opaque_thd The session to operate on. Can be null to use the
49 current THD.
50 @param[out] iterator Iterator pointer.
51
52 @return
53 @retval false Succeeded.
54 @retval true Failed.
55
56 @sa mysql_connection_attributes_iterator::init
57 */
59 (MYSQL_THD opaque_thd,
61
62 /**
63 Deinitialize an iterator.
64
65 @param iterator Iterator pointer.
66
67 @return
68 @retval false Succeeded.
69 @retval true Failed.
70
71 @sa mysql_connection_attributes_iterator::deinit
72 */
75
76 /**
77 Fetch the current name/value pair from the iterator and move it forward.
78 Note: the attribute's name and value pointers are valid until the THD
79 object is alive.
80
81 @param opaque_thd The session to operate on. Can be NULL to use
82 the current THD.
83 @param iterator Iterator pointer.
84 @param[out] name The attribute name.
85 @param[out] name_length The attribute name's length.
86 @param[out] value The attribute value.
87 @param[out] value_length The attribute value's length.
88 @param[out] client_charset The character set, used for encoding the
89 connection attributes pair
90
91 @return
92 @retval false Succeeded.
93 @retval true Failed.
94
95 @sa mysql_connection_attributes_iterator::get
96 */
97 static DEFINE_BOOL_METHOD(get, (MYSQL_THD opaque_thd,
99 const char **name, size_t *name_length,
100 const char **value, size_t *value_length,
101 const char **client_charset));
102};
103
104#endif /* !MYSQL_CONNECTION_ATTRIBUTES_ITERATOR_IMP_H */
#define MYSQL_THD
Definition: backup_page_tracker.h:38
Definition: mysql_connection_attributes_iterator_imp.h:41
static mysql_service_status_t get(MYSQL_THD opaque_thd, my_h_connection_attributes_iterator *iterator, const char **name, size_t *name_length, const char **value, size_t *value_length, const char **client_charset) noexcept
Fetch the current name/value pair from the iterator and move it forward.
Definition: mysql_connection_attributes_iterator_imp.cc:99
static mysql_service_status_t init(MYSQL_THD opaque_thd, my_h_connection_attributes_iterator *iterator) noexcept
Initialize an iterator.
Definition: mysql_connection_attributes_iterator_imp.cc:29
static mysql_service_status_t deinit(my_h_connection_attributes_iterator iterator) noexcept
Deinitialize an iterator.
Definition: mysql_connection_attributes_iterator_imp.cc:47
const char * my_h_connection_attributes_iterator
A service to read the connection attributes from the current session It provides a read-only iterator...
Definition: mysql_connection_attributes_iterator.h:79
Specifies macros to define Service Implementations.
#define DEFINE_BOOL_METHOD(name, args)
A short macro to define method that returns bool, which is the most common case.
Definition: service_implementation.h:88
case opt name
Definition: sslopt-case.h:33