MySQL 8.0.40
Source Code Documentation
psi_statement_bits.h
Go to the documentation of this file.
1/* Copyright (c) 2008, 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 COMPONENTS_SERVICES_BITS_PSI_STATEMENT_BITS_H
25#define COMPONENTS_SERVICES_BITS_PSI_STATEMENT_BITS_H
26
27#ifndef MYSQL_ABI_CHECK
28#include <stddef.h> /* size_t */
29#include <stdint.h> /* uint64_t */
30#endif
31
33
34/**
35 @file mysql/components/services/bits/psi_statement_bits.h
36 Performance schema instrumentation interface.
37
38 @defgroup psi_abi_statement Statement Instrumentation (ABI)
39 @ingroup psi_abi
40 @{
41*/
42
43/**
44 Instrumented statement key.
45 To instrument a statement, a statement key must be obtained using @c
46 register_statement.
47 Using a zero key always disable the instrumentation.
48*/
49typedef unsigned int PSI_statement_key;
50
51/**
52 @def PSI_STATEMENT_VERSION_1
53 Performance Schema Statement Interface number for version 1.
54 This version is obsolete.
55*/
56#define PSI_STATEMENT_VERSION_1 1
57
58/**
59 @def PSI_STATEMENT_VERSION_2
60 Performance Schema Statement Interface number for version 2.
61 This version is obsolete.
62*/
63#define PSI_STATEMENT_VERSION_2 2
64
65/**
66 @def PSI_STATEMENT_VERSION_3
67 Performance Schema Statement Interface number for version 3.
68 This version is obsolete.
69*/
70#define PSI_STATEMENT_VERSION_3 3
71
72/**
73 @def PSI_STATEMENT_VERSION_4
74 Performance Schema Statement Interface number for version 4.
75 This version is obsolete.
76*/
77#define PSI_STATEMENT_VERSION_4 4
78
79/**
80 @def PSI_STATEMENT_VERSION_5
81 Performance Schema Statement Interface number for version 5.
82 This version is supported.
83*/
84#define PSI_STATEMENT_VERSION_5 5
85
86/**
87 @def PSI_CURRENT_STATEMENT_VERSION
88 Performance Schema Statement Interface number for the most recent version.
89 The most current version is @c PSI_STATEMENT_VERSION_5
90*/
91#define PSI_CURRENT_STATEMENT_VERSION 5
92
93/**
94 Interface for an instrumented statement.
95 This is an opaque structure.
96*/
99
100/**
101 Interface for an instrumented prepared statement.
102 This is an opaque structure.
103*/
104struct PSI_prepared_stmt;
106
107/**
108 Interface for an instrumented statement digest operation.
109 This is an opaque structure.
110*/
111struct PSI_digest_locker;
113
114/**
115 Interface for an instrumented stored procedure share.
116 This is an opaque structure.
117*/
118struct PSI_sp_share;
120
121/**
122 Interface for an instrumented stored program.
123 This is an opaque structure.
124*/
125struct PSI_sp_locker;
127
128/**
129 Statement instrument information.
130 @since PSI_STATEMENT_VERSION_1
131 This structure is used to register an instrumented statement.
132*/
134 /** The registered statement key. */
136 /** The name of the statement instrument to register. */
137 const char *m_name;
138 /**
139 The flags of the statement instrument to register.
140 @sa PSI_FLAG_MUTABLE
141 */
142 unsigned int m_flags;
143 /** Documentation. */
144 const char *m_documentation;
145};
147
148/* Duplicate of NAME_LEN, to avoid dependency on mysql_com.h */
149#define PSI_SCHEMA_NAME_LEN (64 * 3)
150
151/* Opaque. */
152struct telemetry_session_t;
153
154/* Opaque. */
155struct telemetry_locker_t;
156
157/**
158 State data storage for @c get_thread_statement_locker_v5_t.
159 This structure provide temporary storage to a statement locker.
160 The content of this structure is considered opaque,
161 the fields are only hints of what an implementation
162 of the psi interface can use.
163 This memory is provided by the instrumented code for performance reasons.
164 @sa get_thread_statement_locker_v5_t
165*/
167 /** In prepare flag. */
169 /** Using secondary engine. */
171 /** Metric, no index used flag. */
172 unsigned char m_no_index_used;
173 /** Metric, no good index used flag. */
174 unsigned char m_no_good_index_used;
175 /** Internal state. */
176 unsigned int m_collect_flags;
177 /** Internal PFS flags. */
178 unsigned int m_pfs_flags;
179 /** Internal telemetry flags. */
180 unsigned int m_tel_flags;
181 /** Instrumentation class. */
182 void *m_class;
183 /** Current thread. */
185 /** Timer start. */
186 unsigned long long m_timer_start;
187 /** THREAD CPU time start. */
188 unsigned long long m_cpu_time_start;
189 /** State temporary data for CONTROLLED_MEMORY. */
191 /** State temporary data for MAX_CONTROLLED_MEMORY. */
193 /** State temporary data for TOTAL_MEMORY. */
195 /** State temporary data for MAX_TOTAL_MEMORY. */
197 /** Internal data. */
199 /** Locked time. */
200 unsigned long long m_lock_time;
201 /** Rows sent. */
202 unsigned long long m_rows_sent;
203 /** Rows examined. */
204 unsigned long long m_rows_examined;
205 /** Metric, temporary tables created on disk. */
207 /** Metric, temporary tables created. */
208 unsigned long m_created_tmp_tables;
209 /** Metric, number of select full join. */
210 unsigned long m_select_full_join;
211 /** Metric, number of select full range join. */
213 /** Metric, number of select range. */
214 unsigned long m_select_range;
215 /** Metric, number of select range check. */
216 unsigned long m_select_range_check;
217 /** Metric, number of select scan. */
218 unsigned long m_select_scan;
219 /** Metric, number of sort merge passes. */
220 unsigned long m_sort_merge_passes;
221 /** Metric, number of sort merge. */
222 unsigned long m_sort_range;
223 /** Metric, number of sort rows. */
224 unsigned long m_sort_rows;
225 /** Metric, number of sort scans. */
226 unsigned long m_sort_scan;
227 /** Statement digest. */
229 /** Current schema name. */
231 /** Length in bytes of @c m_schema_name. */
233 /** Statement character set number. */
234 unsigned int m_cs_number;
235 /** Statement query sample. */
236 const char *m_query_sample;
237 /** Length in bytes of @c m_query_sample. */
239 /** True if @c m_query_sample was truncated. */
241
244
245 /** Telemetry can force instruments creation regardless if
246 * the respective consumer is enabled or not through configuration. */
248
250 telemetry_session_t *m_telemetry_session;
251 telemetry_locker_t *m_telemetry_locker;
252};
254
256 /** Internal state. */
257 unsigned int m_flags;
258 /** Current thread. */
260 /** Timer start. */
261 unsigned long long m_timer_start;
262 /** Timer function. */
263 unsigned long long (*m_timer)(void);
264 /** Stored Procedure share. */
266};
268
269/**
270 Statement registration API.
271 @param category a category name
272 @param info an array of statement info to register
273 @param count the size of the info array
274*/
275typedef void (*register_statement_v1_t)(const char *category,
277 int count);
278
279/**
280 Get a statement instrumentation locker.
281 @param state data storage for the locker
282 @param key the statement instrumentation key
283 @param charset client character set
284 @param sp_share Parent stored procedure share, if any.
285 @return a statement locker, or NULL
286*/
287typedef struct PSI_statement_locker *(*get_thread_statement_locker_v5_t)(
289 const void *charset, PSI_sp_share *sp_share);
290
291/**
292 Refine a statement locker to a more specific key.
293 Note that only events declared mutable can be refined.
294 @param locker the statement locker for the current event
295 @param key the new key for the event
296 @sa PSI_FLAG_MUTABLE
297*/
298typedef struct PSI_statement_locker *(*refine_statement_v1_t)(
300
301/**
302 Start a new statement event.
303 @param locker the statement locker for this event
304 @param db the active database name for this statement
305 @param db_length the active database name length for this statement
306 @param src_file source file name
307 @param src_line source line number
308*/
309typedef void (*start_statement_v1_t)(struct PSI_statement_locker *locker,
310 const char *db, unsigned int db_length,
311 const char *src_file,
312 unsigned int src_line);
313
314/**
315 Set the statement text for a statement event.
316 Note that the statement text pointer must remain valid until end statement
317 is called.
318 @param locker the current statement locker
319 @param text the statement text
320 @param text_len the statement text length
321*/
322typedef void (*set_statement_text_v1_t)(struct PSI_statement_locker *locker,
323 const char *text,
324 unsigned int text_len);
325
326/**
327 Set a statement query id.
328 Introduced in MySQL 8.0.14
329 @param locker the statement locker
330 @param query_id the query id
331*/
332typedef void (*set_statement_query_id_t)(struct PSI_statement_locker *locker,
333 unsigned long long query_id);
334
335/**
336 Set a statement event lock time.
337 @param locker the statement locker
338 @param lock_time the locked time, in microseconds
339*/
340typedef void (*set_statement_lock_time_t)(struct PSI_statement_locker *locker,
341 unsigned long long lock_time);
342
343/**
344 Set a statement event rows sent metric.
345 @param locker the statement locker
346 @param count the number of rows sent
347*/
348typedef void (*set_statement_rows_sent_t)(struct PSI_statement_locker *locker,
349 unsigned long long count);
350
351/**
352 Set a statement event rows examined metric.
353 @param locker the statement locker
354 @param count the number of rows examined
355*/
357 struct PSI_statement_locker *locker, unsigned long long count);
358
359/**
360 Increment a statement event "created tmp disk tables" metric.
361 @param locker the statement locker
362 @param count the metric increment value
363*/
365 struct PSI_statement_locker *locker, unsigned long count);
366
367/**
368 Increment a statement event "created tmp tables" metric.
369 @param locker the statement locker
370 @param count the metric increment value
371*/
373 struct PSI_statement_locker *locker, unsigned long count);
374
375/**
376 Increment a statement event "select full join" metric.
377 @param locker the statement locker
378 @param count the metric increment value
379*/
381 struct PSI_statement_locker *locker, unsigned long count);
382
383/**
384 Increment a statement event "select full range join" metric.
385 @param locker the statement locker
386 @param count the metric increment value
387*/
389 struct PSI_statement_locker *locker, unsigned long count);
390
391/**
392 Increment a statement event "select range join" metric.
393 @param locker the statement locker
394 @param count the metric increment value
395*/
397 struct PSI_statement_locker *locker, unsigned long count);
398
399/**
400 Increment a statement event "select range check" metric.
401 @param locker the statement locker
402 @param count the metric increment value
403*/
405 struct PSI_statement_locker *locker, unsigned long count);
406
407/**
408 Increment a statement event "select scan" metric.
409 @param locker the statement locker
410 @param count the metric increment value
411*/
413 unsigned long count);
414
415/**
416 Increment a statement event "sort merge passes" metric.
417 @param locker the statement locker
418 @param count the metric increment value
419*/
421 struct PSI_statement_locker *locker, unsigned long count);
422
423/**
424 Increment a statement event "sort range" metric.
425 @param locker the statement locker
426 @param count the metric increment value
427*/
429 unsigned long count);
430
431/**
432 Increment a statement event "sort rows" metric.
433 @param locker the statement locker
434 @param count the metric increment value
435*/
436typedef void (*inc_statement_sort_rows_t)(struct PSI_statement_locker *locker,
437 unsigned long count);
438
439/**
440 Increment a statement event "sort scan" metric.
441 @param locker the statement locker
442 @param count the metric increment value
443*/
444typedef void (*inc_statement_sort_scan_t)(struct PSI_statement_locker *locker,
445 unsigned long count);
446
447/**
448 Set a statement event "no index used" metric.
449 @param locker the statement locker
450*/
452 struct PSI_statement_locker *locker);
453
454/**
455 Set a statement event "no good index used" metric.
456 @param locker the statement locker
457*/
459 struct PSI_statement_locker *locker);
460
461/**
462 Set a statement EXECUTION_ENGINE attribute.
463 @param locker the statement locker
464 @param secondary True for SECONDARY, false for PRIMARY.
465*/
467 struct PSI_statement_locker *locker, bool secondary);
468
469/**
470 End a statement event.
471 @param locker the statement locker
472 @param stmt_da the statement diagnostics area.
473 @sa Diagnostics_area
474*/
475typedef void (*end_statement_v1_t)(struct PSI_statement_locker *locker,
476 void *stmt_da);
477
478/**
479 Get a prepare statement.
480 @param identity Prepared statement identity, typically a memory address.
481 @param stmt_id Prepared statement identifier.
482 @param locker A statement locker for the running thread.
483 @param stmt_name Prepared statement name.
484 @param stmt_name_length Prepared statement name length.
485 @param sql_text Query text.
486 @param sql_text_length Query text length.
487*/
488typedef PSI_prepared_stmt *(*create_prepared_stmt_v1_t)(
489 void *identity, unsigned int stmt_id, PSI_statement_locker *locker,
490 const char *stmt_name, size_t stmt_name_length, const char *sql_text,
491 size_t sql_text_length);
492
493/**
494 destroy a prepare statement.
495 @param prepared_stmt prepared statement.
496*/
497typedef void (*destroy_prepared_stmt_v1_t)(PSI_prepared_stmt *prepared_stmt);
498
499/**
500 reprepare a prepare statement.
501 @param prepared_stmt prepared statement.
502*/
503typedef void (*reprepare_prepared_stmt_v1_t)(PSI_prepared_stmt *prepared_stmt);
504
505/**
506 Record a prepare statement instrumentation execute event.
507 @param locker a statement locker for the running thread.
508 @param prepared_stmt prepared statement.
509*/
511 PSI_prepared_stmt *prepared_stmt);
512
513/**
514 Set the statement text for a prepared statement event.
515 @param prepared_stmt prepared statement.
516 @param text the prepared statement text
517 @param text_len the prepared statement text length
518*/
519typedef void (*set_prepared_stmt_text_v1_t)(PSI_prepared_stmt *prepared_stmt,
520 const char *text,
521 unsigned int text_len);
522
523/**
524 Set a prepared statement EXECUTION_ENGINE attribute.
525 @param prepared_stmt prepared statement.
526 @param secondary True for SECONDARY, false for PRIMARY.
527*/
529 PSI_prepared_stmt *prepared_stmt, bool secondary);
530
531/**
532 Get a digest locker for the current statement.
533 @param locker a statement locker for the running thread
534*/
535typedef struct PSI_digest_locker *(*digest_start_v1_t)(
536 struct PSI_statement_locker *locker);
537
538/**
539 Add a computed digest to the current digest instrumentation.
540 @param locker a digest locker for the current statement
541 @param digest the computed digest
542*/
543typedef void (*digest_end_v1_t)(struct PSI_digest_locker *locker,
544 const struct sql_digest_storage *digest);
545
546/**
547 Acquire a sp share instrumentation.
548 @param object_type type of stored program
549 @param schema_name schema name of stored program
550 @param schema_name_length length of schema_name
551 @param object_name object name of stored program
552 @param object_name_length length of object_name
553 @return a stored program share instrumentation, or NULL
554*/
555typedef struct PSI_sp_share *(*get_sp_share_v1_t)(
556 unsigned int object_type, const char *schema_name,
557 unsigned int schema_name_length, const char *object_name,
558 unsigned int object_name_length);
559
560/**
561 Release a stored program share.
562 @param share the stored program share to release
563*/
564typedef void (*release_sp_share_v1_t)(struct PSI_sp_share *share);
565
566typedef PSI_sp_locker *(*start_sp_v1_t)(struct PSI_sp_locker_state_v1 *state,
567 struct PSI_sp_share *sp_share);
568
569typedef void (*end_sp_v1_t)(struct PSI_sp_locker *locker);
570
571typedef void (*drop_sp_v1_t)(unsigned int object_type, const char *schema_name,
572 unsigned int schema_name_length,
573 const char *object_name,
574 unsigned int object_name_length);
575
579
581 struct PSI_statement_locker *locker, bool with_query_attributes);
582
584
585/** @} (end of group psi_abi_statement) */
586
587#endif /* COMPONENTS_SERVICES_BITS_PSI_STATEMENT_BITS_H */
struct PSI_digest_locker PSI_digest_locker
Definition: psi_statement_bits.h:112
unsigned int PSI_statement_key
Instrumented statement key.
Definition: psi_statement_bits.h:49
void(* destroy_prepared_stmt_v1_t)(PSI_prepared_stmt *prepared_stmt)
destroy a prepare statement.
Definition: psi_statement_bits.h:497
void(* inc_statement_sort_merge_passes_t)(struct PSI_statement_locker *locker, unsigned long count)
Increment a statement event "sort merge passes" metric.
Definition: psi_statement_bits.h:420
void(* inc_statement_sort_rows_t)(struct PSI_statement_locker *locker, unsigned long count)
Increment a statement event "sort rows" metric.
Definition: psi_statement_bits.h:436
void(* inc_statement_select_full_range_join_t)(struct PSI_statement_locker *locker, unsigned long count)
Increment a statement event "select full range join" metric.
Definition: psi_statement_bits.h:388
void(* set_statement_text_v1_t)(struct PSI_statement_locker *locker, const char *text, unsigned int text_len)
Set the statement text for a statement event.
Definition: psi_statement_bits.h:322
void(* inc_statement_select_range_check_t)(struct PSI_statement_locker *locker, unsigned long count)
Increment a statement event "select range check" metric.
Definition: psi_statement_bits.h:404
void(* inc_statement_select_scan_t)(struct PSI_statement_locker *locker, unsigned long count)
Increment a statement event "select scan" metric.
Definition: psi_statement_bits.h:412
void(* set_prepared_stmt_secondary_engine_v3_t)(PSI_prepared_stmt *prepared_stmt, bool secondary)
Set a prepared statement EXECUTION_ENGINE attribute.
Definition: psi_statement_bits.h:528
void(* register_statement_v1_t)(const char *category, struct PSI_statement_info_v1 *info, int count)
Statement registration API.
Definition: psi_statement_bits.h:275
void(* reprepare_prepared_stmt_v1_t)(PSI_prepared_stmt *prepared_stmt)
reprepare a prepare statement.
Definition: psi_statement_bits.h:503
void(* statement_abort_telemetry_v5_t)(PSI_statement_locker *locker)
Definition: psi_statement_bits.h:583
void(* inc_statement_sort_scan_t)(struct PSI_statement_locker *locker, unsigned long count)
Increment a statement event "sort scan" metric.
Definition: psi_statement_bits.h:444
void(* execute_prepared_stmt_v1_t)(PSI_statement_locker *locker, PSI_prepared_stmt *prepared_stmt)
Record a prepare statement instrumentation execute event.
Definition: psi_statement_bits.h:510
void(* set_statement_no_index_used_t)(struct PSI_statement_locker *locker)
Set a statement event "no index used" metric.
Definition: psi_statement_bits.h:451
struct PSI_prepared_stmt PSI_prepared_stmt
Definition: psi_statement_bits.h:105
void(* inc_statement_sort_range_t)(struct PSI_statement_locker *locker, unsigned long count)
Increment a statement event "sort range" metric.
Definition: psi_statement_bits.h:428
void(* start_statement_v1_t)(struct PSI_statement_locker *locker, const char *db, unsigned int db_length, const char *src_file, unsigned int src_line)
Start a new statement event.
Definition: psi_statement_bits.h:309
struct PSI_sp_locker PSI_sp_locker
Definition: psi_statement_bits.h:126
void(* release_sp_share_v1_t)(struct PSI_sp_share *share)
Release a stored program share.
Definition: psi_statement_bits.h:564
void(* set_statement_query_id_t)(struct PSI_statement_locker *locker, unsigned long long query_id)
Set a statement query id.
Definition: psi_statement_bits.h:332
void(* set_statement_secondary_engine_v3_t)(struct PSI_statement_locker *locker, bool secondary)
Set a statement EXECUTION_ENGINE attribute.
Definition: psi_statement_bits.h:466
void(* drop_sp_v1_t)(unsigned int object_type, const char *schema_name, unsigned int schema_name_length, const char *object_name, unsigned int object_name_length)
Definition: psi_statement_bits.h:571
void(* set_statement_rows_examined_t)(struct PSI_statement_locker *locker, unsigned long long count)
Set a statement event rows examined metric.
Definition: psi_statement_bits.h:356
void(* set_statement_no_good_index_used_t)(struct PSI_statement_locker *locker)
Set a statement event "no good index used" metric.
Definition: psi_statement_bits.h:458
#define PSI_SCHEMA_NAME_LEN
Definition: psi_statement_bits.h:149
struct PSI_sp_share PSI_sp_share
Definition: psi_statement_bits.h:119
void(* digest_end_v1_t)(struct PSI_digest_locker *locker, const struct sql_digest_storage *digest)
Add a computed digest to the current digest instrumentation.
Definition: psi_statement_bits.h:543
void(* inc_statement_select_range_t)(struct PSI_statement_locker *locker, unsigned long count)
Increment a statement event "select range join" metric.
Definition: psi_statement_bits.h:396
void(* set_prepared_stmt_text_v1_t)(PSI_prepared_stmt *prepared_stmt, const char *text, unsigned int text_len)
Set the statement text for a prepared statement event.
Definition: psi_statement_bits.h:519
void(* end_sp_v1_t)(struct PSI_sp_locker *locker)
Definition: psi_statement_bits.h:569
void(* inc_statement_select_full_join_t)(struct PSI_statement_locker *locker, unsigned long count)
Increment a statement event "select full join" metric.
Definition: psi_statement_bits.h:380
void(* end_statement_v1_t)(struct PSI_statement_locker *locker, void *stmt_da)
End a statement event.
Definition: psi_statement_bits.h:475
void(* set_statement_lock_time_t)(struct PSI_statement_locker *locker, unsigned long long lock_time)
Set a statement event lock time.
Definition: psi_statement_bits.h:340
void(* set_statement_rows_sent_t)(struct PSI_statement_locker *locker, unsigned long long count)
Set a statement event rows sent metric.
Definition: psi_statement_bits.h:348
void(* notify_statement_query_attributes_v5_t)(struct PSI_statement_locker *locker, bool with_query_attributes)
Definition: psi_statement_bits.h:580
struct PSI_statement_locker PSI_statement_locker
Definition: psi_statement_bits.h:98
void(* inc_statement_created_tmp_disk_tables_t)(struct PSI_statement_locker *locker, unsigned long count)
Increment a statement event "created tmp disk tables" metric.
Definition: psi_statement_bits.h:364
void(* inc_statement_created_tmp_tables_t)(struct PSI_statement_locker *locker, unsigned long count)
Increment a statement event "created tmp tables" metric.
Definition: psi_statement_bits.h:372
struct PSI_thread PSI_thread
Definition: psi_thread_bits.h:82
static int count
Definition: myisam_ftdump.cc:43
Log info(cout, "NOTE")
const std::string charset("charset")
static const char * category
Definition: sha2_password.cc:170
Performance schema instrumentation interface.
required string key
Definition: replication_asynchronous_connection_failover.proto:60
Definition: psi_statement_bits.h:255
unsigned long long m_timer_start
Timer start.
Definition: psi_statement_bits.h:261
PSI_sp_share * m_sp_share
Stored Procedure share.
Definition: psi_statement_bits.h:265
unsigned long long(* m_timer)(void)
Timer function.
Definition: psi_statement_bits.h:263
unsigned int m_flags
Internal state.
Definition: psi_statement_bits.h:257
struct PSI_thread * m_thread
Current thread.
Definition: psi_statement_bits.h:259
Statement instrument information.
Definition: psi_statement_bits.h:133
const char * m_name
The name of the statement instrument to register.
Definition: psi_statement_bits.h:137
PSI_statement_key m_key
The registered statement key.
Definition: psi_statement_bits.h:135
const char * m_documentation
Documentation.
Definition: psi_statement_bits.h:144
unsigned int m_flags
The flags of the statement instrument to register.
Definition: psi_statement_bits.h:142
State data storage for get_thread_statement_locker_v5_t.
Definition: psi_statement_bits.h:166
unsigned long m_select_full_range_join
Metric, number of select full range join.
Definition: psi_statement_bits.h:212
unsigned long long m_timer_start
Timer start.
Definition: psi_statement_bits.h:186
unsigned char m_no_good_index_used
Metric, no good index used flag.
Definition: psi_statement_bits.h:174
unsigned int m_collect_flags
Internal state.
Definition: psi_statement_bits.h:176
unsigned int m_pfs_flags
Internal PFS flags.
Definition: psi_statement_bits.h:178
unsigned int m_schema_name_length
Length in bytes of m_schema_name.
Definition: psi_statement_bits.h:232
bool m_query_sample_truncated
True if m_query_sample was truncated.
Definition: psi_statement_bits.h:240
size_t m_controlled_stmt_size_start
State temporary data for MAX_CONTROLLED_MEMORY.
Definition: psi_statement_bits.h:192
unsigned long long m_rows_sent
Rows sent.
Definition: psi_statement_bits.h:202
size_t m_controlled_local_size_start
State temporary data for CONTROLLED_MEMORY.
Definition: psi_statement_bits.h:190
unsigned int m_cs_number
Statement character set number.
Definition: psi_statement_bits.h:234
void * m_statement
Internal data.
Definition: psi_statement_bits.h:198
unsigned long m_select_range
Metric, number of select range.
Definition: psi_statement_bits.h:214
unsigned long m_select_full_join
Metric, number of select full join.
Definition: psi_statement_bits.h:210
unsigned int m_tel_flags
Internal telemetry flags.
Definition: psi_statement_bits.h:180
size_t m_total_stmt_size_start
State temporary data for MAX_TOTAL_MEMORY.
Definition: psi_statement_bits.h:196
telemetry_locker_t * m_telemetry_locker
Definition: psi_statement_bits.h:251
unsigned long m_select_scan
Metric, number of select scan.
Definition: psi_statement_bits.h:218
uint64_t m_telemetry_scope
Telemetry can force instruments creation regardless if the respective consumer is enabled or not thro...
Definition: psi_statement_bits.h:247
char m_schema_name[PSI_SCHEMA_NAME_LEN]
Current schema name.
Definition: psi_statement_bits.h:230
unsigned char m_no_index_used
Metric, no index used flag.
Definition: psi_statement_bits.h:172
PSI_sp_share * m_parent_sp_share
Definition: psi_statement_bits.h:242
unsigned long m_created_tmp_disk_tables
Metric, temporary tables created on disk.
Definition: psi_statement_bits.h:206
size_t m_total_local_size_start
State temporary data for TOTAL_MEMORY.
Definition: psi_statement_bits.h:194
unsigned long m_sort_rows
Metric, number of sort rows.
Definition: psi_statement_bits.h:224
unsigned long m_created_tmp_tables
Metric, temporary tables created.
Definition: psi_statement_bits.h:208
bool m_in_prepare
In prepare flag.
Definition: psi_statement_bits.h:168
unsigned long long m_rows_examined
Rows examined.
Definition: psi_statement_bits.h:204
unsigned long m_sort_merge_passes
Metric, number of sort merge passes.
Definition: psi_statement_bits.h:220
const struct sql_digest_storage * m_digest
Statement digest.
Definition: psi_statement_bits.h:228
unsigned long long m_lock_time
Locked time.
Definition: psi_statement_bits.h:200
unsigned long m_sort_range
Metric, number of sort merge.
Definition: psi_statement_bits.h:222
bool m_secondary
Using secondary engine.
Definition: psi_statement_bits.h:170
const char * m_query_sample
Statement query sample.
Definition: psi_statement_bits.h:236
unsigned long m_select_range_check
Metric, number of select range check.
Definition: psi_statement_bits.h:216
PSI_prepared_stmt * m_parent_prepared_stmt
Definition: psi_statement_bits.h:243
void * m_telemetry
Definition: psi_statement_bits.h:249
unsigned long m_sort_scan
Metric, number of sort scans.
Definition: psi_statement_bits.h:226
telemetry_session_t * m_telemetry_session
Definition: psi_statement_bits.h:250
struct PSI_thread * m_thread
Current thread.
Definition: psi_statement_bits.h:184
unsigned long long m_cpu_time_start
THREAD CPU time start.
Definition: psi_statement_bits.h:188
unsigned int m_query_sample_length
Length in bytes of m_query_sample.
Definition: psi_statement_bits.h:238
void * m_class
Instrumentation class.
Definition: psi_statement_bits.h:182
Structure to store token count/array for a statement on which digest is to be calculated.
Definition: sql_digest.h:98