1C_MODE_START
2struct TABLE_SHARE;
3struct sql_digest_storage;
4struct PSI_mutex;
5typedef struct PSI_mutex PSI_mutex;
6struct PSI_rwlock;
7typedef struct PSI_rwlock PSI_rwlock;
8struct PSI_cond;
9typedef struct PSI_cond PSI_cond;
10struct PSI_table_share;
11typedef struct PSI_table_share PSI_table_share;
12struct PSI_table;
13typedef struct PSI_table PSI_table;
14struct PSI_thread;
15typedef struct PSI_thread PSI_thread;
16struct PSI_file;
17typedef struct PSI_file PSI_file;
18struct PSI_socket;
19typedef struct PSI_socket PSI_socket;
20struct PSI_table_locker;
21typedef struct PSI_table_locker PSI_table_locker;
22struct PSI_statement_locker;
23typedef struct PSI_statement_locker PSI_statement_locker;
24struct PSI_idle_locker;
25typedef struct PSI_idle_locker PSI_idle_locker;
26struct PSI_digest_locker;
27typedef struct PSI_digest_locker PSI_digest_locker;
28struct PSI_bootstrap
29{
30  void* (*get_interface)(int version);
31};
32typedef struct PSI_bootstrap PSI_bootstrap;
33struct PSI_mutex_locker;
34typedef struct PSI_mutex_locker PSI_mutex_locker;
35struct PSI_rwlock_locker;
36typedef struct PSI_rwlock_locker PSI_rwlock_locker;
37struct PSI_cond_locker;
38typedef struct PSI_cond_locker PSI_cond_locker;
39struct PSI_file_locker;
40typedef struct PSI_file_locker PSI_file_locker;
41struct PSI_socket_locker;
42typedef struct PSI_socket_locker PSI_socket_locker;
43enum PSI_mutex_operation
44{
45  PSI_MUTEX_LOCK= 0,
46  PSI_MUTEX_TRYLOCK= 1
47};
48typedef enum PSI_mutex_operation PSI_mutex_operation;
49enum PSI_rwlock_operation
50{
51  PSI_RWLOCK_READLOCK= 0,
52  PSI_RWLOCK_WRITELOCK= 1,
53  PSI_RWLOCK_TRYREADLOCK= 2,
54  PSI_RWLOCK_TRYWRITELOCK= 3
55};
56typedef enum PSI_rwlock_operation PSI_rwlock_operation;
57enum PSI_cond_operation
58{
59  PSI_COND_WAIT= 0,
60  PSI_COND_TIMEDWAIT= 1
61};
62typedef enum PSI_cond_operation PSI_cond_operation;
63enum PSI_file_operation
64{
65  PSI_FILE_CREATE= 0,
66  PSI_FILE_CREATE_TMP= 1,
67  PSI_FILE_OPEN= 2,
68  PSI_FILE_STREAM_OPEN= 3,
69  PSI_FILE_CLOSE= 4,
70  PSI_FILE_STREAM_CLOSE= 5,
71  PSI_FILE_READ= 6,
72  PSI_FILE_WRITE= 7,
73  PSI_FILE_SEEK= 8,
74  PSI_FILE_TELL= 9,
75  PSI_FILE_FLUSH= 10,
76  PSI_FILE_STAT= 11,
77  PSI_FILE_FSTAT= 12,
78  PSI_FILE_CHSIZE= 13,
79  PSI_FILE_DELETE= 14,
80  PSI_FILE_RENAME= 15,
81  PSI_FILE_SYNC= 16
82};
83typedef enum PSI_file_operation PSI_file_operation;
84enum PSI_table_io_operation
85{
86  PSI_TABLE_FETCH_ROW= 0,
87  PSI_TABLE_WRITE_ROW= 1,
88  PSI_TABLE_UPDATE_ROW= 2,
89  PSI_TABLE_DELETE_ROW= 3
90};
91typedef enum PSI_table_io_operation PSI_table_io_operation;
92enum PSI_table_lock_operation
93{
94  PSI_TABLE_LOCK= 0,
95  PSI_TABLE_EXTERNAL_LOCK= 1
96};
97typedef enum PSI_table_lock_operation PSI_table_lock_operation;
98enum PSI_socket_state
99{
100  PSI_SOCKET_STATE_IDLE= 1,
101  PSI_SOCKET_STATE_ACTIVE= 2
102};
103typedef enum PSI_socket_state PSI_socket_state;
104enum PSI_socket_operation
105{
106  PSI_SOCKET_CREATE= 0,
107  PSI_SOCKET_CONNECT= 1,
108  PSI_SOCKET_BIND= 2,
109  PSI_SOCKET_CLOSE= 3,
110  PSI_SOCKET_SEND= 4,
111  PSI_SOCKET_RECV= 5,
112  PSI_SOCKET_SENDTO= 6,
113  PSI_SOCKET_RECVFROM= 7,
114  PSI_SOCKET_SENDMSG= 8,
115  PSI_SOCKET_RECVMSG= 9,
116  PSI_SOCKET_SEEK= 10,
117  PSI_SOCKET_OPT= 11,
118  PSI_SOCKET_STAT= 12,
119  PSI_SOCKET_SHUTDOWN= 13,
120  PSI_SOCKET_SELECT= 14
121};
122typedef enum PSI_socket_operation PSI_socket_operation;
123typedef unsigned int PSI_mutex_key;
124typedef unsigned int PSI_rwlock_key;
125typedef unsigned int PSI_cond_key;
126typedef unsigned int PSI_thread_key;
127typedef unsigned int PSI_file_key;
128typedef unsigned int PSI_stage_key;
129typedef unsigned int PSI_statement_key;
130typedef unsigned int PSI_socket_key;
131struct PSI_mutex_info_v1
132{
133  PSI_mutex_key *m_key;
134  const char *m_name;
135  int m_flags;
136};
137struct PSI_rwlock_info_v1
138{
139  PSI_rwlock_key *m_key;
140  const char *m_name;
141  int m_flags;
142};
143struct PSI_cond_info_v1
144{
145  PSI_cond_key *m_key;
146  const char *m_name;
147  int m_flags;
148};
149struct PSI_thread_info_v1
150{
151  PSI_thread_key *m_key;
152  const char *m_name;
153  int m_flags;
154};
155struct PSI_file_info_v1
156{
157  PSI_file_key *m_key;
158  const char *m_name;
159  int m_flags;
160};
161struct PSI_stage_info_v1
162{
163  PSI_stage_key m_key;
164  const char *m_name;
165  int m_flags;
166};
167struct PSI_statement_info_v1
168{
169  PSI_statement_key m_key;
170  const char *m_name;
171  int m_flags;
172};
173struct PSI_socket_info_v1
174{
175  PSI_socket_key *m_key;
176  const char *m_name;
177  int m_flags;
178};
179struct PSI_idle_locker_state_v1
180{
181  uint m_flags;
182  struct PSI_thread *m_thread;
183  ulonglong m_timer_start;
184  ulonglong (*m_timer)(void);
185  void *m_wait;
186};
187struct PSI_mutex_locker_state_v1
188{
189  uint m_flags;
190  enum PSI_mutex_operation m_operation;
191  struct PSI_mutex *m_mutex;
192  struct PSI_thread *m_thread;
193  ulonglong m_timer_start;
194  ulonglong (*m_timer)(void);
195  void *m_wait;
196};
197struct PSI_rwlock_locker_state_v1
198{
199  uint m_flags;
200  enum PSI_rwlock_operation m_operation;
201  struct PSI_rwlock *m_rwlock;
202  struct PSI_thread *m_thread;
203  ulonglong m_timer_start;
204  ulonglong (*m_timer)(void);
205  void *m_wait;
206};
207struct PSI_cond_locker_state_v1
208{
209  uint m_flags;
210  enum PSI_cond_operation m_operation;
211  struct PSI_cond *m_cond;
212  struct PSI_mutex *m_mutex;
213  struct PSI_thread *m_thread;
214  ulonglong m_timer_start;
215  ulonglong (*m_timer)(void);
216  void *m_wait;
217};
218struct PSI_file_locker_state_v1
219{
220  uint m_flags;
221  enum PSI_file_operation m_operation;
222  struct PSI_file *m_file;
223  const char *m_name;
224  void *m_class;
225  struct PSI_thread *m_thread;
226  size_t m_number_of_bytes;
227  ulonglong m_timer_start;
228  ulonglong (*m_timer)(void);
229  void *m_wait;
230};
231struct PSI_table_locker_state_v1
232{
233  uint m_flags;
234  enum PSI_table_io_operation m_io_operation;
235  struct PSI_table *m_table;
236  struct PSI_table_share *m_table_share;
237  struct PSI_thread *m_thread;
238  ulonglong m_timer_start;
239  ulonglong (*m_timer)(void);
240  void *m_wait;
241  uint m_index;
242};
243struct PSI_statement_locker_state_v1
244{
245  my_bool m_discarded;
246  uchar m_no_index_used;
247  uchar m_no_good_index_used;
248  uint m_flags;
249  void *m_class;
250  struct PSI_thread *m_thread;
251  ulonglong m_timer_start;
252  ulonglong (*m_timer)(void);
253  void *m_statement;
254  ulonglong m_lock_time;
255  ulonglong m_rows_sent;
256  ulonglong m_rows_examined;
257  ulong m_created_tmp_disk_tables;
258  ulong m_created_tmp_tables;
259  ulong m_select_full_join;
260  ulong m_select_full_range_join;
261  ulong m_select_range;
262  ulong m_select_range_check;
263  ulong m_select_scan;
264  ulong m_sort_merge_passes;
265  ulong m_sort_range;
266  ulong m_sort_rows;
267  ulong m_sort_scan;
268  const struct sql_digest_storage *m_digest;
269  char m_schema_name[(64 * 3)];
270  uint m_schema_name_length;
271  uint m_cs_number;
272};
273struct PSI_socket_locker_state_v1
274{
275  uint m_flags;
276  struct PSI_socket *m_socket;
277  struct PSI_thread *m_thread;
278  size_t m_number_of_bytes;
279  ulonglong m_timer_start;
280  ulonglong (*m_timer)(void);
281  enum PSI_socket_operation m_operation;
282  const char* m_src_file;
283  int m_src_line;
284  void *m_wait;
285};
286typedef void (*register_mutex_v1_t)
287  (const char *category, struct PSI_mutex_info_v1 *info, int count);
288typedef void (*register_rwlock_v1_t)
289  (const char *category, struct PSI_rwlock_info_v1 *info, int count);
290typedef void (*register_cond_v1_t)
291  (const char *category, struct PSI_cond_info_v1 *info, int count);
292typedef void (*register_thread_v1_t)
293  (const char *category, struct PSI_thread_info_v1 *info, int count);
294typedef void (*register_file_v1_t)
295  (const char *category, struct PSI_file_info_v1 *info, int count);
296typedef void (*register_stage_v1_t)
297  (const char *category, struct PSI_stage_info_v1 **info, int count);
298typedef void (*register_statement_v1_t)
299  (const char *category, struct PSI_statement_info_v1 *info, int count);
300typedef void (*register_socket_v1_t)
301  (const char *category, struct PSI_socket_info_v1 *info, int count);
302typedef struct PSI_mutex* (*init_mutex_v1_t)
303  (PSI_mutex_key key, void *identity);
304typedef void (*destroy_mutex_v1_t)(struct PSI_mutex *mutex);
305typedef struct PSI_rwlock* (*init_rwlock_v1_t)
306  (PSI_rwlock_key key, void *identity);
307typedef void (*destroy_rwlock_v1_t)(struct PSI_rwlock *rwlock);
308typedef struct PSI_cond* (*init_cond_v1_t)
309  (PSI_cond_key key, void *identity);
310typedef void (*destroy_cond_v1_t)(struct PSI_cond *cond);
311typedef struct PSI_socket* (*init_socket_v1_t)
312  (PSI_socket_key key, const my_socket *fd,
313  const struct sockaddr *addr, socklen_t addr_len);
314typedef void (*destroy_socket_v1_t)(struct PSI_socket *socket);
315typedef struct PSI_table_share* (*get_table_share_v1_t)
316  (my_bool temporary, struct TABLE_SHARE *share);
317typedef void (*release_table_share_v1_t)(struct PSI_table_share *share);
318typedef void (*drop_table_share_v1_t)
319  (my_bool temporary, const char *schema_name, int schema_name_length,
320   const char *table_name, int table_name_length);
321typedef struct PSI_table* (*open_table_v1_t)
322  (struct PSI_table_share *share, const void *identity);
323typedef void (*unbind_table_v1_t)
324  (struct PSI_table *table);
325typedef PSI_table* (*rebind_table_v1_t)
326  (PSI_table_share *share, const void *identity, PSI_table *table);
327typedef void (*close_table_v1_t)(struct PSI_table *table);
328typedef void (*create_file_v1_t)(PSI_file_key key, const char *name,
329                                 File file);
330typedef int (*spawn_thread_v1_t)(PSI_thread_key key,
331                                 pthread_t *thread,
332                                 const pthread_attr_t *attr,
333                                 void *(*start_routine)(void*), void *arg);
334typedef struct PSI_thread* (*new_thread_v1_t)
335  (PSI_thread_key key, const void *identity, ulonglong thread_id);
336typedef void (*set_thread_id_v1_t)(struct PSI_thread *thread,
337                                   ulonglong id);
338typedef struct PSI_thread* (*get_thread_v1_t)(void);
339typedef void (*set_thread_user_v1_t)(const char *user, int user_len);
340typedef void (*set_thread_user_host_v1_t)(const char *user, int user_len,
341                                          const char *host, int host_len);
342typedef void (*set_thread_db_v1_t)(const char* db, int db_len);
343typedef void (*set_thread_command_v1_t)(int command);
344typedef void (*set_thread_start_time_v1_t)(time_t start_time);
345typedef void (*set_thread_state_v1_t)(const char* state);
346typedef void (*set_thread_info_v1_t)(const char* info, uint info_len);
347typedef void (*set_thread_v1_t)(struct PSI_thread *thread);
348typedef void (*delete_current_thread_v1_t)(void);
349typedef void (*delete_thread_v1_t)(struct PSI_thread *thread);
350typedef struct PSI_file_locker* (*get_thread_file_name_locker_v1_t)
351  (struct PSI_file_locker_state_v1 *state,
352   PSI_file_key key, enum PSI_file_operation op, const char *name,
353   const void *identity);
354typedef struct PSI_file_locker* (*get_thread_file_stream_locker_v1_t)
355  (struct PSI_file_locker_state_v1 *state,
356   struct PSI_file *file, enum PSI_file_operation op);
357typedef struct PSI_file_locker* (*get_thread_file_descriptor_locker_v1_t)
358  (struct PSI_file_locker_state_v1 *state,
359   File file, enum PSI_file_operation op);
360typedef void (*unlock_mutex_v1_t)
361  (struct PSI_mutex *mutex);
362typedef void (*unlock_rwlock_v1_t)
363  (struct PSI_rwlock *rwlock);
364typedef void (*signal_cond_v1_t)
365  (struct PSI_cond *cond);
366typedef void (*broadcast_cond_v1_t)
367  (struct PSI_cond *cond);
368typedef struct PSI_idle_locker* (*start_idle_wait_v1_t)
369  (struct PSI_idle_locker_state_v1 *state, const char *src_file, uint src_line);
370typedef void (*end_idle_wait_v1_t)
371  (struct PSI_idle_locker *locker);
372typedef struct PSI_mutex_locker* (*start_mutex_wait_v1_t)
373  (struct PSI_mutex_locker_state_v1 *state,
374   struct PSI_mutex *mutex,
375   enum PSI_mutex_operation op,
376   const char *src_file, uint src_line);
377typedef void (*end_mutex_wait_v1_t)
378  (struct PSI_mutex_locker *locker, int rc);
379typedef struct PSI_rwlock_locker* (*start_rwlock_rdwait_v1_t)
380  (struct PSI_rwlock_locker_state_v1 *state,
381   struct PSI_rwlock *rwlock,
382   enum PSI_rwlock_operation op,
383   const char *src_file, uint src_line);
384typedef void (*end_rwlock_rdwait_v1_t)
385  (struct PSI_rwlock_locker *locker, int rc);
386typedef struct PSI_rwlock_locker* (*start_rwlock_wrwait_v1_t)
387  (struct PSI_rwlock_locker_state_v1 *state,
388   struct PSI_rwlock *rwlock,
389   enum PSI_rwlock_operation op,
390   const char *src_file, uint src_line);
391typedef void (*end_rwlock_wrwait_v1_t)
392  (struct PSI_rwlock_locker *locker, int rc);
393typedef struct PSI_cond_locker* (*start_cond_wait_v1_t)
394  (struct PSI_cond_locker_state_v1 *state,
395   struct PSI_cond *cond,
396   struct PSI_mutex *mutex,
397   enum PSI_cond_operation op,
398   const char *src_file, uint src_line);
399typedef void (*end_cond_wait_v1_t)
400  (struct PSI_cond_locker *locker, int rc);
401typedef struct PSI_table_locker* (*start_table_io_wait_v1_t)
402  (struct PSI_table_locker_state_v1 *state,
403   struct PSI_table *table,
404   enum PSI_table_io_operation op,
405   uint index,
406   const char *src_file, uint src_line);
407typedef void (*end_table_io_wait_v1_t)(struct PSI_table_locker *locker);
408typedef struct PSI_table_locker* (*start_table_lock_wait_v1_t)
409  (struct PSI_table_locker_state_v1 *state,
410   struct PSI_table *table,
411   enum PSI_table_lock_operation op,
412   ulong flags,
413   const char *src_file, uint src_line);
414typedef void (*end_table_lock_wait_v1_t)(struct PSI_table_locker *locker);
415typedef void (*start_file_open_wait_v1_t)
416  (struct PSI_file_locker *locker, const char *src_file, uint src_line);
417typedef struct PSI_file* (*end_file_open_wait_v1_t)
418  (struct PSI_file_locker *locker, void *result);
419typedef void (*end_file_open_wait_and_bind_to_descriptor_v1_t)
420  (struct PSI_file_locker *locker, File file);
421typedef void (*start_file_wait_v1_t)
422  (struct PSI_file_locker *locker, size_t count,
423   const char *src_file, uint src_line);
424typedef void (*end_file_wait_v1_t)
425  (struct PSI_file_locker *locker, size_t count);
426typedef void (*start_file_close_wait_v1_t)
427  (struct PSI_file_locker *locker, const char *src_file, uint src_line);
428typedef void (*end_file_close_wait_v1_t)
429  (struct PSI_file_locker *locker, int rc);
430typedef void (*start_stage_v1_t)
431  (PSI_stage_key key, const char *src_file, int src_line);
432typedef void (*end_stage_v1_t) (void);
433typedef struct PSI_statement_locker* (*get_thread_statement_locker_v1_t)
434  (struct PSI_statement_locker_state_v1 *state,
435   PSI_statement_key key, const void *charset);
436typedef struct PSI_statement_locker* (*refine_statement_v1_t)
437  (struct PSI_statement_locker *locker,
438   PSI_statement_key key);
439typedef void (*start_statement_v1_t)
440  (struct PSI_statement_locker *locker,
441   const char *db, uint db_length,
442   const char *src_file, uint src_line);
443typedef void (*set_statement_text_v1_t)
444  (struct PSI_statement_locker *locker,
445   const char *text, uint text_len);
446typedef void (*set_statement_lock_time_t)
447  (struct PSI_statement_locker *locker, ulonglong lock_time);
448typedef void (*set_statement_rows_sent_t)
449  (struct PSI_statement_locker *locker, ulonglong count);
450typedef void (*set_statement_rows_examined_t)
451  (struct PSI_statement_locker *locker, ulonglong count);
452typedef void (*inc_statement_created_tmp_disk_tables_t)
453  (struct PSI_statement_locker *locker, ulong count);
454typedef void (*inc_statement_created_tmp_tables_t)
455  (struct PSI_statement_locker *locker, ulong count);
456typedef void (*inc_statement_select_full_join_t)
457  (struct PSI_statement_locker *locker, ulong count);
458typedef void (*inc_statement_select_full_range_join_t)
459  (struct PSI_statement_locker *locker, ulong count);
460typedef void (*inc_statement_select_range_t)
461  (struct PSI_statement_locker *locker, ulong count);
462typedef void (*inc_statement_select_range_check_t)
463  (struct PSI_statement_locker *locker, ulong count);
464typedef void (*inc_statement_select_scan_t)
465  (struct PSI_statement_locker *locker, ulong count);
466typedef void (*inc_statement_sort_merge_passes_t)
467  (struct PSI_statement_locker *locker, ulong count);
468typedef void (*inc_statement_sort_range_t)
469  (struct PSI_statement_locker *locker, ulong count);
470typedef void (*inc_statement_sort_rows_t)
471  (struct PSI_statement_locker *locker, ulong count);
472typedef void (*inc_statement_sort_scan_t)
473  (struct PSI_statement_locker *locker, ulong count);
474typedef void (*set_statement_no_index_used_t)
475  (struct PSI_statement_locker *locker);
476typedef void (*set_statement_no_good_index_used_t)
477  (struct PSI_statement_locker *locker);
478typedef void (*end_statement_v1_t)
479  (struct PSI_statement_locker *locker, void *stmt_da);
480typedef struct PSI_socket_locker* (*start_socket_wait_v1_t)
481  (struct PSI_socket_locker_state_v1 *state,
482   struct PSI_socket *socket,
483   enum PSI_socket_operation op,
484   size_t count,
485   const char *src_file, uint src_line);
486typedef void (*end_socket_wait_v1_t)
487  (struct PSI_socket_locker *locker, size_t count);
488typedef void (*set_socket_state_v1_t)(struct PSI_socket *socket,
489                                      enum PSI_socket_state state);
490typedef void (*set_socket_info_v1_t)(struct PSI_socket *socket,
491                                     const my_socket *fd,
492                                     const struct sockaddr *addr,
493                                     socklen_t addr_len);
494typedef void (*set_socket_thread_owner_v1_t)(struct PSI_socket *socket);
495typedef struct PSI_digest_locker * (*digest_start_v1_t)
496  (struct PSI_statement_locker *locker);
497typedef void (*digest_end_v1_t)
498  (struct PSI_digest_locker *locker, const struct sql_digest_storage *digest);
499typedef int (*set_thread_connect_attrs_v1_t)(const char *buffer, uint length,
500                                             const void *from_cs);
501struct PSI_v1
502{
503  register_mutex_v1_t register_mutex;
504  register_rwlock_v1_t register_rwlock;
505  register_cond_v1_t register_cond;
506  register_thread_v1_t register_thread;
507  register_file_v1_t register_file;
508  register_stage_v1_t register_stage;
509  register_statement_v1_t register_statement;
510  register_socket_v1_t register_socket;
511  init_mutex_v1_t init_mutex;
512  destroy_mutex_v1_t destroy_mutex;
513  init_rwlock_v1_t init_rwlock;
514  destroy_rwlock_v1_t destroy_rwlock;
515  init_cond_v1_t init_cond;
516  destroy_cond_v1_t destroy_cond;
517  init_socket_v1_t init_socket;
518  destroy_socket_v1_t destroy_socket;
519  get_table_share_v1_t get_table_share;
520  release_table_share_v1_t release_table_share;
521  drop_table_share_v1_t drop_table_share;
522  open_table_v1_t open_table;
523  unbind_table_v1_t unbind_table;
524  rebind_table_v1_t rebind_table;
525  close_table_v1_t close_table;
526  create_file_v1_t create_file;
527  spawn_thread_v1_t spawn_thread;
528  new_thread_v1_t new_thread;
529  set_thread_id_v1_t set_thread_id;
530  get_thread_v1_t get_thread;
531  set_thread_user_v1_t set_thread_user;
532  set_thread_user_host_v1_t set_thread_user_host;
533  set_thread_db_v1_t set_thread_db;
534  set_thread_command_v1_t set_thread_command;
535  set_thread_start_time_v1_t set_thread_start_time;
536  set_thread_state_v1_t set_thread_state;
537  set_thread_info_v1_t set_thread_info;
538  set_thread_v1_t set_thread;
539  delete_current_thread_v1_t delete_current_thread;
540  delete_thread_v1_t delete_thread;
541  get_thread_file_name_locker_v1_t get_thread_file_name_locker;
542  get_thread_file_stream_locker_v1_t get_thread_file_stream_locker;
543  get_thread_file_descriptor_locker_v1_t get_thread_file_descriptor_locker;
544  unlock_mutex_v1_t unlock_mutex;
545  unlock_rwlock_v1_t unlock_rwlock;
546  signal_cond_v1_t signal_cond;
547  broadcast_cond_v1_t broadcast_cond;
548  start_idle_wait_v1_t start_idle_wait;
549  end_idle_wait_v1_t end_idle_wait;
550  start_mutex_wait_v1_t start_mutex_wait;
551  end_mutex_wait_v1_t end_mutex_wait;
552  start_rwlock_rdwait_v1_t start_rwlock_rdwait;
553  end_rwlock_rdwait_v1_t end_rwlock_rdwait;
554  start_rwlock_wrwait_v1_t start_rwlock_wrwait;
555  end_rwlock_wrwait_v1_t end_rwlock_wrwait;
556  start_cond_wait_v1_t start_cond_wait;
557  end_cond_wait_v1_t end_cond_wait;
558  start_table_io_wait_v1_t start_table_io_wait;
559  end_table_io_wait_v1_t end_table_io_wait;
560  start_table_lock_wait_v1_t start_table_lock_wait;
561  end_table_lock_wait_v1_t end_table_lock_wait;
562  start_file_open_wait_v1_t start_file_open_wait;
563  end_file_open_wait_v1_t end_file_open_wait;
564  end_file_open_wait_and_bind_to_descriptor_v1_t
565    end_file_open_wait_and_bind_to_descriptor;
566  start_file_wait_v1_t start_file_wait;
567  end_file_wait_v1_t end_file_wait;
568  start_file_close_wait_v1_t start_file_close_wait;
569  end_file_close_wait_v1_t end_file_close_wait;
570  start_stage_v1_t start_stage;
571  end_stage_v1_t end_stage;
572  get_thread_statement_locker_v1_t get_thread_statement_locker;
573  refine_statement_v1_t refine_statement;
574  start_statement_v1_t start_statement;
575  set_statement_text_v1_t set_statement_text;
576  set_statement_lock_time_t set_statement_lock_time;
577  set_statement_rows_sent_t set_statement_rows_sent;
578  set_statement_rows_examined_t set_statement_rows_examined;
579  inc_statement_created_tmp_disk_tables_t inc_statement_created_tmp_disk_tables;
580  inc_statement_created_tmp_tables_t inc_statement_created_tmp_tables;
581  inc_statement_select_full_join_t inc_statement_select_full_join;
582  inc_statement_select_full_range_join_t inc_statement_select_full_range_join;
583  inc_statement_select_range_t inc_statement_select_range;
584  inc_statement_select_range_check_t inc_statement_select_range_check;
585  inc_statement_select_scan_t inc_statement_select_scan;
586  inc_statement_sort_merge_passes_t inc_statement_sort_merge_passes;
587  inc_statement_sort_range_t inc_statement_sort_range;
588  inc_statement_sort_rows_t inc_statement_sort_rows;
589  inc_statement_sort_scan_t inc_statement_sort_scan;
590  set_statement_no_index_used_t set_statement_no_index_used;
591  set_statement_no_good_index_used_t set_statement_no_good_index_used;
592  end_statement_v1_t end_statement;
593  start_socket_wait_v1_t start_socket_wait;
594  end_socket_wait_v1_t end_socket_wait;
595  set_socket_state_v1_t set_socket_state;
596  set_socket_info_v1_t set_socket_info;
597  set_socket_thread_owner_v1_t set_socket_thread_owner;
598  digest_start_v1_t digest_start;
599  digest_end_v1_t digest_end;
600  set_thread_connect_attrs_v1_t set_thread_connect_attrs;
601};
602typedef struct PSI_v1 PSI;
603typedef struct PSI_mutex_info_v1 PSI_mutex_info;
604typedef struct PSI_rwlock_info_v1 PSI_rwlock_info;
605typedef struct PSI_cond_info_v1 PSI_cond_info;
606typedef struct PSI_thread_info_v1 PSI_thread_info;
607typedef struct PSI_file_info_v1 PSI_file_info;
608typedef struct PSI_stage_info_v1 PSI_stage_info;
609typedef struct PSI_statement_info_v1 PSI_statement_info;
610typedef struct PSI_socket_info_v1 PSI_socket_info;
611typedef struct PSI_idle_locker_state_v1 PSI_idle_locker_state;
612typedef struct PSI_mutex_locker_state_v1 PSI_mutex_locker_state;
613typedef struct PSI_rwlock_locker_state_v1 PSI_rwlock_locker_state;
614typedef struct PSI_cond_locker_state_v1 PSI_cond_locker_state;
615typedef struct PSI_file_locker_state_v1 PSI_file_locker_state;
616typedef struct PSI_table_locker_state_v1 PSI_table_locker_state;
617typedef struct PSI_statement_locker_state_v1 PSI_statement_locker_state;
618typedef struct PSI_socket_locker_state_v1 PSI_socket_locker_state;
619extern MYSQL_PLUGIN_IMPORT my_bool pfs_enabled;
620extern MYSQL_PLUGIN_IMPORT PSI *PSI_server;
621C_MODE_END
622