44 #ifdef HAVE_PSI_TABLE_INTERFACE
45 #define MYSQL_TABLE_WAIT_VARIABLES(LOCKER, STATE) \
46 struct PSI_table_locker* LOCKER; \
47 PSI_table_locker_state STATE;
49 #define MYSQL_TABLE_WAIT_VARIABLES(LOCKER, STATE)
62 #ifdef HAVE_PSI_TABLE_INTERFACE
63 #define MYSQL_TABLE_IO_WAIT(PSI, OP, INDEX, FLAGS, PAYLOAD) \
67 PSI_table_locker *locker; \
68 PSI_table_locker_state state; \
69 locker= PSI_TABLE_CALL(start_table_io_wait) \
70 (& state, PSI, OP, INDEX, __FILE__, __LINE__); \
73 PSI_TABLE_CALL(end_table_io_wait)(locker); \
81 #define MYSQL_TABLE_IO_WAIT(PSI, OP, INDEX, FLAGS, PAYLOAD) \
95 #ifdef HAVE_PSI_TABLE_INTERFACE
96 #define MYSQL_TABLE_LOCK_WAIT(PSI, OP, FLAGS, PAYLOAD) \
100 PSI_table_locker *locker; \
101 PSI_table_locker_state state; \
102 locker= PSI_TABLE_CALL(start_table_lock_wait) \
103 (& state, PSI, OP, FLAGS, __FILE__, __LINE__); \
105 if (locker != NULL) \
106 PSI_TABLE_CALL(end_table_lock_wait)(locker); \
114 #define MYSQL_TABLE_LOCK_WAIT(PSI, OP, FLAGS, PAYLOAD) \
129 #ifdef HAVE_PSI_TABLE_INTERFACE
130 #define MYSQL_START_TABLE_LOCK_WAIT(LOCKER, STATE, PSI, OP, FLAGS) \
131 LOCKER= inline_mysql_start_table_lock_wait(STATE, PSI, \
132 OP, FLAGS, __FILE__, __LINE__)
134 #define MYSQL_START_TABLE_LOCK_WAIT(LOCKER, STATE, PSI, OP, FLAGS) \
145 #ifdef HAVE_PSI_TABLE_INTERFACE
146 #define MYSQL_END_TABLE_LOCK_WAIT(LOCKER) \
147 inline_mysql_end_table_lock_wait(LOCKER)
149 #define MYSQL_END_TABLE_LOCK_WAIT(LOCKER) \
153 #ifdef HAVE_PSI_TABLE_INTERFACE
158 static inline struct PSI_table_locker *
159 inline_mysql_start_table_lock_wait(PSI_table_locker_state *state,
160 struct PSI_table *psi,
161 enum PSI_table_lock_operation op,
162 ulong
flags,
const char *src_file,
int src_line)
166 struct PSI_table_locker *locker;
167 locker= PSI_TABLE_CALL(start_table_lock_wait)
168 (state, psi, op,
flags, src_file, src_line);
179 inline_mysql_end_table_lock_wait(
struct PSI_table_locker *locker)
182 PSI_TABLE_CALL(end_table_lock_wait)(locker);