37#if defined(MYSQL_SERVER) || defined(PFS_DIRECT_CALL)
43#define PSI_PS_CALL(M) psi_statement_service->M
46#ifdef HAVE_PSI_PS_INTERFACE
48#define MYSQL_CREATE_PS(IDENTITY, ID, LOCKER, NAME, NAME_LENGTH, SQLTEXT, \
50 inline_mysql_create_prepared_stmt(IDENTITY, ID, LOCKER, NAME, NAME_LENGTH, \
51 SQLTEXT, SQLTEXT_LENGTH)
52#define MYSQL_EXECUTE_PS(LOCKER, PREPARED_STMT) \
53 inline_mysql_execute_prepared_stmt(LOCKER, PREPARED_STMT)
54#define MYSQL_DESTROY_PS(PREPARED_STMT) \
55 inline_mysql_destroy_prepared_stmt(PREPARED_STMT)
56#define MYSQL_REPREPARE_PS(PREPARED_STMT) \
57 inline_mysql_reprepare_prepared_stmt(PREPARED_STMT)
58#define MYSQL_SET_PS_TEXT(PREPARED_STMT, SQLTEXT, SQLTEXT_LENGTH) \
59 inline_mysql_set_prepared_stmt_text(PREPARED_STMT, SQLTEXT, SQLTEXT_LENGTH)
60#define MYSQL_SET_PS_SECONDARY_ENGINE(PREPARED_STMT, SECONDARY) \
61 inline_mysql_set_prepared_stmt_secondary_engine(PREPARED_STMT, SECONDARY)
65#define MYSQL_CREATE_PS(IDENTITY, ID, LOCKER, NAME, NAME_LENGTH, SQLTEXT, \
68#define MYSQL_EXECUTE_PS(LOCKER, PREPARED_STMT) \
71#define MYSQL_DESTROY_PS(PREPARED_STMT) \
74#define MYSQL_REPREPARE_PS(PREPARED_STMT) \
77#define MYSQL_SET_PS_TEXT(PREPARED_STMT, SQLTEXT, SQLTEXT_LENGTH) \
80#define MYSQL_SET_PS_SECONDARY_ENGINE(PREPARED_STMT, SECONDARY) \
86#ifdef HAVE_PSI_PS_INTERFACE
89 const char *stmt_name,
size_t stmt_name_length,
const char *sqltext,
90 size_t sqltext_length) {
91 if (locker ==
nullptr) {
95 stmt_name_length, sqltext,
101 if (prepared_stmt !=
nullptr && locker !=
nullptr) {
102 PSI_PS_CALL(execute_prepared_stmt)(locker, prepared_stmt);
108 if (prepared_stmt !=
nullptr) {
115 if (prepared_stmt !=
nullptr) {
116 PSI_PS_CALL(reprepare_prepared_stmt)(prepared_stmt);
122 if (prepared_stmt !=
nullptr) {
123 PSI_PS_CALL(set_prepared_stmt_text)(prepared_stmt, text, text_len);
129 if (prepared_stmt !=
nullptr) {
130 PSI_PS_CALL(set_prepared_stmt_secondary_engine)(prepared_stmt, secondary);
struct PSI_prepared_stmt PSI_prepared_stmt
Definition: psi_statement_bits.h:105
struct PSI_statement_locker PSI_statement_locker
Definition: psi_statement_bits.h:98
Defines various enable/disable and HAVE_ macros related to the performance schema instrumentation sys...
static void inline_mysql_reprepare_prepared_stmt(PSI_prepared_stmt *prepared_stmt)
Definition: mysql_ps.h:113
static struct PSI_prepared_stmt * inline_mysql_create_prepared_stmt(void *identity, uint stmt_id, PSI_statement_locker *locker, const char *stmt_name, size_t stmt_name_length, const char *sqltext, size_t sqltext_length)
Definition: mysql_ps.h:87
static void inline_mysql_set_prepared_stmt_text(PSI_prepared_stmt *prepared_stmt, const char *text, uint text_len)
Definition: mysql_ps.h:120
static void inline_mysql_destroy_prepared_stmt(PSI_prepared_stmt *prepared_stmt)
Definition: mysql_ps.h:106
static void inline_mysql_set_prepared_stmt_secondary_engine(PSI_prepared_stmt *prepared_stmt, bool secondary)
Definition: mysql_ps.h:127
static void inline_mysql_execute_prepared_stmt(PSI_statement_locker *locker, PSI_prepared_stmt *prepared_stmt)
Definition: mysql_ps.h:99
PFS_prepared_stmt * create_prepared_stmt(void *identity, PFS_thread *thread, PFS_program *pfs_program, PFS_events_statements *pfs_stmt, uint stmt_id, const char *stmt_name, uint stmt_name_length, const char *sqltext, uint sqltext_length)
Definition: pfs_prepared_stmt.cc:73
Performance schema instrumentation (declarations).
#define PSI_PS_CALL(M)
Definition: pfs_statement_provider.h:52
Performance schema instrumentation interface.