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