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_v2 133{ 134 int placeholder; 135}; 136struct PSI_mutex_info_v2 137{ 138 int placeholder; 139}; 140struct PSI_rwlock_info_v2 141{ 142 int placeholder; 143}; 144struct PSI_cond_info_v2 145{ 146 int placeholder; 147}; 148struct PSI_thread_info_v2 149{ 150 int placeholder; 151}; 152struct PSI_file_info_v2 153{ 154 int placeholder; 155}; 156struct PSI_stage_info_v2 157{ 158 int placeholder; 159}; 160struct PSI_statement_info_v2 161{ 162 int placeholder; 163}; 164struct PSI_idle_locker_state_v2 165{ 166 int placeholder; 167}; 168struct PSI_mutex_locker_state_v2 169{ 170 int placeholder; 171}; 172struct PSI_rwlock_locker_state_v2 173{ 174 int placeholder; 175}; 176struct PSI_cond_locker_state_v2 177{ 178 int placeholder; 179}; 180struct PSI_file_locker_state_v2 181{ 182 int placeholder; 183}; 184struct PSI_table_locker_state_v2 185{ 186 int placeholder; 187}; 188struct PSI_statement_locker_state_v2 189{ 190 int placeholder; 191}; 192struct PSI_socket_locker_state_v2 193{ 194 int placeholder; 195}; 196typedef struct PSI_v2 PSI; 197typedef struct PSI_mutex_info_v2 PSI_mutex_info; 198typedef struct PSI_rwlock_info_v2 PSI_rwlock_info; 199typedef struct PSI_cond_info_v2 PSI_cond_info; 200typedef struct PSI_thread_info_v2 PSI_thread_info; 201typedef struct PSI_file_info_v2 PSI_file_info; 202typedef struct PSI_stage_info_v2 PSI_stage_info; 203typedef struct PSI_statement_info_v2 PSI_statement_info; 204typedef struct PSI_socket_info_v2 PSI_socket_info; 205typedef struct PSI_idle_locker_state_v2 PSI_idle_locker_state; 206typedef struct PSI_mutex_locker_state_v2 PSI_mutex_locker_state; 207typedef struct PSI_rwlock_locker_state_v2 PSI_rwlock_locker_state; 208typedef struct PSI_cond_locker_state_v2 PSI_cond_locker_state; 209typedef struct PSI_file_locker_state_v2 PSI_file_locker_state; 210typedef struct PSI_table_locker_state_v2 PSI_table_locker_state; 211typedef struct PSI_statement_locker_state_v2 PSI_statement_locker_state; 212typedef struct PSI_socket_locker_state_v2 PSI_socket_locker_state; 213extern MYSQL_PLUGIN_IMPORT PSI *PSI_server; 214C_MODE_END 215