MySQL 8.0.29
Source Code Documentation
psi_thread_bits.h
Go to the documentation of this file.
1/* Copyright (c) 2008, 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 COMPONENTS_SERVICES_BITS_PSI_THREAD_BITS_H
24#define COMPONENTS_SERVICES_BITS_PSI_THREAD_BITS_H
25
26#ifndef MYSQL_ABI_CHECK
27#include <stddef.h> /* size_t */
28#endif
29
30#include <mysql/components/services/bits/my_io_bits.h> /* sockaddr_storage */
31#include <mysql/components/services/bits/my_thread_bits.h> /* my_thread_handle */
33
34/**
35 @file mysql/components/services/bits/psi_thread_bits.h
36 Performance schema instrumentation interface.
37
38 @defgroup psi_abi_thread Thread Instrumentation (ABI)
39 @ingroup psi_abi
40 @{
41*/
42
43/**
44 Instrumented thread key.
45 To instrument a thread, a thread key must be obtained
46 using @c register_thread.
47 Using a zero key always disable the instrumentation.
48*/
49typedef unsigned int PSI_thread_key;
50
51/**
52 Instrumented thread sequence number.
53 This sequence number is used in conjunction
54 with @ref PSI_thread_info_v5::m_os_name "foo",
55 to print names like "foo-NN" in ps/top/debuggers ...
56 @see my_thread_self_setname().
57*/
58typedef unsigned int PSI_thread_seqnum;
59
60#ifdef __cplusplus
61class THD;
62#else
63/*
64 Phony declaration when compiling C code.
65 This is ok, because the C code will never have a THD anyway.
66*/
67struct opaque_THD {
68 int dummy;
69};
70typedef struct opaque_THD THD;
71#endif
72
73/** @sa enum_vio_type. */
74typedef int opaque_vio_type;
75
76/**
77 Interface for an instrumented thread.
78 This is an opaque structure.
79*/
80struct PSI_thread;
81typedef struct PSI_thread PSI_thread;
82
83/**
84 Thread instrument information.
85 @since PSI_THREAD_VERSION_1
86 This structure is used to register an instrumented thread.
87*/
89 /**
90 Pointer to the key assigned to the registered thread.
91 */
93 /**
94 The name of the thread instrument to register.
95 */
96 const char *m_name;
97 /**
98 The flags of the thread to register.
99 @sa PSI_FLAG_SINGLETON
100 @sa PSI_FLAG_USER
101 @sa PSI_FLAG_THREAD_SYSTEM
102 */
103 unsigned int m_flags;
104 /** Volatility index. */
106 /** Documentation. */
107 const char *m_documentation;
108};
110
111/**
112 Thread instrument information.
113 @since PSI_THREAD_VERSION_5
114 This structure is used to register an instrumented thread.
115*/
117 /**
118 Pointer to the key assigned to the registered thread.
119 */
121 /**
122 The name of the thread instrument to register.
123 */
124 const char *m_name;
125
126 /**
127 The thread name to advertise to the operating system.
128
129 The performance schema thread instrumentation
130 exports instrumented names to the operating system,
131 so they can be visible in:
132 - the output of ps
133 - the output of top
134 - a debugger
135 etc.
136
137 This feature is optional, and improves
138 observability for platforms that support
139 a flavor of pthread_setname_np().
140 On other platforms, there are no effects.
141
142 Performance schema thread names can be instrumented
143 in different ways.
144
145 First, the thread can be unique (@c PSI_FLAG_SINGLETON).
146 In this case, the @c m_os_name attribute is printed as is.
147
148 Second, for threads that exist in multiple instances
149 (flag @c PSI_FLAG_SINGLETON not set),
150 the caller code should pass a sequence number when creating
151 a thread instance with @c new_thread_v5_t or @c spawn_thread_v5_t.
152
153 This sequence number is concatenated (with a dash) to
154 the @c m_os_name so that a thread name "foo" with a sequence
155 of "12" is displayed as "foo-12".
156 When the actual value of the sequence number has a special meaning
157 to the instrumented code (for example, a worker number is also
158 exposed in different places), this is the preferred instrumentation.
159
160 Third, for threads that exist in multiple instances,
161 but do not rely on a specific numbering, setting the flag
162 @c PSI_FLAG_AUTO_SEQNUM causes the performance schema to number
163 threads automatically, so the calling code does not have to do it.
164
165 Fourth and last, for threads that exist in multiple instances,
166 and are executed so often that the total number of threads
167 grows to a very large number (for example, user sessions),
168 numbering threads is not practical because of size limitations,
169 and would introduce just noise in the ps output.
170
171 For this case, the flag @c PSI_FLAG_NO_SEQNUM can be used
172 to avoid numbering.
173
174 @sa my_thread_self_setname().
175 @sa new_thread_v5_t
176 @sa spawn_thread_v5_t
177
178 */
179 const char *m_os_name;
180 /**
181 The flags of the thread to register.
182 @sa PSI_FLAG_SINGLETON
183 @sa PSI_FLAG_USER
184 @sa PSI_FLAG_THREAD_SYSTEM
185 @sa PSI_FLAG_AUTO_SEQNUM
186 @sa PSI_FLAG_NO_SEQNUM
187 */
188 unsigned int m_flags;
189 /** Volatility index. */
191 /** Documentation. */
192 const char *m_documentation;
193};
195
196/**
197 Thread registration API.
198 @param category a category name (typically a plugin name)
199 @param info an array of thread info to register
200 @param count the size of the info array
201*/
202typedef void (*register_thread_v1_t)(const char *category,
203 struct PSI_thread_info_v1 *info,
204 int count);
205
206/**
207 Thread registration API.
208 @param category a category name (typically a plugin name)
209 @param info an array of thread info to register
210 @param count the size of the info array
211*/
212typedef void (*register_thread_v5_t)(const char *category,
213 struct PSI_thread_info_v5 *info,
214 int count);
215
216/**
217 Spawn a thread.
218 This method creates a new thread, with instrumentation.
219 @param key the instrumentation key for this thread
220 @param thread the resulting thread
221 @param attr the thread attributes
222 @param start_routine the thread start routine
223 @param arg the thread start routine argument
224*/
226 const my_thread_attr_t *attr,
227 void *(*start_routine)(void *), void *arg);
228
230 my_thread_handle *thread,
231 const my_thread_attr_t *attr,
232 void *(*start_routine)(void *), void *arg);
233
234/**
235 Create instrumentation for a thread.
236 @param key the registered key
237 @param identity an address typical of the thread
238 @param thread_id PROCESSLIST_ID of the thread
239 @return an instrumented thread
240*/
241typedef struct PSI_thread *(*new_thread_v1_t)(PSI_thread_key key,
242 const void *identity,
243 unsigned long long thread_id);
244
245typedef struct PSI_thread *(*new_thread_v5_t)(PSI_thread_key key,
246 PSI_thread_seqnum seqnum,
247 const void *identity,
248 unsigned long long thread_id);
249
250/**
251 Assign a THD to an instrumented thread.
252 @param thread the instrumented thread
253 @param thd the sql layer THD to assign
254*/
255typedef void (*set_thread_THD_v1_t)(struct PSI_thread *thread, THD *thd);
256
257/**
258 Assign an id to an instrumented thread.
259 @param thread the instrumented thread
260 @param id the PROCESSLIST_ID to assign
261*/
262typedef void (*set_thread_id_v1_t)(struct PSI_thread *thread,
263 unsigned long long id);
264/**
265 Read the THREAD_ID of the current thread.
266 @return the id of the instrumented thread
267*/
268typedef unsigned long long (*get_current_thread_internal_id_v2_t)();
269
270/**
271 Read the THREAD_ID of an instrumented thread.
272 @param thread the instrumented thread
273 @return the id of the instrumented thread
274*/
275typedef unsigned long long (*get_thread_internal_id_v2_t)(
276 struct PSI_thread *thread);
277
278/**
279 Get the instrumentation for the thread of given PROCESSLIST_ID.
280 @param processlist_id the thread id
281 @return the instrumented thread
282*/
283typedef struct PSI_thread *(*get_thread_by_id_v2_t)(
284 unsigned long long processlist_id);
285
286/**
287 Assign the current operating system thread id to an instrumented thread.
288 The operating system task id is obtained from @c gettid()
289 @param thread the instrumented thread
290*/
291typedef void (*set_thread_os_id_v1_t)(struct PSI_thread *thread);
292
293/**
294 Get the instrumentation for the running thread.
295 For this function to return a result,
296 the thread instrumentation must have been attached to the
297 running thread using @c set_thread()
298 @return the instrumentation for the running thread
299*/
300typedef struct PSI_thread *(*get_thread_v1_t)(void);
301
302/**
303 Assign a user name to the instrumented thread.
304 @param user the user name
305 @param user_len the user name length
306*/
307typedef void (*set_thread_user_v1_t)(const char *user, int user_len);
308
309/**
310 Assign a user name and host name to the instrumented thread.
311 @param user the user name
312 @param user_len the user name length
313 @param host the host name
314 @param host_len the host name length
315*/
316typedef void (*set_thread_account_v1_t)(const char *user, int user_len,
317 const char *host, int host_len);
318
319/**
320 Assign a current database to the instrumented thread.
321 @param db the database name
322 @param db_len the database name length
323*/
324typedef void (*set_thread_db_v1_t)(const char *db, int db_len);
325
326/**
327 Assign a current command to the instrumented thread.
328 @param command the current command
329*/
330typedef void (*set_thread_command_v1_t)(int command);
331
332/**
333 Assign a connection type to the instrumented thread.
334 @param conn_type the connection type
335*/
336typedef void (*set_connection_type_v1_t)(opaque_vio_type conn_type);
337
338/**
339 Assign a start time to the instrumented thread.
340 @param start_time the thread start time
341*/
342typedef void (*set_thread_start_time_v1_t)(time_t start_time);
343
344/**
345 Assign a state to the instrumented thread.
346 @param state the thread state
347*/
348typedef void (*set_thread_state_v1_t)(const char *state);
349
350/**
351 Assign a process info to the instrumented thread.
352 @param info the process into string
353 @param info_len the process into string length
354*/
355typedef void (*set_thread_info_v1_t)(const char *info, unsigned int info_len);
356
357/**
358 Set a thread EXECUTION_ENGINE attribute.
359 @param secondary True for SECONDARY, false for PRIMARY.
360*/
361typedef void (*set_thread_secondary_engine_v6_t)(bool secondary);
362
363/**
364 Assign a resource group name to the current thread.
365
366 @param group_name resource group name string
367 @param group_name_len resource group name string length
368 @param user_data user-defined data
369 return 0 if successful, 1 otherwise
370*/
371typedef int (*set_thread_resource_group_v1_t)(const char *group_name,
372 int group_name_len,
373 void *user_data);
374
375/**
376 Assign a resource group name to an instrumented thread, identified either by
377 the thread instrumentation or Performance Schema thread id.
378
379 @param thread pointer to the thread instrumentation. Ignored if NULL.
380 @param thread_id thread id of the target thread. Only used if thread is NULL.
381 @param group_name resource group name string
382 @param group_name_len resource group name string length
383 @param user_data user-defined data
384 return 0 if successful, 1 otherwise
385*/
387 PSI_thread *thread, unsigned long long thread_id, const char *group_name,
388 int group_name_len, void *user_data);
389
390/**
391 Attach a thread instrumentation to the running thread.
392 In case of thread pools, this method should be called when
393 a worker thread picks a work item and runs it.
394 Also, this method should be called if the instrumented code does not
395 keep the pointer returned by @c new_thread() and relies on @c get_thread()
396 instead.
397 @param thread the thread instrumentation
398*/
399typedef void (*set_thread_v1_t)(struct PSI_thread *thread);
400
401/**
402 Assign the remote (peer) port to the instrumented thread.
403
404 @param thread pointer to the thread instrumentation
405 @param port the remote port
406*/
407typedef void (*set_thread_peer_port_v4_t)(PSI_thread *thread,
408 unsigned int port);
409
410/** Aggregate the thread status variables. */
411typedef void (*aggregate_thread_status_v2_t)(struct PSI_thread *thread);
412
413/** Delete the current thread instrumentation. */
414typedef void (*delete_current_thread_v1_t)(void);
415
416/** Delete a thread instrumentation. */
417typedef void (*delete_thread_v1_t)(struct PSI_thread *thread);
418
419/**
420 Stores an array of connection attributes
421 @param buffer char array of length encoded connection attributes
422 in network format
423 @param length length of the data in buffer
424 @param from_cs charset in which @c buffer is encoded
425 @return state
426 @retval non_0 attributes truncated
427 @retval 0 stored the attribute
428*/
429typedef int (*set_thread_connect_attrs_v1_t)(const char *buffer,
430 unsigned int length,
431 const void *from_cs);
432
433/**
434 Get the current thread current event.
435 @param [out] thread_internal_id The thread internal id
436 @param [out] event_id The per thread event id.
437*/
439 unsigned long long *thread_internal_id, unsigned long long *event_id);
440
441/**
442 Get the thread current event.
443 @deprecated
444 @param [out] thread_internal_id The thread internal id
445 @param [out] event_id The per thread event id.
446*/
447typedef void (*get_thread_event_id_v1_t)(unsigned long long *thread_internal_id,
448 unsigned long long *event_id);
449
450/**
451 Get the thread current event.
452 @param psi the instrumented thread
453 @param [out] thread_internal_id The thread internal id
454 @param [out] event_id The per thread event id.
455*/
456typedef void (*get_thread_event_id_v2_t)(struct PSI_thread *psi,
457 unsigned long long *thread_internal_id,
458 unsigned long long *event_id);
459
460/* Duplicate definitions to avoid dependency on mysql_com.h */
461#define PSI_USERNAME_LENGTH (32 * 3)
462#define PSI_NAME_LEN (64 * 3)
463#define PSI_HOSTNAME_LENGTH (255)
464
465/**
466 Performance Schema thread type: user/foreground or system/background.
467 @sa get_thread_system_attrs
468*/
470 /* PFS internal thread id, unique. */
471 unsigned long long m_thread_internal_id;
472
473 /* SHOW PROCESSLIST thread id, not unique. */
474 unsigned long m_processlist_id;
475
476 /* Operating system thread id, if any. */
477 unsigned long long m_thread_os_id;
478
479 /* User-defined data. */
481
482 /* User name. */
484
485 /* User name length. */
487
488 /* Host name. */
490
491 /* Host name length. */
493
494 /* Resource group name. */
496
497 /* Resource group name length. */
499
500 /** Raw socket address */
501 struct sockaddr_storage m_sock_addr;
502
503 /** Length of address */
505
506 /* True if system/background thread, false if user/foreground thread. */
508};
509
511
512/**
513 Callback for the pfs_notification service.
514 @param thread_attrs system attributes of the current thread.
515*/
516typedef void (*PSI_notification_cb_v3)(const PSI_thread_attrs_v3 *thread_attrs);
517
518/**
519 Registration structure for the pfs_notification service.
520 @sa register_notification_v3_t
521*/
528};
529
531
532/**
533 Get system attributes for the current thread.
534
535 @param thread_attrs pointer to pfs_thread_attr struct
536 @return 0 if successful, 1 otherwise
537*/
539
540/**
541 Get system attributes for an instrumented thread, identified either by the
542 thread instrumentation or Performance Schema thread id.
543
544 @param thread pointer to the thread instrumentation. Ignored if NULL.
545 @param thread_id thread id of the target thread. Only used if thread is NULL.
546 @param thread_attrs pointer to pfs_thread_attr struct
547 @return 0 if successful, 1 otherwise
548*/
550 PSI_thread *thread, unsigned long long thread_id,
551 PSI_thread_attrs_v3 *thread_attrs);
552
553/**
554 Register callback functions for the Notification service.
555 For best performance, set with_ref_count = false.
556
557 @param callbacks structure of user-defined callback functions
558 @param with_ref_count true if callbacks can be unregistered
559 @sa unregister_notification
560 @return registration handle on success, 0 if failure
561*/
563 bool with_ref_count);
564
565/**
566 Unregister callback functions for the Notification service.
567
568 @param handle registration handle returned by register_notification()
569 @sa register_notification
570 @return 0 if successful, non-zero otherwise
571*/
573
574/**
575 Invoke the callback function registered for a session connect event.
576
577 @param thread the thread instrumentation
578*/
580
581/**
582 Invoke the callback function registered for a session disconnect event.
583
584 @param thread the thread instrumentation
585*/
587
588/**
589 Invoke the callback function registered for a changer user event.
590
591 @param thread the thread instrumentation
592*/
594
596
597/** @} (end of group psi_abi_thread) */
598
599#endif /* COMPONENTS_SERVICES_BITS_PSI_THREAD_BITS_H */
static const sasl_callback_t callbacks[]
Definition: auth_ldap_sasl_client.h:44
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_class.h:945
unsigned long long(* get_thread_internal_id_v2_t)(struct PSI_thread *thread)
Read the THREAD_ID of an instrumented thread.
Definition: psi_thread_bits.h:275
void(* set_thread_state_v1_t)(const char *state)
Assign a state to the instrumented thread.
Definition: psi_thread_bits.h:348
int(* spawn_thread_v1_t)(PSI_thread_key key, my_thread_handle *thread, const my_thread_attr_t *attr, void *(*start_routine)(void *), void *arg)
Spawn a thread.
Definition: psi_thread_bits.h:225
void(* get_current_thread_event_id_v2_t)(unsigned long long *thread_internal_id, unsigned long long *event_id)
Get the current thread current event.
Definition: psi_thread_bits.h:438
void(* set_thread_THD_v1_t)(struct PSI_thread *thread, THD *thd)
Assign a THD to an instrumented thread.
Definition: psi_thread_bits.h:255
void(* set_thread_os_id_v1_t)(struct PSI_thread *thread)
Assign the current operating system thread id to an instrumented thread.
Definition: psi_thread_bits.h:291
struct PSI_thread PSI_thread
Definition: psi_thread_bits.h:81
void(* set_thread_id_v1_t)(struct PSI_thread *thread, unsigned long long id)
Assign an id to an instrumented thread.
Definition: psi_thread_bits.h:262
void(* PSI_notification_cb_v3)(const PSI_thread_attrs_v3 *thread_attrs)
Callback for the pfs_notification service.
Definition: psi_thread_bits.h:516
void(* notify_session_change_user_v1_t)(PSI_thread *thread)
Invoke the callback function registered for a changer user event.
Definition: psi_thread_bits.h:593
void(* set_thread_start_time_v1_t)(time_t start_time)
Assign a start time to the instrumented thread.
Definition: psi_thread_bits.h:342
void(* notify_session_disconnect_v1_t)(PSI_thread *thread)
Invoke the callback function registered for a session disconnect event.
Definition: psi_thread_bits.h:586
#define PSI_USERNAME_LENGTH
Definition: psi_thread_bits.h:461
void(* set_thread_command_v1_t)(int command)
Assign a current command to the instrumented thread.
Definition: psi_thread_bits.h:330
void(* get_thread_event_id_v1_t)(unsigned long long *thread_internal_id, unsigned long long *event_id)
Get the thread current event.
Definition: psi_thread_bits.h:447
unsigned int PSI_thread_seqnum
Instrumented thread sequence number.
Definition: psi_thread_bits.h:58
int(* spawn_thread_v5_t)(PSI_thread_key key, PSI_thread_seqnum seqnum, my_thread_handle *thread, const my_thread_attr_t *attr, void *(*start_routine)(void *), void *arg)
Definition: psi_thread_bits.h:229
void(* set_thread_info_v1_t)(const char *info, unsigned int info_len)
Assign a process info to the instrumented thread.
Definition: psi_thread_bits.h:355
void(* delete_current_thread_v1_t)(void)
Delete the current thread instrumentation.
Definition: psi_thread_bits.h:414
void(* set_thread_secondary_engine_v6_t)(bool secondary)
Set a thread EXECUTION_ENGINE attribute.
Definition: psi_thread_bits.h:361
void(* register_thread_v1_t)(const char *category, struct PSI_thread_info_v1 *info, int count)
Thread registration API.
Definition: psi_thread_bits.h:202
void(* set_thread_account_v1_t)(const char *user, int user_len, const char *host, int host_len)
Assign a user name and host name to the instrumented thread.
Definition: psi_thread_bits.h:316
int(* register_notification_v3_t)(const PSI_notification_v3 *callbacks, bool with_ref_count)
Register callback functions for the Notification service.
Definition: psi_thread_bits.h:562
void(* notify_session_connect_v1_t)(PSI_thread *thread)
Invoke the callback function registered for a session connect event.
Definition: psi_thread_bits.h:579
int(* set_thread_resource_group_v1_t)(const char *group_name, int group_name_len, void *user_data)
Assign a resource group name to the current thread.
Definition: psi_thread_bits.h:371
void(* set_thread_user_v1_t)(const char *user, int user_len)
Assign a user name to the instrumented thread.
Definition: psi_thread_bits.h:307
unsigned int PSI_thread_key
Instrumented thread key.
Definition: psi_thread_bits.h:49
#define PSI_HOSTNAME_LENGTH
Definition: psi_thread_bits.h:463
void(* register_thread_v5_t)(const char *category, struct PSI_thread_info_v5 *info, int count)
Thread registration API.
Definition: psi_thread_bits.h:212
#define PSI_NAME_LEN
Definition: psi_thread_bits.h:462
void(* aggregate_thread_status_v2_t)(struct PSI_thread *thread)
Aggregate the thread status variables.
Definition: psi_thread_bits.h:411
int(* unregister_notification_v1_t)(int handle)
Unregister callback functions for the Notification service.
Definition: psi_thread_bits.h:572
void(* delete_thread_v1_t)(struct PSI_thread *thread)
Delete a thread instrumentation.
Definition: psi_thread_bits.h:417
void(* set_thread_db_v1_t)(const char *db, int db_len)
Assign a current database to the instrumented thread.
Definition: psi_thread_bits.h:324
void(* set_thread_v1_t)(struct PSI_thread *thread)
Attach a thread instrumentation to the running thread.
Definition: psi_thread_bits.h:399
unsigned long long(* get_current_thread_internal_id_v2_t)()
Read the THREAD_ID of the current thread.
Definition: psi_thread_bits.h:268
int(* get_thread_system_attrs_v3_t)(PSI_thread_attrs_v3 *thread_attrs)
Get system attributes for the current thread.
Definition: psi_thread_bits.h:538
void(* set_thread_peer_port_v4_t)(PSI_thread *thread, unsigned int port)
Assign the remote (peer) port to the instrumented thread.
Definition: psi_thread_bits.h:407
int(* set_thread_connect_attrs_v1_t)(const char *buffer, unsigned int length, const void *from_cs)
Stores an array of connection attributes.
Definition: psi_thread_bits.h:429
int(* get_thread_system_attrs_by_id_v3_t)(PSI_thread *thread, unsigned long long thread_id, PSI_thread_attrs_v3 *thread_attrs)
Get system attributes for an instrumented thread, identified either by the thread instrumentation or ...
Definition: psi_thread_bits.h:549
int(* set_thread_resource_group_by_id_v1_t)(PSI_thread *thread, unsigned long long thread_id, const char *group_name, int group_name_len, void *user_data)
Assign a resource group name to an instrumented thread, identified either by the thread instrumentati...
Definition: psi_thread_bits.h:386
void(* set_connection_type_v1_t)(opaque_vio_type conn_type)
Assign a connection type to the instrumented thread.
Definition: psi_thread_bits.h:336
int opaque_vio_type
Definition: psi_thread_bits.h:61
void(* get_thread_event_id_v2_t)(struct PSI_thread *psi, unsigned long long *thread_internal_id, unsigned long long *event_id)
Get the thread current event.
Definition: psi_thread_bits.h:456
Types to make file and socket I/O compatible.
static my_thread_id thread_id
Definition: my_thr_init.cc:62
Types to make different thread packages compatible.
pthread_attr_t my_thread_attr_t
Definition: my_thread_bits.h:48
static int count
Definition: myisam_ftdump.cc:42
Log info(cout, "NOTE")
char * user
Definition: mysqladmin.cc:59
const char * host
Definition: mysqladmin.cc:58
bool length(const dd::Spatial_reference_system *srs, const Geometry *g1, double *length, bool *null) noexcept
Computes the length of linestrings and multilinestrings.
Definition: length.cc:75
mutable_buffer buffer(void *p, size_t n) noexcept
Definition: buffer.h:391
static int handle(int sql_errno, const char *sqlstate, const char *message, void *state)
Bridge function between the C++ API offered by this module and the C API of the parser service.
Definition: services.cc:64
static const char * category
Definition: sha2_password.cc:168
Performance schema instrumentation interface.
required string key
Definition: replication_asynchronous_connection_failover.proto:59
required uint64 port
Definition: replication_asynchronous_connection_failover.proto:32
Registration structure for the pfs_notification service.
Definition: psi_thread_bits.h:522
PSI_notification_cb_v3 session_connect
Definition: psi_thread_bits.h:525
PSI_notification_cb_v3 thread_destroy
Definition: psi_thread_bits.h:524
PSI_notification_cb_v3 session_change_user
Definition: psi_thread_bits.h:527
PSI_notification_cb_v3 thread_create
Definition: psi_thread_bits.h:523
PSI_notification_cb_v3 session_disconnect
Definition: psi_thread_bits.h:526
Performance Schema thread type: user/foreground or system/background.
Definition: psi_thread_bits.h:469
unsigned long long m_thread_internal_id
Definition: psi_thread_bits.h:471
char m_username[PSI_USERNAME_LENGTH]
Definition: psi_thread_bits.h:483
unsigned long long m_thread_os_id
Definition: psi_thread_bits.h:477
size_t m_username_length
Definition: psi_thread_bits.h:486
size_t m_groupname_length
Definition: psi_thread_bits.h:498
unsigned long m_processlist_id
Definition: psi_thread_bits.h:474
struct sockaddr_storage m_sock_addr
Raw socket address.
Definition: psi_thread_bits.h:501
socklen_t m_sock_addr_length
Length of address.
Definition: psi_thread_bits.h:504
char m_hostname[PSI_HOSTNAME_LENGTH]
Definition: psi_thread_bits.h:489
char m_groupname[PSI_NAME_LEN]
Definition: psi_thread_bits.h:495
size_t m_hostname_length
Definition: psi_thread_bits.h:492
void * m_user_data
Definition: psi_thread_bits.h:480
bool m_system_thread
Definition: psi_thread_bits.h:507
Thread instrument information.
Definition: psi_thread_bits.h:88
int m_volatility
Volatility index.
Definition: psi_thread_bits.h:105
const char * m_documentation
Documentation.
Definition: psi_thread_bits.h:107
const char * m_name
The name of the thread instrument to register.
Definition: psi_thread_bits.h:96
PSI_thread_key * m_key
Pointer to the key assigned to the registered thread.
Definition: psi_thread_bits.h:92
unsigned int m_flags
The flags of the thread to register.
Definition: psi_thread_bits.h:103
Thread instrument information.
Definition: psi_thread_bits.h:116
unsigned int m_flags
The flags of the thread to register.
Definition: psi_thread_bits.h:188
PSI_thread_key * m_key
Pointer to the key assigned to the registered thread.
Definition: psi_thread_bits.h:120
const char * m_os_name
The thread name to advertise to the operating system.
Definition: psi_thread_bits.h:179
int m_volatility
Volatility index.
Definition: psi_thread_bits.h:190
const char * m_name
The name of the thread instrument to register.
Definition: psi_thread_bits.h:124
const char * m_documentation
Documentation.
Definition: psi_thread_bits.h:192
Definition: my_thread_bits.h:51
command
Definition: version_token.cc:279
unsigned long id[MAX_DEAD]
Definition: xcom_base.cc:506