16 #ifndef MYSQL_PERFORMANCE_SCHEMA_INTERFACE_H
17 #define MYSQL_PERFORMANCE_SCHEMA_INTERFACE_H
19 #ifdef EMBEDDED_LIBRARY
20 #define DISABLE_PSI_MUTEX
21 #define DISABLE_PSI_RWLOCK
22 #define DISABLE_PSI_COND
23 #define DISABLE_PSI_FILE
24 #define DISABLE_PSI_TABLE
25 #define DISABLE_PSI_SOCKET
26 #define DISABLE_PSI_STAGE
27 #define DISABLE_PSI_STATEMENT
28 #define DISABLE_PSI_IDLE
29 #define DISABLE_PSI_STATEMENT_DIGEST
32 #ifndef MY_GLOBAL_INCLUDED
40 #error "You must include my_global.h in the code for the build to be correct."
57 struct OPAQUE_LEX_YYSTYPE;
73 typedef struct PSI_mutex PSI_mutex;
80 typedef struct PSI_rwlock PSI_rwlock;
87 typedef struct PSI_cond PSI_cond;
93 struct PSI_table_share;
94 typedef struct PSI_table_share PSI_table_share;
101 typedef struct PSI_table PSI_table;
108 typedef struct PSI_thread PSI_thread;
115 typedef struct PSI_file PSI_file;
122 typedef struct PSI_socket PSI_socket;
128 struct PSI_table_locker;
129 typedef struct PSI_table_locker PSI_table_locker;
135 struct PSI_statement_locker;
136 typedef struct PSI_statement_locker PSI_statement_locker;
142 struct PSI_idle_locker;
143 typedef struct PSI_idle_locker PSI_idle_locker;
149 struct PSI_digest_locker;
150 typedef struct PSI_digest_locker PSI_digest_locker;
168 void* (*get_interface)(
int version);
172 #ifdef HAVE_PSI_INTERFACE
193 #ifndef DISABLE_PSI_MUTEX
194 #define HAVE_PSI_MUTEX_INTERFACE
203 #ifndef DISABLE_PSI_RWLOCK
204 #define HAVE_PSI_RWLOCK_INTERFACE
213 #ifndef DISABLE_PSI_COND
214 #define HAVE_PSI_COND_INTERFACE
223 #ifndef DISABLE_PSI_FILE
224 #define HAVE_PSI_FILE_INTERFACE
232 #ifndef DISABLE_PSI_THREAD
233 #define HAVE_PSI_THREAD_INTERFACE
242 #ifndef DISABLE_PSI_TABLE
243 #define HAVE_PSI_TABLE_INTERFACE
252 #ifndef DISABLE_PSI_STAGE
253 #define HAVE_PSI_STAGE_INTERFACE
262 #ifndef DISABLE_PSI_STATEMENT
263 #define HAVE_PSI_STATEMENT_INTERFACE
271 #ifndef DISABLE_PSI_STATEMENT
272 #ifndef DISABLE_PSI_STATEMENT_DIGEST
273 #define HAVE_PSI_STATEMENT_DIGEST_INTERFACE
283 #ifndef DISABLE_PSI_SOCKET
284 #define HAVE_PSI_SOCKET_INTERFACE
293 #ifndef DISABLE_PSI_IDLE
294 #define HAVE_PSI_IDLE_INTERFACE
302 #define PSI_VERSION_1 1
309 #define PSI_VERSION_2 2
316 #define PSI_CURRENT_VERSION 1
328 struct PSI_mutex_locker;
329 typedef struct PSI_mutex_locker PSI_mutex_locker;
335 struct PSI_rwlock_locker;
336 typedef struct PSI_rwlock_locker PSI_rwlock_locker;
342 struct PSI_cond_locker;
343 typedef struct PSI_cond_locker PSI_cond_locker;
349 struct PSI_file_locker;
350 typedef struct PSI_file_locker PSI_file_locker;
356 struct PSI_socket_locker;
357 typedef struct PSI_socket_locker PSI_socket_locker;
360 enum PSI_mutex_operation
367 typedef enum PSI_mutex_operation PSI_mutex_operation;
370 enum PSI_rwlock_operation
373 PSI_RWLOCK_READLOCK= 0,
375 PSI_RWLOCK_WRITELOCK= 1,
377 PSI_RWLOCK_TRYREADLOCK= 2,
379 PSI_RWLOCK_TRYWRITELOCK= 3
381 typedef enum PSI_rwlock_operation PSI_rwlock_operation;
384 enum PSI_cond_operation
389 PSI_COND_TIMEDWAIT= 1
391 typedef enum PSI_cond_operation PSI_cond_operation;
394 enum PSI_file_operation
399 PSI_FILE_CREATE_TMP= 1,
403 PSI_FILE_STREAM_OPEN= 3,
407 PSI_FILE_STREAM_CLOSE= 5,
437 typedef enum PSI_file_operation PSI_file_operation;
440 enum PSI_table_io_operation
443 PSI_TABLE_FETCH_ROW= 0,
445 PSI_TABLE_WRITE_ROW= 1,
447 PSI_TABLE_UPDATE_ROW= 2,
449 PSI_TABLE_DELETE_ROW= 3
451 typedef enum PSI_table_io_operation PSI_table_io_operation;
454 enum PSI_table_lock_operation
459 PSI_TABLE_EXTERNAL_LOCK= 1
461 typedef enum PSI_table_lock_operation PSI_table_lock_operation;
464 enum PSI_socket_state
467 PSI_SOCKET_STATE_IDLE= 1,
469 PSI_SOCKET_STATE_ACTIVE= 2
471 typedef enum PSI_socket_state PSI_socket_state;
474 enum PSI_socket_operation
477 PSI_SOCKET_CREATE= 0,
479 PSI_SOCKET_CONNECT= 1,
489 PSI_SOCKET_SENDTO= 6,
491 PSI_SOCKET_RECVFROM= 7,
493 PSI_SOCKET_SENDMSG= 8,
495 PSI_SOCKET_RECVMSG= 9,
503 PSI_SOCKET_SHUTDOWN= 13,
505 PSI_SOCKET_SELECT= 14
507 typedef enum PSI_socket_operation PSI_socket_operation;
514 typedef unsigned int PSI_mutex_key;
522 typedef unsigned int PSI_rwlock_key;
530 typedef unsigned int PSI_cond_key;
538 typedef unsigned int PSI_thread_key;
545 typedef unsigned int PSI_file_key;
552 typedef unsigned int PSI_stage_key;
559 typedef unsigned int PSI_statement_key;
566 typedef unsigned int PSI_socket_key;
593 #define PSI_FLAG_GLOBAL (1 << 0)
600 #define PSI_FLAG_MUTABLE (1 << 1)
619 struct PSI_mutex_info_v1
624 PSI_mutex_key *m_key;
641 struct PSI_rwlock_info_v1
646 PSI_rwlock_key *m_key;
663 struct PSI_cond_info_v1
685 struct PSI_thread_info_v1
690 PSI_thread_key *m_key;
707 struct PSI_file_info_v1
729 struct PSI_stage_info_v1
744 struct PSI_statement_info_v1
747 PSI_statement_key m_key;
759 struct PSI_socket_info_v1
764 PSI_socket_key *m_key;
785 struct PSI_idle_locker_state_v1
790 struct PSI_thread *m_thread;
792 ulonglong m_timer_start;
794 ulonglong (*m_timer)(void);
808 struct PSI_mutex_locker_state_v1
813 enum PSI_mutex_operation m_operation;
815 struct PSI_mutex *m_mutex;
817 struct PSI_thread *m_thread;
819 ulonglong m_timer_start;
821 ulonglong (*m_timer)(void);
836 struct PSI_rwlock_locker_state_v1
841 enum PSI_rwlock_operation m_operation;
843 struct PSI_rwlock *m_rwlock;
845 struct PSI_thread *m_thread;
847 ulonglong m_timer_start;
849 ulonglong (*m_timer)(void);
863 struct PSI_cond_locker_state_v1
868 enum PSI_cond_operation m_operation;
870 struct PSI_cond *m_cond;
872 struct PSI_mutex *m_mutex;
874 struct PSI_thread *m_thread;
876 ulonglong m_timer_start;
878 ulonglong (*m_timer)(void);
894 struct PSI_file_locker_state_v1
899 enum PSI_file_operation m_operation;
901 struct PSI_file *m_file;
907 struct PSI_thread *m_thread;
909 size_t m_number_of_bytes;
911 ulonglong m_timer_start;
913 ulonglong (*m_timer)(void);
929 struct PSI_table_locker_state_v1
934 enum PSI_table_io_operation m_io_operation;
936 struct PSI_table *m_table;
938 struct PSI_table_share *m_table_share;
940 struct PSI_thread *m_thread;
942 ulonglong m_timer_start;
944 ulonglong (*m_timer)(void);
955 #define PSI_MAX_DIGEST_STORAGE_SIZE 1024
961 struct PSI_digest_storage
966 uint m_charset_number;
967 unsigned char m_token_array[PSI_MAX_DIGEST_STORAGE_SIZE];
969 typedef struct PSI_digest_storage PSI_digest_storage;
971 struct PSI_digest_locker_state
974 PSI_digest_storage m_digest_storage;
976 typedef struct PSI_digest_locker_state PSI_digest_locker_state;
979 #define PSI_SCHEMA_NAME_LEN (64 * 3)
991 struct PSI_statement_locker_state_v1
996 uchar m_no_index_used;
998 uchar m_no_good_index_used;
1004 struct PSI_thread *m_thread;
1006 ulonglong m_timer_start;
1008 ulonglong (*m_timer)(void);
1012 ulonglong m_lock_time;
1014 ulonglong m_rows_sent;
1016 ulonglong m_rows_examined;
1018 ulong m_created_tmp_disk_tables;
1020 ulong m_created_tmp_tables;
1022 ulong m_select_full_join;
1024 ulong m_select_full_range_join;
1026 ulong m_select_range;
1028 ulong m_select_range_check;
1030 ulong m_select_scan;
1032 ulong m_sort_merge_passes;
1040 PSI_digest_locker_state m_digest_state;
1042 char m_schema_name[PSI_SCHEMA_NAME_LEN];
1044 uint m_schema_name_length;
1056 struct PSI_socket_locker_state_v1
1061 struct PSI_socket *m_socket;
1063 struct PSI_thread *m_thread;
1065 size_t m_number_of_bytes;
1067 ulonglong m_timer_start;
1069 ulonglong (*m_timer)(void);
1071 enum PSI_socket_operation m_operation;
1073 const char* m_src_file;
1088 typedef void (*register_mutex_v1_t)
1089 (
const char *category,
struct PSI_mutex_info_v1 *info,
int count);
1097 typedef void (*register_rwlock_v1_t)
1098 (
const char *category,
struct PSI_rwlock_info_v1 *info,
int count);
1106 typedef void (*register_cond_v1_t)
1107 (
const char *category,
struct PSI_cond_info_v1 *info,
int count);
1115 typedef void (*register_thread_v1_t)
1116 (
const char *category,
struct PSI_thread_info_v1 *info,
int count);
1124 typedef void (*register_file_v1_t)
1125 (
const char *category,
struct PSI_file_info_v1 *info,
int count);
1133 typedef void (*register_stage_v1_t)
1134 (
const char *category,
struct PSI_stage_info_v1 **info,
int count);
1142 typedef void (*register_statement_v1_t)
1143 (
const char *category,
struct PSI_statement_info_v1 *info,
int count);
1151 typedef void (*register_socket_v1_t)
1152 (
const char *category,
struct PSI_socket_info_v1 *info,
int count);
1160 typedef struct PSI_mutex* (*init_mutex_v1_t)
1161 (PSI_mutex_key key,
const void *identity);
1167 typedef void (*destroy_mutex_v1_t)(
struct PSI_mutex *mutex);
1175 typedef struct PSI_rwlock* (*init_rwlock_v1_t)
1176 (PSI_rwlock_key key,
const void *identity);
1182 typedef void (*destroy_rwlock_v1_t)(
struct PSI_rwlock *rwlock);
1190 typedef struct PSI_cond* (*init_cond_v1_t)
1191 (PSI_cond_key key,
const void *identity);
1197 typedef void (*destroy_cond_v1_t)(
struct PSI_cond *cond);
1207 typedef struct PSI_socket* (*init_socket_v1_t)
1208 (PSI_socket_key key,
const my_socket *fd,
1209 const struct sockaddr *addr, socklen_t addr_len);
1215 typedef void (*destroy_socket_v1_t)(
struct PSI_socket *socket);
1223 typedef struct PSI_table_share* (*get_table_share_v1_t)
1230 typedef void (*release_table_share_v1_t)(
struct PSI_table_share *share);
1240 typedef void (*drop_table_share_v1_t)
1241 (my_bool temporary,
const char *schema_name,
int schema_name_length,
1242 const char *
table_name,
int table_name_length);
1250 typedef struct PSI_table* (*open_table_v1_t)
1251 (
struct PSI_table_share *share,
const void *identity);
1258 typedef void (*unbind_table_v1_t)
1259 (
struct PSI_table *
table);
1267 typedef PSI_table* (*rebind_table_v1_t)
1268 (PSI_table_share *share,
const void *identity, PSI_table *
table);
1275 typedef void (*close_table_v1_t)(
struct PSI_table *
table);
1285 typedef void (*create_file_v1_t)(PSI_file_key key,
const char *
name,
1297 typedef int (*spawn_thread_v1_t)(PSI_thread_key key,
1299 const pthread_attr_t *attr,
1300 void *(*start_routine)(
void*),
void *arg);
1308 typedef struct PSI_thread* (*new_thread_v1_t)
1309 (PSI_thread_key key,
const void *identity, ulonglong thread_id);
1316 typedef void (*set_thread_id_v1_t)(
struct PSI_thread *thread,
1326 typedef struct PSI_thread* (*get_thread_v1_t)(void);
1333 typedef void (*set_thread_user_v1_t)(
const char *user,
int user_len);
1342 typedef void (*set_thread_user_host_v1_t)(
const char *user,
int user_len,
1343 const char *host,
int host_len);
1350 typedef void (*set_thread_db_v1_t)(
const char* db,
int db_len);
1356 typedef void (*set_thread_command_v1_t)(
int command);
1362 typedef void (*set_thread_start_time_v1_t)(time_t start_time);
1368 typedef void (*set_thread_state_v1_t)(
const char* state);
1375 typedef void (*set_thread_info_v1_t)(
const char* info, uint info_len);
1386 typedef void (*set_thread_v1_t)(
struct PSI_thread *thread);
1389 typedef void (*delete_current_thread_v1_t)(void);
1392 typedef void (*delete_thread_v1_t)(
struct PSI_thread *thread);
1403 typedef struct PSI_file_locker* (*get_thread_file_name_locker_v1_t)
1404 (
struct PSI_file_locker_state_v1 *state,
1405 PSI_file_key key,
enum PSI_file_operation op,
const char *
name,
1406 const void *identity);
1415 typedef struct PSI_file_locker* (*get_thread_file_stream_locker_v1_t)
1416 (
struct PSI_file_locker_state_v1 *state,
1417 struct PSI_file *
file,
enum PSI_file_operation op);
1426 typedef struct PSI_file_locker* (*get_thread_file_descriptor_locker_v1_t)
1427 (
struct PSI_file_locker_state_v1 *state,
1428 File
file,
enum PSI_file_operation op);
1434 typedef void (*unlock_mutex_v1_t)
1435 (
struct PSI_mutex *mutex);
1441 typedef void (*unlock_rwlock_v1_t)
1442 (
struct PSI_rwlock *rwlock);
1448 typedef void (*signal_cond_v1_t)
1449 (
struct PSI_cond *cond);
1455 typedef void (*broadcast_cond_v1_t)
1456 (
struct PSI_cond *cond);
1458 typedef struct PSI_idle_locker* (*start_idle_wait_v1_t)
1459 (
struct PSI_idle_locker_state_v1 *state,
const char *src_file, uint src_line);
1461 typedef void (*end_idle_wait_v1_t)
1462 (
struct PSI_idle_locker *locker);
1473 typedef struct PSI_mutex_locker* (*start_mutex_wait_v1_t)
1474 (
struct PSI_mutex_locker_state_v1 *state,
1475 struct PSI_mutex *mutex,
1476 enum PSI_mutex_operation op,
1477 const char *src_file, uint src_line);
1484 typedef void (*end_mutex_wait_v1_t)
1485 (
struct PSI_mutex_locker *locker,
int rc);
1492 typedef struct PSI_rwlock_locker* (*start_rwlock_rdwait_v1_t)
1493 (
struct PSI_rwlock_locker_state_v1 *state,
1494 struct PSI_rwlock *rwlock,
1495 enum PSI_rwlock_operation op,
1496 const char *src_file, uint src_line);
1503 typedef void (*end_rwlock_rdwait_v1_t)
1504 (
struct PSI_rwlock_locker *locker,
int rc);
1511 typedef struct PSI_rwlock_locker* (*start_rwlock_wrwait_v1_t)
1512 (
struct PSI_rwlock_locker_state_v1 *state,
1513 struct PSI_rwlock *rwlock,
1514 enum PSI_rwlock_operation op,
1515 const char *src_file, uint src_line);
1522 typedef void (*end_rwlock_wrwait_v1_t)
1523 (
struct PSI_rwlock_locker *locker,
int rc);
1530 typedef struct PSI_cond_locker* (*start_cond_wait_v1_t)
1531 (
struct PSI_cond_locker_state_v1 *state,
1532 struct PSI_cond *cond,
1533 struct PSI_mutex *mutex,
1534 enum PSI_cond_operation op,
1535 const char *src_file, uint src_line);
1542 typedef void (*end_cond_wait_v1_t)
1543 (
struct PSI_cond_locker *locker,
int rc);
1551 typedef struct PSI_table_locker* (*start_table_io_wait_v1_t)
1552 (
struct PSI_table_locker_state_v1 *state,
1553 struct PSI_table *
table,
1554 enum PSI_table_io_operation op,
1556 const char *src_file, uint src_line);
1562 typedef void (*end_table_io_wait_v1_t)(
struct PSI_table_locker *locker);
1570 typedef struct PSI_table_locker* (*start_table_lock_wait_v1_t)
1571 (
struct PSI_table_locker_state_v1 *state,
1572 struct PSI_table *
table,
1573 enum PSI_table_lock_operation op,
1575 const char *src_file, uint src_line);
1581 typedef void (*end_table_lock_wait_v1_t)(
struct PSI_table_locker *locker);
1590 typedef void (*start_file_open_wait_v1_t)
1591 (
struct PSI_file_locker *locker,
const char *src_file, uint src_line);
1599 typedef struct PSI_file* (*end_file_open_wait_v1_t)
1600 (
struct PSI_file_locker *locker,
void *result);
1607 typedef void (*end_file_open_wait_and_bind_to_descriptor_v1_t)
1608 (
struct PSI_file_locker *locker, File
file);
1618 typedef void (*start_file_wait_v1_t)
1619 (
struct PSI_file_locker *locker,
size_t count,
1620 const char *src_file, uint src_line);
1634 typedef void (*end_file_wait_v1_t)
1635 (
struct PSI_file_locker *locker,
size_t count);
1644 typedef void (*start_file_close_wait_v1_t)
1645 (
struct PSI_file_locker *locker,
const char *src_file, uint src_line);
1653 typedef void (*end_file_close_wait_v1_t)
1654 (
struct PSI_file_locker *locker,
int rc);
1662 typedef void (*start_stage_v1_t)
1663 (PSI_stage_key key,
const char *src_file,
int src_line);
1666 typedef void (*end_stage_v1_t) (void);
1675 typedef struct PSI_statement_locker* (*get_thread_statement_locker_v1_t)
1676 (
struct PSI_statement_locker_state_v1 *state,
1677 PSI_statement_key key,
const void *charset);
1686 typedef struct PSI_statement_locker* (*refine_statement_v1_t)
1687 (
struct PSI_statement_locker *locker,
1688 PSI_statement_key key);
1698 typedef void (*start_statement_v1_t)
1699 (
struct PSI_statement_locker *locker,
1700 const char *db, uint db_length,
1701 const char *src_file, uint src_line);
1709 typedef void (*set_statement_text_v1_t)
1710 (
struct PSI_statement_locker *locker,
1711 const char *text, uint text_len);
1718 typedef void (*set_statement_lock_time_t)
1719 (
struct PSI_statement_locker *locker, ulonglong lock_time);
1726 typedef void (*set_statement_rows_sent_t)
1727 (
struct PSI_statement_locker *locker, ulonglong count);
1734 typedef void (*set_statement_rows_examined_t)
1735 (
struct PSI_statement_locker *locker, ulonglong count);
1742 typedef void (*inc_statement_created_tmp_disk_tables_t)
1743 (
struct PSI_statement_locker *locker, ulong count);
1750 typedef void (*inc_statement_created_tmp_tables_t)
1751 (
struct PSI_statement_locker *locker, ulong count);
1758 typedef void (*inc_statement_select_full_join_t)
1759 (
struct PSI_statement_locker *locker, ulong count);
1766 typedef void (*inc_statement_select_full_range_join_t)
1767 (
struct PSI_statement_locker *locker, ulong count);
1774 typedef void (*inc_statement_select_range_t)
1775 (
struct PSI_statement_locker *locker, ulong count);
1782 typedef void (*inc_statement_select_range_check_t)
1783 (
struct PSI_statement_locker *locker, ulong count);
1790 typedef void (*inc_statement_select_scan_t)
1791 (
struct PSI_statement_locker *locker, ulong count);
1798 typedef void (*inc_statement_sort_merge_passes_t)
1799 (
struct PSI_statement_locker *locker, ulong count);
1806 typedef void (*inc_statement_sort_range_t)
1807 (
struct PSI_statement_locker *locker, ulong count);
1814 typedef void (*inc_statement_sort_rows_t)
1815 (
struct PSI_statement_locker *locker, ulong count);
1822 typedef void (*inc_statement_sort_scan_t)
1823 (
struct PSI_statement_locker *locker, ulong count);
1830 typedef void (*set_statement_no_index_used_t)
1831 (
struct PSI_statement_locker *locker);
1838 typedef void (*set_statement_no_good_index_used_t)
1839 (
struct PSI_statement_locker *locker);
1847 typedef void (*end_statement_v1_t)
1848 (
struct PSI_statement_locker *locker,
void *stmt_da);
1858 typedef struct PSI_socket_locker* (*start_socket_wait_v1_t)
1859 (
struct PSI_socket_locker_state_v1 *state,
1860 struct PSI_socket *socket,
1861 enum PSI_socket_operation op,
1863 const char *src_file, uint src_line);
1875 typedef void (*end_socket_wait_v1_t)
1876 (
struct PSI_socket_locker *locker,
size_t count);
1883 typedef void (*set_socket_state_v1_t)(
struct PSI_socket *socket,
1884 enum PSI_socket_state state);
1894 typedef void (*set_socket_info_v1_t)(
struct PSI_socket *socket,
1895 const my_socket *fd,
1896 const struct sockaddr *addr,
1897 socklen_t addr_len);
1903 typedef void (*set_socket_thread_owner_v1_t)(
struct PSI_socket *socket);
1905 typedef struct PSI_digest_locker * (*digest_start_v1_t)
1906 (
struct PSI_statement_locker *locker);
1908 typedef struct PSI_digest_locker* (*digest_add_token_v1_t)
1909 (
struct PSI_digest_locker *locker, uint token,
struct OPAQUE_LEX_YYSTYPE *yylval);
1921 typedef int (*set_thread_connect_attrs_v1_t)(
const char *buffer, uint length,
1922 const void *from_cs);
1931 register_mutex_v1_t register_mutex;
1933 register_rwlock_v1_t register_rwlock;
1935 register_cond_v1_t register_cond;
1937 register_thread_v1_t register_thread;
1939 register_file_v1_t register_file;
1941 register_stage_v1_t register_stage;
1943 register_statement_v1_t register_statement;
1945 register_socket_v1_t register_socket;
1947 init_mutex_v1_t init_mutex;
1951 init_rwlock_v1_t init_rwlock;
1955 init_cond_v1_t init_cond;
1959 init_socket_v1_t init_socket;
1963 get_table_share_v1_t get_table_share;
1971 unbind_table_v1_t unbind_table;
1973 rebind_table_v1_t rebind_table;
1975 close_table_v1_t close_table;
1977 create_file_v1_t create_file;
1979 spawn_thread_v1_t spawn_thread;
1981 new_thread_v1_t new_thread;
1983 set_thread_id_v1_t set_thread_id;
1985 get_thread_v1_t get_thread;
1987 set_thread_user_v1_t set_thread_user;
1989 set_thread_user_host_v1_t set_thread_user_host;
1991 set_thread_db_v1_t set_thread_db;
1993 set_thread_command_v1_t set_thread_command;
1995 set_thread_start_time_v1_t set_thread_start_time;
1997 set_thread_state_v1_t set_thread_state;
1999 set_thread_info_v1_t set_thread_info;
2001 set_thread_v1_t set_thread;
2003 delete_current_thread_v1_t delete_current_thread;
2005 delete_thread_v1_t delete_thread;
2007 get_thread_file_name_locker_v1_t get_thread_file_name_locker;
2009 get_thread_file_stream_locker_v1_t get_thread_file_stream_locker;
2011 get_thread_file_descriptor_locker_v1_t get_thread_file_descriptor_locker;
2013 unlock_mutex_v1_t unlock_mutex;
2015 unlock_rwlock_v1_t unlock_rwlock;
2017 signal_cond_v1_t signal_cond;
2019 broadcast_cond_v1_t broadcast_cond;
2021 start_idle_wait_v1_t start_idle_wait;
2023 end_idle_wait_v1_t end_idle_wait;
2025 start_mutex_wait_v1_t start_mutex_wait;
2027 end_mutex_wait_v1_t end_mutex_wait;
2029 start_rwlock_rdwait_v1_t start_rwlock_rdwait;
2031 end_rwlock_rdwait_v1_t end_rwlock_rdwait;
2033 start_rwlock_wrwait_v1_t start_rwlock_wrwait;
2035 end_rwlock_wrwait_v1_t end_rwlock_wrwait;
2037 start_cond_wait_v1_t start_cond_wait;
2039 end_cond_wait_v1_t end_cond_wait;
2041 start_table_io_wait_v1_t start_table_io_wait;
2043 end_table_io_wait_v1_t end_table_io_wait;
2045 start_table_lock_wait_v1_t start_table_lock_wait;
2047 end_table_lock_wait_v1_t end_table_lock_wait;
2049 start_file_open_wait_v1_t start_file_open_wait;
2051 end_file_open_wait_v1_t end_file_open_wait;
2053 end_file_open_wait_and_bind_to_descriptor_v1_t
2054 end_file_open_wait_and_bind_to_descriptor;
2056 start_file_wait_v1_t start_file_wait;
2058 end_file_wait_v1_t end_file_wait;
2060 start_file_close_wait_v1_t start_file_close_wait;
2062 end_file_close_wait_v1_t end_file_close_wait;
2064 start_stage_v1_t start_stage;
2066 end_stage_v1_t end_stage;
2068 get_thread_statement_locker_v1_t get_thread_statement_locker;
2070 refine_statement_v1_t refine_statement;
2072 start_statement_v1_t start_statement;
2074 set_statement_text_v1_t set_statement_text;
2076 set_statement_lock_time_t set_statement_lock_time;
2078 set_statement_rows_sent_t set_statement_rows_sent;
2080 set_statement_rows_examined_t set_statement_rows_examined;
2082 inc_statement_created_tmp_disk_tables_t inc_statement_created_tmp_disk_tables;
2084 inc_statement_created_tmp_tables_t inc_statement_created_tmp_tables;
2086 inc_statement_select_full_join_t inc_statement_select_full_join;
2088 inc_statement_select_full_range_join_t inc_statement_select_full_range_join;
2090 inc_statement_select_range_t inc_statement_select_range;
2092 inc_statement_select_range_check_t inc_statement_select_range_check;
2094 inc_statement_select_scan_t inc_statement_select_scan;
2096 inc_statement_sort_merge_passes_t inc_statement_sort_merge_passes;
2098 inc_statement_sort_range_t inc_statement_sort_range;
2100 inc_statement_sort_rows_t inc_statement_sort_rows;
2102 inc_statement_sort_scan_t inc_statement_sort_scan;
2104 set_statement_no_index_used_t set_statement_no_index_used;
2106 set_statement_no_good_index_used_t set_statement_no_good_index_used;
2108 end_statement_v1_t end_statement;
2110 start_socket_wait_v1_t start_socket_wait;
2112 end_socket_wait_v1_t end_socket_wait;
2114 set_socket_state_v1_t set_socket_state;
2116 set_socket_info_v1_t set_socket_info;
2118 set_socket_thread_owner_v1_t set_socket_thread_owner;
2120 digest_start_v1_t digest_start;
2122 digest_add_token_v1_t digest_add_token;
2124 set_thread_connect_attrs_v1_t set_thread_connect_attrs;
2156 struct PSI_mutex_info_v2
2163 struct PSI_rwlock_info_v2
2170 struct PSI_cond_info_v2
2177 struct PSI_thread_info_v2
2184 struct PSI_file_info_v2
2191 struct PSI_stage_info_v2
2198 struct PSI_statement_info_v2
2205 struct PSI_idle_locker_state_v2
2212 struct PSI_mutex_locker_state_v2
2219 struct PSI_rwlock_locker_state_v2
2226 struct PSI_cond_locker_state_v2
2233 struct PSI_file_locker_state_v2
2240 struct PSI_table_locker_state_v2
2247 struct PSI_statement_locker_state_v2
2254 struct PSI_socket_locker_state_v2
2297 typedef struct PSI_v1
PSI;
2298 typedef struct PSI_mutex_info_v1 PSI_mutex_info;
2299 typedef struct PSI_rwlock_info_v1 PSI_rwlock_info;
2300 typedef struct PSI_cond_info_v1 PSI_cond_info;
2301 typedef struct PSI_thread_info_v1 PSI_thread_info;
2302 typedef struct PSI_file_info_v1 PSI_file_info;
2304 typedef struct PSI_statement_info_v1 PSI_statement_info;
2305 typedef struct PSI_socket_info_v1 PSI_socket_info;
2306 typedef struct PSI_idle_locker_state_v1 PSI_idle_locker_state;
2307 typedef struct PSI_mutex_locker_state_v1 PSI_mutex_locker_state;
2308 typedef struct PSI_rwlock_locker_state_v1 PSI_rwlock_locker_state;
2309 typedef struct PSI_cond_locker_state_v1 PSI_cond_locker_state;
2310 typedef struct PSI_file_locker_state_v1 PSI_file_locker_state;
2311 typedef struct PSI_table_locker_state_v1 PSI_table_locker_state;
2312 typedef struct PSI_statement_locker_state_v1 PSI_statement_locker_state;
2313 typedef struct PSI_socket_locker_state_v1 PSI_socket_locker_state;
2317 typedef struct PSI_v2
PSI;
2318 typedef struct PSI_mutex_info_v2 PSI_mutex_info;
2319 typedef struct PSI_rwlock_info_v2 PSI_rwlock_info;
2320 typedef struct PSI_cond_info_v2 PSI_cond_info;
2321 typedef struct PSI_thread_info_v2 PSI_thread_info;
2322 typedef struct PSI_file_info_v2 PSI_file_info;
2324 typedef struct PSI_statement_info_v2 PSI_statement_info;
2325 typedef struct PSI_socket_info_v2 PSI_socket_info;
2326 typedef struct PSI_idle_locker_state_v2 PSI_idle_locker_state;
2327 typedef struct PSI_mutex_locker_state_v2 PSI_mutex_locker_state;
2328 typedef struct PSI_rwlock_locker_state_v2 PSI_rwlock_locker_state;
2329 typedef struct PSI_cond_locker_state_v2 PSI_cond_locker_state;
2330 typedef struct PSI_file_locker_state_v2 PSI_file_locker_state;
2331 typedef struct PSI_table_locker_state_v2 PSI_table_locker_state;
2332 typedef struct PSI_statement_locker_state_v2 PSI_statement_locker_state;
2333 typedef struct PSI_socket_locker_state_v2 PSI_socket_locker_state;
2385 #ifndef PSI_MUTEX_CALL
2386 #define PSI_MUTEX_CALL(M) PSI_DYNAMIC_CALL(M)
2389 #ifndef PSI_RWLOCK_CALL
2390 #define PSI_RWLOCK_CALL(M) PSI_DYNAMIC_CALL(M)
2393 #ifndef PSI_COND_CALL
2394 #define PSI_COND_CALL(M) PSI_DYNAMIC_CALL(M)
2397 #ifndef PSI_THREAD_CALL
2398 #define PSI_THREAD_CALL(M) PSI_DYNAMIC_CALL(M)
2401 #ifndef PSI_FILE_CALL
2402 #define PSI_FILE_CALL(M) PSI_DYNAMIC_CALL(M)
2405 #ifndef PSI_SOCKET_CALL
2406 #define PSI_SOCKET_CALL(M) PSI_DYNAMIC_CALL(M)
2409 #ifndef PSI_STAGE_CALL
2410 #define PSI_STAGE_CALL(M) PSI_DYNAMIC_CALL(M)
2413 #ifndef PSI_STATEMENT_CALL
2414 #define PSI_STATEMENT_CALL(M) PSI_DYNAMIC_CALL(M)
2417 #ifndef PSI_TABLE_CALL
2418 #define PSI_TABLE_CALL(M) PSI_DYNAMIC_CALL(M)
2421 #ifndef PSI_IDLE_CALL
2422 #define PSI_IDLE_CALL(M) PSI_DYNAMIC_CALL(M)
2425 #define PSI_DYNAMIC_CALL(M) PSI_server->M