MySQL 8.4.2
Source Code Documentation
plugin_status_variables.h
Go to the documentation of this file.
1/* Copyright (c) 2023, 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 PLUGIN_STATUS_VARIABLES_INCLUDE
25#define PLUGIN_STATUS_VARIABLES_INCLUDE
26
27#include "mysql/plugin.h" /* MYSQL_THD, SHOW_VAR */
28
29/**
30 @class Plugin_status_variables
31
32 Group Replication plugin status variables proxy.
33*/
35 public:
38
39 /**
40 @see Metrics_handler::get_control_messages_sent_count()
41
42 @param[in] thd The caller session.
43 @param[out] var The status variable.
44 @param[out] buffer The buffer on which the value will be stored.
45
46 @return the operation status
47 @retval 0 OK
48 @retval !=0 Error
49 */
51 char *buffer);
52
53 /**
54 @see Metrics_handler::get_data_messages_sent_count()
55
56 @param[in] thd The caller session.
57 @param[out] var The status variable.
58 @param[out] buffer The buffer on which the value will be stored.
59
60 @return the operation status
61 @retval 0 OK
62 @retval !=0 Error
63 */
65 char *buffer);
66
67 /**
68 @see Metrics_handler::get_control_messages_sent_bytes_sum()
69
70 @param[in] thd The caller session.
71 @param[out] var The status variable.
72 @param[out] buffer The buffer on which the value will be stored.
73
74 @return the operation status
75 @retval 0 OK
76 @retval !=0 Error
77 */
79 char *buffer);
80
81 /**
82 @see Metrics_handler::get_data_messages_sent_bytes_sum()
83
84 @param[in] thd The caller session.
85 @param[out] var The status variable.
86 @param[out] buffer The buffer on which the value will be stored.
87
88 @return the operation status
89 @retval 0 OK
90 @retval !=0 Error
91 */
93 char *buffer);
94
95 /**
96 @see Metrics_handler::get_control_messages_sent_roundtrip_time_sum()
97
98 @param[in] thd The caller session.
99 @param[out] var The status variable.
100 @param[out] buffer The buffer on which the value will be stored.
101
102 @return the operation status
103 @retval 0 OK
104 @retval !=0 Error
105 */
107 SHOW_VAR *var,
108 char *buffer);
109
110 /**
111 @see Metrics_handler::get_data_messages_sent_roundtrip_time_sum()
112
113 @param[in] thd The caller session.
114 @param[out] var The status variable.
115 @param[out] buffer The buffer on which the value will be stored.
116
117 @return the operation status
118 @retval 0 OK
119 @retval !=0 Error
120 */
122 SHOW_VAR *var,
123 char *buffer);
124
125 /**
126 @see Metrics_handler::get_transactions_consistency_before_begin_count()
127
128 @param[in] thd The caller session.
129 @param[out] var The status variable.
130 @param[out] buffer The buffer on which the value will be stored.
131
132 @return the operation status
133 @retval 0 OK
134 @retval !=0 Error
135 */
137 SHOW_VAR *var,
138 char *buffer);
139
140 /**
141 @see Metrics_handler::get_transactions_consistency_before_begin_time_sum()
142
143 @param[in] thd The caller session.
144 @param[out] var The status variable.
145 @param[out] buffer The buffer on which the value will be stored.
146
147 @return the operation status
148 @retval 0 OK
149 @retval !=0 Error
150 */
152 SHOW_VAR *var,
153 char *buffer);
154
155 /**
156 @see Metrics_handler::get_transactions_consistency_after_termination_count()
157
158 @param[in] thd The caller session.
159 @param[out] var The status variable.
160 @param[out] buffer The buffer on which the value will be stored.
161
162 @return the operation status
163 @retval 0 OK
164 @retval !=0 Error
165 */
167 SHOW_VAR *var,
168 char *buffer);
169
170 /**
171 @see
172 Metrics_handler::get_transactions_consistency_after_termination_time_sum()
173
174 @param[in] thd The caller session.
175 @param[out] var The status variable.
176 @param[out] buffer The buffer on which the value will be stored.
177
178 @return the operation status
179 @retval 0 OK
180 @retval !=0 Error
181 */
183 MYSQL_THD thd, SHOW_VAR *var, char *buffer);
184
185 /**
186 @see Metrics_handler::get_transactions_consistency_after_sync_count()
187
188 @param[in] thd The caller session.
189 @param[out] var The status variable.
190 @param[out] buffer The buffer on which the value will be stored.
191
192 @return the operation status
193 @retval 0 OK
194 @retval !=0 Error
195 */
197 SHOW_VAR *var,
198 char *buffer);
199
200 /**
201 @see Metrics_handler::get_transactions_consistency_after_sync_time_sum()
202
203 @param[in] thd The caller session.
204 @param[out] var The status variable.
205 @param[out] buffer The buffer on which the value will be stored.
206
207 @return the operation status
208 @retval 0 OK
209 @retval !=0 Error
210 */
212 SHOW_VAR *var,
213 char *buffer);
214
215 /**
216 @see Metrics_handler::get_certification_garbage_collector_count()
217
218 @param[in] thd The caller session.
219 @param[out] var The status variable.
220 @param[out] buffer The buffer on which the value will be stored.
221
222 @return the operation status
223 @retval 0 OK
224 @retval !=0 Error
225 */
227 SHOW_VAR *var,
228 char *buffer);
229
230 /**
231 @see Metrics_handler::get_certification_garbage_collector_time_sum()
232
233 @param[in] thd The caller session.
234 @param[out] var The status variable.
235 @param[out] buffer The buffer on which the value will be stored.
236
237 @return the operation status
238 @retval 0 OK
239 @retval !=0 Error
240 */
242 SHOW_VAR *var,
243 char *buffer);
244
245 /**
246 @see Gcs_operations::get_all_consensus_proposals_count()
247
248 @param[in] thd The caller session.
249 @param[out] var The status variable.
250 @param[out] buffer The buffer on which the value will be stored.
251
252 @return the operation status
253 @retval 0 OK
254 @retval !=0 Error
255 */
257 char *buffer);
258
259 /**
260 @see Gcs_operations::get_empty_consensus_proposals_count()
261
262 @param[in] thd The caller session.
263 @param[out] var The status variable.
264 @param[out] buffer The buffer on which the value will be stored.
265
266 @return the operation status
267 @retval 0 OK
268 @retval !=0 Error
269 */
271 char *buffer);
272
273 /**
274 @see Gcs_operations::get_consensus_bytes_sent_sum()
275
276 @param[in] thd The caller session.
277 @param[out] var The status variable.
278 @param[out] buffer The buffer on which the value will be stored.
279
280 @return the operation status
281 @retval 0 OK
282 @retval !=0 Error
283 */
285 char *buffer);
286
287 /**
288 @see Gcs_operations::get_consensus_bytes_received_sum()
289
290 @param[in] thd The caller session.
291 @param[out] var The status variable.
292 @param[out] buffer The buffer on which the value will be stored.
293
294 @return the operation status
295 @retval 0 OK
296 @retval !=0 Error
297 */
299 char *buffer);
300
301 /**
302 @see Gcs_operations::get_all_consensus_time_sum()
303
304 @param[in] thd The caller session.
305 @param[out] var The status variable.
306 @param[out] buffer The buffer on which the value will be stored.
307
308 @return the operation status
309 @retval 0 OK
310 @retval !=0 Error
311 */
312 static int get_all_consensus_time_sum(MYSQL_THD thd, SHOW_VAR *var,
313 char *buffer);
314
315 /**
316 @see Gcs_operations::get_extended_consensus_count()
317
318 @param[in] thd The caller session.
319 @param[out] var The status variable.
320 @param[out] buffer The buffer on which the value will be stored.
321
322 @return the operation status
323 @retval 0 OK
324 @retval !=0 Error
325 */
327 char *buffer);
328
329 /**
330 @see Gcs_operations::get_total_messages_sent_count()
331
332 @param[in] thd The caller session.
333 @param[out] var The status variable.
334 @param[out] buffer The buffer on which the value will be stored.
335
336 @return the operation status
337 @retval 0 OK
338 @retval !=0 Error
339 */
341 char *buffer);
342
343 /**
344 Copy to buffer parameter the last consensus end timestamp in the
345 format: 'YYYY-MM-DD hh:mm:ss.microseconds' in UTC timezone.
346 If there is no last consensus, a empty string is copied.
347
348 @see Gcs_operations::get_last_consensus_end_timestamp()
349
350 @param[in] thd The caller session.
351 @param[out] var The status variable.
352 @param[out] buffer The buffer on which the value will be stored.
353
354 @return the operation status
355 @retval 0 OK
356 @retval !=0 Error
357 */
359 char *buffer);
360};
361
362#endif /* PLUGIN_STATUS_VARIABLES_INCLUDE */
#define MYSQL_THD
Definition: backup_page_tracker.h:38
Group Replication plugin status variables proxy.
Definition: plugin_status_variables.h:34
static int get_transactions_consistency_before_begin_count(MYSQL_THD thd, SHOW_VAR *var, char *buffer)
Definition: plugin_status_variables.cc:87
static int get_all_consensus_time_sum(MYSQL_THD thd, SHOW_VAR *var, char *buffer)
Definition: plugin_status_variables.cc:206
static int get_transactions_consistency_before_begin_time_sum(MYSQL_THD thd, SHOW_VAR *var, char *buffer)
Definition: plugin_status_variables.cc:96
static int get_extended_consensus_count(MYSQL_THD thd, SHOW_VAR *var, char *buffer)
Definition: plugin_status_variables.cc:216
static int get_all_consensus_proposals_count(MYSQL_THD thd, SHOW_VAR *var, char *buffer)
Definition: plugin_status_variables.cc:166
static int get_total_messages_sent_count(MYSQL_THD thd, SHOW_VAR *var, char *buffer)
Definition: plugin_status_variables.cc:226
static int get_certification_garbage_collector_time_sum(MYSQL_THD thd, SHOW_VAR *var, char *buffer)
Definition: plugin_status_variables.cc:157
Plugin_status_variables()=delete
static int get_consensus_bytes_received_sum(MYSQL_THD thd, SHOW_VAR *var, char *buffer)
Definition: plugin_status_variables.cc:196
static int get_empty_consensus_proposals_count(MYSQL_THD thd, SHOW_VAR *var, char *buffer)
Definition: plugin_status_variables.cc:176
static int get_data_messages_sent_bytes_sum(MYSQL_THD thd, SHOW_VAR *var, char *buffer)
Definition: plugin_status_variables.cc:59
static int get_transactions_consistency_after_termination_count(MYSQL_THD thd, SHOW_VAR *var, char *buffer)
Definition: plugin_status_variables.cc:107
static int get_data_messages_sent_roundtrip_time_sum(MYSQL_THD thd, SHOW_VAR *var, char *buffer)
Definition: plugin_status_variables.cc:78
static int get_consensus_bytes_sent_sum(MYSQL_THD thd, SHOW_VAR *var, char *buffer)
Definition: plugin_status_variables.cc:186
static int get_control_messages_sent_count(MYSQL_THD thd, SHOW_VAR *var, char *buffer)
Definition: plugin_status_variables.cc:29
static int get_transactions_consistency_after_sync_count(MYSQL_THD thd, SHOW_VAR *var, char *buffer)
Definition: plugin_status_variables.cc:130
static int get_control_messages_sent_bytes_sum(MYSQL_THD thd, SHOW_VAR *var, char *buffer)
Definition: plugin_status_variables.cc:49
static int get_last_consensus_end_timestamp(MYSQL_THD thd, SHOW_VAR *var, char *buffer)
Copy to buffer parameter the last consensus end timestamp in the format: 'YYYY-MM-DD hh:mm:ss....
Definition: plugin_status_variables.cc:236
static int get_transactions_consistency_after_sync_time_sum(MYSQL_THD thd, SHOW_VAR *var, char *buffer)
Definition: plugin_status_variables.cc:139
static int get_certification_garbage_collector_count(MYSQL_THD thd, SHOW_VAR *var, char *buffer)
Definition: plugin_status_variables.cc:148
static int get_control_messages_sent_roundtrip_time_sum(MYSQL_THD thd, SHOW_VAR *var, char *buffer)
Definition: plugin_status_variables.cc:69
static int get_transactions_consistency_after_termination_time_sum(MYSQL_THD thd, SHOW_VAR *var, char *buffer)
Definition: plugin_status_variables.cc:119
static int get_data_messages_sent_count(MYSQL_THD thd, SHOW_VAR *var, char *buffer)
Definition: plugin_status_variables.cc:39
~Plugin_status_variables()=delete
mutable_buffer buffer(void *p, size_t n) noexcept
Definition: buffer.h:418
SHOW STATUS Server status variable.
Definition: status_var.h:79