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