MySQL 8.0.30
Source Code Documentation
mysql_connection_attributes_iterator_imp.h
Go to the documentation of this file.
1/* Copyright (c) 2020, 2022, 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 also distributed 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 included with MySQL.
13
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License, version 2.0, for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
22
23#ifndef MYSQL_CONNECTION_ATTRIBUTES_ITERATOR_IMP_H
24#define MYSQL_CONNECTION_ATTRIBUTES_ITERATOR_IMP_H
25
28
29/**
30 @class mysql_thd_variables_service_imp
31
32 Thread variables' service implementation.
33
34 This service provides functions for plugins and storage engines to
35 obtain the thread's THD variables.
36
37 @sa mysql_connection_attributes_iterator
38*/
39
41 public:
42 /**
43 Initialize an iterator.
44
45 Also position at the first attribute.
46
47 @param opaque_thd The session to operate on. Can be null to use the
48 current THD.
49 @param[out] iterator Iterator pointer.
50
51 @return
52 @retval false Succeeded.
53 @retval true Failed.
54
55 @sa mysql_connection_attributes_iterator::init
56 */
58 (MYSQL_THD opaque_thd,
60
61 /**
62 Deinitialize an iterator.
63
64 @param iterator Iterator pointer.
65
66 @return
67 @retval false Succeeded.
68 @retval true Failed.
69
70 @sa mysql_connection_attributes_iterator::deinit
71 */
74
75 /**
76 Fetch the current name/value pair from the iterator and move it forward.
77 Note: the attribute's name and value pointers are valid until the THD
78 object is alive.
79
80 @param opaque_thd The session to operate on. Can be NULL to use
81 the current THD.
82 @param iterator Iterator pointer.
83 @param[out] name The attribute name.
84 @param[out] name_length The attribute name's length.
85 @param[out] value The attribute value.
86 @param[out] value_length The attribute value's length.
87 @param[out] client_charset The character set, used for encoding the
88 connection attributes pair
89
90 @return
91 @retval false Succeeded.
92 @retval true Failed.
93
94 @sa mysql_connection_attributes_iterator::get
95 */
96 static DEFINE_BOOL_METHOD(get, (MYSQL_THD opaque_thd,
98 const char **name, size_t *name_length,
99 const char **value, size_t *value_length,
100 const char **client_charset));
101};
102
103#endif /* !MYSQL_CONNECTION_ATTRIBUTES_ITERATOR_IMP_H */
#define MYSQL_THD
Definition: backup_page_tracker.h:37
Definition: mysql_connection_attributes_iterator_imp.h:40
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:98
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:28
static mysql_service_status_t deinit(my_h_connection_attributes_iterator iterator) noexcept
Deinitialize an iterator.
Definition: mysql_connection_attributes_iterator_imp.cc:46
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:78
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:87
case opt name
Definition: sslopt-case.h:32