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