perfschema 5.6.10 initial commit.

include/mysql/psi/*
This commit is contained in:
Sergei Golubchik 2014-05-07 10:02:35 +02:00
parent 06d874ba90
commit 7226287c06
14 changed files with 7835 additions and 0 deletions

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,92 @@
/* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */
#ifndef MYSQL_IDLE_H
#define MYSQL_IDLE_H
/**
@file mysql/psi/mysql_idle.h
Instrumentation helpers for idle waits.
*/
#include "mysql/psi/psi.h"
/**
@defgroup Idle_instrumentation Idle Instrumentation
@ingroup Instrumentation_interface
@{
*/
/**
@def MYSQL_START_IDLE_WAIT
Instrumentation helper for table io_waits.
This instrumentation marks the start of a wait event.
@param LOCKER the locker
@param STATE the locker state
@sa MYSQL_END_IDLE_WAIT.
*/
#ifdef HAVE_PSI_IDLE_INTERFACE
#define MYSQL_START_IDLE_WAIT(LOCKER, STATE) \
LOCKER= inline_mysql_start_idle_wait(STATE, __FILE__, __LINE__)
#else
#define MYSQL_START_IDLE_WAIT(LOCKER, STATE) \
do {} while (0)
#endif
/**
@def MYSQL_END_IDLE_WAIT
Instrumentation helper for idle waits.
This instrumentation marks the end of a wait event.
@param LOCKER the locker
@sa MYSQL_START_IDLE_WAIT.
*/
#ifdef HAVE_PSI_IDLE_INTERFACE
#define MYSQL_END_IDLE_WAIT(LOCKER) \
inline_mysql_end_idle_wait(LOCKER)
#else
#define MYSQL_END_IDLE_WAIT(LOCKER) \
do {} while (0)
#endif
#ifdef HAVE_PSI_IDLE_INTERFACE
/**
Instrumentation calls for MYSQL_START_IDLE_WAIT.
@sa MYSQL_END_IDLE_WAIT.
*/
static inline struct PSI_idle_locker *
inline_mysql_start_idle_wait(PSI_idle_locker_state *state,
const char *src_file, int src_line)
{
struct PSI_idle_locker *locker;
locker= PSI_IDLE_CALL(start_idle_wait)(state, src_file, src_line);
return locker;
}
/**
Instrumentation calls for MYSQL_END_IDLE_WAIT.
@sa MYSQL_START_IDLE_WAIT.
*/
static inline void
inline_mysql_end_idle_wait(struct PSI_idle_locker *locker)
{
if (likely(locker != NULL))
PSI_IDLE_CALL(end_idle_wait)(locker);
}
#endif
/** @} (end of group Idle_instrumentation) */
#endif

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,72 @@
/* Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
#ifndef MYSQL_STAGE_H
#define MYSQL_STAGE_H
/**
@file mysql/psi/mysql_stage.h
Instrumentation helpers for stages.
*/
#include "mysql/psi/psi.h"
/**
@defgroup Stage_instrumentation Stage Instrumentation
@ingroup Instrumentation_interface
@{
*/
/**
@def mysql_stage_register(P1, P2, P3)
Stage registration.
*/
#ifdef HAVE_PSI_STAGE_INTERFACE
#define mysql_stage_register(P1, P2, P3) \
inline_mysql_stage_register(P1, P2, P3)
#else
#define mysql_stage_register(P1, P2, P3) \
do {} while (0)
#endif
#ifdef HAVE_PSI_STAGE_INTERFACE
#define MYSQL_SET_STAGE(K, F, L) \
inline_mysql_set_stage(K, F, L)
#else
#define MYSQL_SET_STAGE(K, F, L) \
do {} while (0)
#endif
#ifdef HAVE_PSI_STAGE_INTERFACE
static inline void inline_mysql_stage_register(
const char *category, PSI_stage_info **info, int count)
{
PSI_STAGE_CALL(register_stage)(category, info, count);
}
#endif
#ifdef HAVE_PSI_STAGE_INTERFACE
static inline void
inline_mysql_set_stage(PSI_stage_key key,
const char *src_file, int src_line)
{
PSI_STAGE_CALL(start_stage)(key, src_file, src_line);
}
#endif
/** @} (end of group Stage_instrumentation) */
#endif

View file

@ -0,0 +1,230 @@
/* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
#ifndef MYSQL_STATEMENT_H
#define MYSQL_STATEMENT_H
/**
@file mysql/psi/mysql_statement.h
Instrumentation helpers for statements.
*/
#include "mysql/psi/psi.h"
/**
@defgroup Statement_instrumentation Statement Instrumentation
@ingroup Instrumentation_interface
@{
*/
/**
@def mysql_statement_register(P1, P2, P3)
Statement registration.
*/
#ifdef HAVE_PSI_STATEMENT_INTERFACE
#define mysql_statement_register(P1, P2, P3) \
inline_mysql_statement_register(P1, P2, P3)
#else
#define mysql_statement_register(P1, P2, P3) \
do {} while (0)
#endif
#ifdef HAVE_PSI_STATEMENT_INTERFACE
#ifdef HAVE_PSI_STATEMENT_DIGEST_INTERFACE
#define MYSQL_DIGEST_START(LOCKER) \
inline_mysql_digest_start(LOCKER)
#else
#define MYSQL_DIGEST_START(LOCKER) \
NULL
#endif
#else
#define MYSQL_DIGEST_START(LOCKER) \
NULL
#endif
#ifdef HAVE_PSI_STATEMENT_DIGEST_INTERFACE
#define MYSQL_ADD_TOKEN(LOCKER, T, Y) \
inline_mysql_add_token(LOCKER, T, Y)
#else
#define MYSQL_ADD_TOKEN(LOCKER, T, Y) \
NULL
#endif
#ifdef HAVE_PSI_STATEMENT_INTERFACE
#define MYSQL_START_STATEMENT(STATE, K, DB, DB_LEN, CS) \
inline_mysql_start_statement(STATE, K, DB, DB_LEN, CS, __FILE__, __LINE__)
#else
#define MYSQL_START_STATEMENT(STATE, K, DB, DB_LEN, CS) \
NULL
#endif
#ifdef HAVE_PSI_STATEMENT_INTERFACE
#define MYSQL_REFINE_STATEMENT(LOCKER, K) \
inline_mysql_refine_statement(LOCKER, K)
#else
#define MYSQL_REFINE_STATEMENT(LOCKER, K) \
NULL
#endif
#ifdef HAVE_PSI_STATEMENT_INTERFACE
#define MYSQL_SET_STATEMENT_TEXT(LOCKER, P1, P2) \
inline_mysql_set_statement_text(LOCKER, P1, P2)
#else
#define MYSQL_SET_STATEMENT_TEXT(LOCKER, P1, P2) \
do {} while (0)
#endif
#ifdef HAVE_PSI_STATEMENT_INTERFACE
#define MYSQL_SET_STATEMENT_LOCK_TIME(LOCKER, P1) \
inline_mysql_set_statement_lock_time(LOCKER, P1)
#else
#define MYSQL_SET_STATEMENT_LOCK_TIME(LOCKER, P1) \
do {} while (0)
#endif
#ifdef HAVE_PSI_STATEMENT_INTERFACE
#define MYSQL_SET_STATEMENT_ROWS_SENT(LOCKER, P1) \
inline_mysql_set_statement_rows_sent(LOCKER, P1)
#else
#define MYSQL_SET_STATEMENT_ROWS_SENT(LOCKER, P1) \
do {} while (0)
#endif
#ifdef HAVE_PSI_STATEMENT_INTERFACE
#define MYSQL_SET_STATEMENT_ROWS_EXAMINED(LOCKER, P1) \
inline_mysql_set_statement_rows_examined(LOCKER, P1)
#else
#define MYSQL_SET_STATEMENT_ROWS_EXAMINED(LOCKER, P1) \
do {} while (0)
#endif
#ifdef HAVE_PSI_STATEMENT_INTERFACE
#define MYSQL_END_STATEMENT(LOCKER, DA) \
inline_mysql_end_statement(LOCKER, DA)
#else
#define MYSQL_END_STATEMENT(LOCKER, DA) \
do {} while (0)
#endif
#ifdef HAVE_PSI_STATEMENT_INTERFACE
static inline void inline_mysql_statement_register(
const char *category, PSI_statement_info *info, int count)
{
PSI_STATEMENT_CALL(register_statement)(category, info, count);
}
#ifdef HAVE_PSI_STATEMENT_DIGEST_INTERFACE
static inline struct PSI_digest_locker *
inline_mysql_digest_start(PSI_statement_locker *locker)
{
PSI_digest_locker* digest_locker= NULL;
if (likely(locker != NULL))
digest_locker= PSI_STATEMENT_CALL(digest_start)(locker);
return digest_locker;
}
#endif
#ifdef HAVE_PSI_STATEMENT_DIGEST_INTERFACE
static inline struct PSI_digest_locker *
inline_mysql_add_token(PSI_digest_locker *locker, uint token,
void *yylval)
{
if (likely(locker != NULL))
locker= PSI_STATEMENT_CALL(digest_add_token)(locker, token,
(OPAQUE_LEX_YYSTYPE*)yylval);
return locker;
}
#endif
static inline struct PSI_statement_locker *
inline_mysql_start_statement(PSI_statement_locker_state *state,
PSI_statement_key key,
const char *db, uint db_len,
const CHARSET_INFO *charset,
const char *src_file, int src_line)
{
PSI_statement_locker *locker;
locker= PSI_STATEMENT_CALL(get_thread_statement_locker)(state, key, charset);
if (likely(locker != NULL))
PSI_STATEMENT_CALL(start_statement)(locker, db, db_len, src_file, src_line);
return locker;
}
static inline struct PSI_statement_locker *
inline_mysql_refine_statement(PSI_statement_locker *locker,
PSI_statement_key key)
{
if (likely(locker != NULL))
{
locker= PSI_STATEMENT_CALL(refine_statement)(locker, key);
}
return locker;
}
static inline void
inline_mysql_set_statement_text(PSI_statement_locker *locker,
const char *text, uint text_len)
{
if (likely(locker != NULL))
{
PSI_STATEMENT_CALL(set_statement_text)(locker, text, text_len);
}
}
static inline void
inline_mysql_set_statement_lock_time(PSI_statement_locker *locker,
ulonglong count)
{
if (likely(locker != NULL))
{
PSI_STATEMENT_CALL(set_statement_lock_time)(locker, count);
}
}
static inline void
inline_mysql_set_statement_rows_sent(PSI_statement_locker *locker,
ulonglong count)
{
if (likely(locker != NULL))
{
PSI_STATEMENT_CALL(set_statement_rows_sent)(locker, count);
}
}
static inline void
inline_mysql_set_statement_rows_examined(PSI_statement_locker *locker,
ulonglong count)
{
if (likely(locker != NULL))
{
PSI_STATEMENT_CALL(set_statement_rows_examined)(locker, count);
}
}
static inline void
inline_mysql_end_statement(struct PSI_statement_locker *locker,
Diagnostics_area *stmt_da)
{
PSI_STAGE_CALL(end_stage)();
if (likely(locker != NULL))
PSI_STATEMENT_CALL(end_statement)(locker, stmt_da);
}
#endif
/** @} (end of group Statement_instrumentation) */
#endif

View file

@ -0,0 +1,189 @@
/* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */
#ifndef MYSQL_TABLE_H
#define MYSQL_TABLE_H
/**
@file mysql/psi/mysql_table.h
Instrumentation helpers for table io.
*/
#include "mysql/psi/psi.h"
/**
@defgroup Table_instrumentation Table Instrumentation
@ingroup Instrumentation_interface
@{
*/
/**
@def MYSQL_TABLE_WAIT_VARIABLES
Instrumentation helper for table waits.
This instrumentation declares local variables.
Do not use a ';' after this macro
@param LOCKER the locker
@param STATE the locker state
@sa MYSQL_START_TABLE_IO_WAIT.
@sa MYSQL_END_TABLE_IO_WAIT.
@sa MYSQL_START_TABLE_LOCK_WAIT.
@sa MYSQL_END_TABLE_LOCK_WAIT.
*/
#ifdef HAVE_PSI_TABLE_INTERFACE
#define MYSQL_TABLE_WAIT_VARIABLES(LOCKER, STATE) \
struct PSI_table_locker* LOCKER; \
PSI_table_locker_state STATE;
#else
#define MYSQL_TABLE_WAIT_VARIABLES(LOCKER, STATE)
#endif
/**
@def MYSQL_TABLE_IO_WAIT
Instrumentation helper for table io_waits.
This instrumentation marks the start of a wait event.
@param PSI the instrumented table
@param OP the table operation to be performed
@param INDEX the table index used if any, or MAY_KEY.
@param FLAGS per table operation flags.
@sa MYSQL_END_TABLE_WAIT.
*/
#ifdef HAVE_PSI_TABLE_INTERFACE
#define MYSQL_TABLE_IO_WAIT(PSI, OP, INDEX, FLAGS, PAYLOAD) \
{ \
if (PSI != NULL) \
{ \
PSI_table_locker *locker; \
PSI_table_locker_state state; \
locker= PSI_TABLE_CALL(start_table_io_wait) \
(& state, PSI, OP, INDEX, __FILE__, __LINE__); \
PAYLOAD \
if (locker != NULL) \
PSI_TABLE_CALL(end_table_io_wait)(locker); \
} \
else \
{ \
PAYLOAD \
} \
}
#else
#define MYSQL_TABLE_IO_WAIT(PSI, OP, INDEX, FLAGS, PAYLOAD) \
PAYLOAD
#endif
/**
@def MYSQL_TABLE_LOCK_WAIT
Instrumentation helper for table io_waits.
This instrumentation marks the start of a wait event.
@param PSI the instrumented table
@param OP the table operation to be performed
@param INDEX the table index used if any, or MAY_KEY.
@param FLAGS per table operation flags.
@sa MYSQL_END_TABLE_WAIT.
*/
#ifdef HAVE_PSI_TABLE_INTERFACE
#define MYSQL_TABLE_LOCK_WAIT(PSI, OP, FLAGS, PAYLOAD) \
{ \
if (PSI != NULL) \
{ \
PSI_table_locker *locker; \
PSI_table_locker_state state; \
locker= PSI_TABLE_CALL(start_table_lock_wait) \
(& state, PSI, OP, FLAGS, __FILE__, __LINE__); \
PAYLOAD \
if (locker != NULL) \
PSI_TABLE_CALL(end_table_lock_wait)(locker); \
} \
else \
{ \
PAYLOAD \
} \
}
#else
#define MYSQL_TABLE_LOCK_WAIT(PSI, OP, FLAGS, PAYLOAD) \
PAYLOAD
#endif
/**
@def MYSQL_START_TABLE_LOCK_WAIT
Instrumentation helper for table lock waits.
This instrumentation marks the start of a wait event.
@param LOCKER the locker
@param STATE the locker state
@param PSI the instrumented table
@param OP the table operation to be performed
@param FLAGS per table operation flags.
@sa MYSQL_END_TABLE_LOCK_WAIT.
*/
#ifdef HAVE_PSI_TABLE_INTERFACE
#define MYSQL_START_TABLE_LOCK_WAIT(LOCKER, STATE, PSI, OP, FLAGS) \
LOCKER= inline_mysql_start_table_lock_wait(STATE, PSI, \
OP, FLAGS, __FILE__, __LINE__)
#else
#define MYSQL_START_TABLE_LOCK_WAIT(LOCKER, STATE, PSI, OP, FLAGS) \
do {} while (0)
#endif
/**
@def MYSQL_END_TABLE_LOCK_WAIT
Instrumentation helper for table lock waits.
This instrumentation marks the end of a wait event.
@param LOCKER the locker
@sa MYSQL_START_TABLE_LOCK_WAIT.
*/
#ifdef HAVE_PSI_TABLE_INTERFACE
#define MYSQL_END_TABLE_LOCK_WAIT(LOCKER) \
inline_mysql_end_table_lock_wait(LOCKER)
#else
#define MYSQL_END_TABLE_LOCK_WAIT(LOCKER) \
do {} while (0)
#endif
#ifdef HAVE_PSI_TABLE_INTERFACE
/**
Instrumentation calls for MYSQL_START_TABLE_LOCK_WAIT.
@sa MYSQL_END_TABLE_LOCK_WAIT.
*/
static inline struct PSI_table_locker *
inline_mysql_start_table_lock_wait(PSI_table_locker_state *state,
struct PSI_table *psi,
enum PSI_table_lock_operation op,
ulong flags, const char *src_file, int src_line)
{
if (psi != NULL)
{
struct PSI_table_locker *locker;
locker= PSI_TABLE_CALL(start_table_lock_wait)
(state, psi, op, flags, src_file, src_line);
return locker;
}
return NULL;
}
/**
Instrumentation calls for MYSQL_END_TABLE_LOCK_WAIT.
@sa MYSQL_START_TABLE_LOCK_WAIT.
*/
static inline void
inline_mysql_end_table_lock_wait(struct PSI_table_locker *locker)
{
if (locker != NULL)
PSI_TABLE_CALL(end_table_lock_wait)(locker);
}
#endif
/** @} (end of group Table_instrumentation) */
#endif

File diff suppressed because it is too large Load diff

2431
include/mysql/psi/psi.h Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,24 @@
/* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */
/**
@file mysql/psi/psi_abi_v0.h
ABI check for mysql/psi/psi.h, when compiling without instrumentation.
This file is only used to automate detection of changes between versions.
Do not include this file, include mysql/psi/psi.h instead.
*/
#define _global_h
#include "mysql/psi/psi.h"

View file

@ -0,0 +1,47 @@
#include "mysql/psi/psi.h"
C_MODE_START
struct TABLE_SHARE;
struct OPAQUE_LEX_YYSTYPE;
struct PSI_mutex;
typedef struct PSI_mutex PSI_mutex;
struct PSI_rwlock;
typedef struct PSI_rwlock PSI_rwlock;
struct PSI_cond;
typedef struct PSI_cond PSI_cond;
struct PSI_table_share;
typedef struct PSI_table_share PSI_table_share;
struct PSI_table;
typedef struct PSI_table PSI_table;
struct PSI_thread;
typedef struct PSI_thread PSI_thread;
struct PSI_file;
typedef struct PSI_file PSI_file;
struct PSI_socket;
typedef struct PSI_socket PSI_socket;
struct PSI_table_locker;
typedef struct PSI_table_locker PSI_table_locker;
struct PSI_statement_locker;
typedef struct PSI_statement_locker PSI_statement_locker;
struct PSI_idle_locker;
typedef struct PSI_idle_locker PSI_idle_locker;
struct PSI_digest_locker;
typedef struct PSI_digest_locker PSI_digest_locker;
struct PSI_bootstrap
{
void* (*get_interface)(int version);
};
typedef struct PSI_bootstrap PSI_bootstrap;
struct PSI_none
{
int opaque;
};
typedef struct PSI_none PSI;
struct PSI_stage_info_none
{
unsigned int m_key;
const char *m_name;
int m_flags;
};
typedef struct PSI_stage_info_none PSI_stage_info;
extern MYSQL_PLUGIN_IMPORT PSI *PSI_server;
C_MODE_END

View file

@ -0,0 +1,26 @@
/* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */
/**
@file mysql/psi/psi_abi_v1.h
ABI check for mysql/psi/psi.h, when using PSI_VERSION_1.
This file is only used to automate detection of changes between versions.
Do not include this file, include mysql/psi/psi.h instead.
*/
#define USE_PSI_1
#define HAVE_PSI_INTERFACE
#define MY_GLOBAL_INCLUDED
#include "mysql/psi/psi.h"

View file

@ -0,0 +1,634 @@
#include "mysql/psi/psi.h"
C_MODE_START
struct TABLE_SHARE;
struct OPAQUE_LEX_YYSTYPE;
struct PSI_mutex;
typedef struct PSI_mutex PSI_mutex;
struct PSI_rwlock;
typedef struct PSI_rwlock PSI_rwlock;
struct PSI_cond;
typedef struct PSI_cond PSI_cond;
struct PSI_table_share;
typedef struct PSI_table_share PSI_table_share;
struct PSI_table;
typedef struct PSI_table PSI_table;
struct PSI_thread;
typedef struct PSI_thread PSI_thread;
struct PSI_file;
typedef struct PSI_file PSI_file;
struct PSI_socket;
typedef struct PSI_socket PSI_socket;
struct PSI_table_locker;
typedef struct PSI_table_locker PSI_table_locker;
struct PSI_statement_locker;
typedef struct PSI_statement_locker PSI_statement_locker;
struct PSI_idle_locker;
typedef struct PSI_idle_locker PSI_idle_locker;
struct PSI_digest_locker;
typedef struct PSI_digest_locker PSI_digest_locker;
struct PSI_bootstrap
{
void* (*get_interface)(int version);
};
typedef struct PSI_bootstrap PSI_bootstrap;
struct PSI_mutex_locker;
typedef struct PSI_mutex_locker PSI_mutex_locker;
struct PSI_rwlock_locker;
typedef struct PSI_rwlock_locker PSI_rwlock_locker;
struct PSI_cond_locker;
typedef struct PSI_cond_locker PSI_cond_locker;
struct PSI_file_locker;
typedef struct PSI_file_locker PSI_file_locker;
struct PSI_socket_locker;
typedef struct PSI_socket_locker PSI_socket_locker;
enum PSI_mutex_operation
{
PSI_MUTEX_LOCK= 0,
PSI_MUTEX_TRYLOCK= 1
};
typedef enum PSI_mutex_operation PSI_mutex_operation;
enum PSI_rwlock_operation
{
PSI_RWLOCK_READLOCK= 0,
PSI_RWLOCK_WRITELOCK= 1,
PSI_RWLOCK_TRYREADLOCK= 2,
PSI_RWLOCK_TRYWRITELOCK= 3
};
typedef enum PSI_rwlock_operation PSI_rwlock_operation;
enum PSI_cond_operation
{
PSI_COND_WAIT= 0,
PSI_COND_TIMEDWAIT= 1
};
typedef enum PSI_cond_operation PSI_cond_operation;
enum PSI_file_operation
{
PSI_FILE_CREATE= 0,
PSI_FILE_CREATE_TMP= 1,
PSI_FILE_OPEN= 2,
PSI_FILE_STREAM_OPEN= 3,
PSI_FILE_CLOSE= 4,
PSI_FILE_STREAM_CLOSE= 5,
PSI_FILE_READ= 6,
PSI_FILE_WRITE= 7,
PSI_FILE_SEEK= 8,
PSI_FILE_TELL= 9,
PSI_FILE_FLUSH= 10,
PSI_FILE_STAT= 11,
PSI_FILE_FSTAT= 12,
PSI_FILE_CHSIZE= 13,
PSI_FILE_DELETE= 14,
PSI_FILE_RENAME= 15,
PSI_FILE_SYNC= 16
};
typedef enum PSI_file_operation PSI_file_operation;
enum PSI_table_io_operation
{
PSI_TABLE_FETCH_ROW= 0,
PSI_TABLE_WRITE_ROW= 1,
PSI_TABLE_UPDATE_ROW= 2,
PSI_TABLE_DELETE_ROW= 3
};
typedef enum PSI_table_io_operation PSI_table_io_operation;
enum PSI_table_lock_operation
{
PSI_TABLE_LOCK= 0,
PSI_TABLE_EXTERNAL_LOCK= 1
};
typedef enum PSI_table_lock_operation PSI_table_lock_operation;
enum PSI_socket_state
{
PSI_SOCKET_STATE_IDLE= 1,
PSI_SOCKET_STATE_ACTIVE= 2
};
typedef enum PSI_socket_state PSI_socket_state;
enum PSI_socket_operation
{
PSI_SOCKET_CREATE= 0,
PSI_SOCKET_CONNECT= 1,
PSI_SOCKET_BIND= 2,
PSI_SOCKET_CLOSE= 3,
PSI_SOCKET_SEND= 4,
PSI_SOCKET_RECV= 5,
PSI_SOCKET_SENDTO= 6,
PSI_SOCKET_RECVFROM= 7,
PSI_SOCKET_SENDMSG= 8,
PSI_SOCKET_RECVMSG= 9,
PSI_SOCKET_SEEK= 10,
PSI_SOCKET_OPT= 11,
PSI_SOCKET_STAT= 12,
PSI_SOCKET_SHUTDOWN= 13,
PSI_SOCKET_SELECT= 14
};
typedef enum PSI_socket_operation PSI_socket_operation;
typedef unsigned int PSI_mutex_key;
typedef unsigned int PSI_rwlock_key;
typedef unsigned int PSI_cond_key;
typedef unsigned int PSI_thread_key;
typedef unsigned int PSI_file_key;
typedef unsigned int PSI_stage_key;
typedef unsigned int PSI_statement_key;
typedef unsigned int PSI_socket_key;
struct PSI_mutex_info_v1
{
PSI_mutex_key *m_key;
const char *m_name;
int m_flags;
};
struct PSI_rwlock_info_v1
{
PSI_rwlock_key *m_key;
const char *m_name;
int m_flags;
};
struct PSI_cond_info_v1
{
PSI_cond_key *m_key;
const char *m_name;
int m_flags;
};
struct PSI_thread_info_v1
{
PSI_thread_key *m_key;
const char *m_name;
int m_flags;
};
struct PSI_file_info_v1
{
PSI_file_key *m_key;
const char *m_name;
int m_flags;
};
struct PSI_stage_info_v1
{
PSI_stage_key m_key;
const char *m_name;
int m_flags;
};
struct PSI_statement_info_v1
{
PSI_statement_key m_key;
const char *m_name;
int m_flags;
};
struct PSI_socket_info_v1
{
PSI_socket_key *m_key;
const char *m_name;
int m_flags;
};
struct PSI_idle_locker_state_v1
{
uint m_flags;
struct PSI_thread *m_thread;
ulonglong m_timer_start;
ulonglong (*m_timer)(void);
void *m_wait;
};
struct PSI_mutex_locker_state_v1
{
uint m_flags;
enum PSI_mutex_operation m_operation;
struct PSI_mutex *m_mutex;
struct PSI_thread *m_thread;
ulonglong m_timer_start;
ulonglong (*m_timer)(void);
void *m_wait;
};
struct PSI_rwlock_locker_state_v1
{
uint m_flags;
enum PSI_rwlock_operation m_operation;
struct PSI_rwlock *m_rwlock;
struct PSI_thread *m_thread;
ulonglong m_timer_start;
ulonglong (*m_timer)(void);
void *m_wait;
};
struct PSI_cond_locker_state_v1
{
uint m_flags;
enum PSI_cond_operation m_operation;
struct PSI_cond *m_cond;
struct PSI_mutex *m_mutex;
struct PSI_thread *m_thread;
ulonglong m_timer_start;
ulonglong (*m_timer)(void);
void *m_wait;
};
struct PSI_file_locker_state_v1
{
uint m_flags;
enum PSI_file_operation m_operation;
struct PSI_file *m_file;
const char *m_name;
void *m_class;
struct PSI_thread *m_thread;
size_t m_number_of_bytes;
ulonglong m_timer_start;
ulonglong (*m_timer)(void);
void *m_wait;
};
struct PSI_table_locker_state_v1
{
uint m_flags;
enum PSI_table_io_operation m_io_operation;
struct PSI_table *m_table;
struct PSI_table_share *m_table_share;
struct PSI_thread *m_thread;
ulonglong m_timer_start;
ulonglong (*m_timer)(void);
void *m_wait;
uint m_index;
};
struct PSI_digest_storage
{
my_bool m_full;
int m_byte_count;
uint m_charset_number;
unsigned char m_token_array[1024];
};
typedef struct PSI_digest_storage PSI_digest_storage;
struct PSI_digest_locker_state
{
int m_last_id_index;
PSI_digest_storage m_digest_storage;
};
typedef struct PSI_digest_locker_state PSI_digest_locker_state;
struct PSI_statement_locker_state_v1
{
my_bool m_discarded;
uchar m_no_index_used;
uchar m_no_good_index_used;
uint m_flags;
void *m_class;
struct PSI_thread *m_thread;
ulonglong m_timer_start;
ulonglong (*m_timer)(void);
void *m_statement;
ulonglong m_lock_time;
ulonglong m_rows_sent;
ulonglong m_rows_examined;
ulong m_created_tmp_disk_tables;
ulong m_created_tmp_tables;
ulong m_select_full_join;
ulong m_select_full_range_join;
ulong m_select_range;
ulong m_select_range_check;
ulong m_select_scan;
ulong m_sort_merge_passes;
ulong m_sort_range;
ulong m_sort_rows;
ulong m_sort_scan;
PSI_digest_locker_state m_digest_state;
char m_schema_name[(64 * 3)];
uint m_schema_name_length;
};
struct PSI_socket_locker_state_v1
{
uint m_flags;
struct PSI_socket *m_socket;
struct PSI_thread *m_thread;
size_t m_number_of_bytes;
ulonglong m_timer_start;
ulonglong (*m_timer)(void);
enum PSI_socket_operation m_operation;
const char* m_src_file;
int m_src_line;
void *m_wait;
};
typedef void (*register_mutex_v1_t)
(const char *category, struct PSI_mutex_info_v1 *info, int count);
typedef void (*register_rwlock_v1_t)
(const char *category, struct PSI_rwlock_info_v1 *info, int count);
typedef void (*register_cond_v1_t)
(const char *category, struct PSI_cond_info_v1 *info, int count);
typedef void (*register_thread_v1_t)
(const char *category, struct PSI_thread_info_v1 *info, int count);
typedef void (*register_file_v1_t)
(const char *category, struct PSI_file_info_v1 *info, int count);
typedef void (*register_stage_v1_t)
(const char *category, struct PSI_stage_info_v1 **info, int count);
typedef void (*register_statement_v1_t)
(const char *category, struct PSI_statement_info_v1 *info, int count);
typedef void (*register_socket_v1_t)
(const char *category, struct PSI_socket_info_v1 *info, int count);
typedef struct PSI_mutex* (*init_mutex_v1_t)
(PSI_mutex_key key, const void *identity);
typedef void (*destroy_mutex_v1_t)(struct PSI_mutex *mutex);
typedef struct PSI_rwlock* (*init_rwlock_v1_t)
(PSI_rwlock_key key, const void *identity);
typedef void (*destroy_rwlock_v1_t)(struct PSI_rwlock *rwlock);
typedef struct PSI_cond* (*init_cond_v1_t)
(PSI_cond_key key, const void *identity);
typedef void (*destroy_cond_v1_t)(struct PSI_cond *cond);
typedef struct PSI_socket* (*init_socket_v1_t)
(PSI_socket_key key, const my_socket *fd,
const struct sockaddr *addr, socklen_t addr_len);
typedef void (*destroy_socket_v1_t)(struct PSI_socket *socket);
typedef struct PSI_table_share* (*get_table_share_v1_t)
(my_bool temporary, struct TABLE_SHARE *share);
typedef void (*release_table_share_v1_t)(struct PSI_table_share *share);
typedef void (*drop_table_share_v1_t)
(my_bool temporary, const char *schema_name, int schema_name_length,
const char *table_name, int table_name_length);
typedef struct PSI_table* (*open_table_v1_t)
(struct PSI_table_share *share, const void *identity);
typedef void (*unbind_table_v1_t)
(struct PSI_table *table);
typedef PSI_table* (*rebind_table_v1_t)
(PSI_table_share *share, const void *identity, PSI_table *table);
typedef void (*close_table_v1_t)(struct PSI_table *table);
typedef void (*create_file_v1_t)(PSI_file_key key, const char *name,
File file);
typedef int (*spawn_thread_v1_t)(PSI_thread_key key,
pthread_t *thread,
const pthread_attr_t *attr,
void *(*start_routine)(void*), void *arg);
typedef struct PSI_thread* (*new_thread_v1_t)
(PSI_thread_key key, const void *identity, ulonglong thread_id);
typedef void (*set_thread_id_v1_t)(struct PSI_thread *thread,
ulonglong id);
typedef struct PSI_thread* (*get_thread_v1_t)(void);
typedef void (*set_thread_user_v1_t)(const char *user, int user_len);
typedef void (*set_thread_user_host_v1_t)(const char *user, int user_len,
const char *host, int host_len);
typedef void (*set_thread_db_v1_t)(const char* db, int db_len);
typedef void (*set_thread_command_v1_t)(int command);
typedef void (*set_thread_start_time_v1_t)(time_t start_time);
typedef void (*set_thread_state_v1_t)(const char* state);
typedef void (*set_thread_info_v1_t)(const char* info, int info_len);
typedef void (*set_thread_v1_t)(struct PSI_thread *thread);
typedef void (*delete_current_thread_v1_t)(void);
typedef void (*delete_thread_v1_t)(struct PSI_thread *thread);
typedef struct PSI_file_locker* (*get_thread_file_name_locker_v1_t)
(struct PSI_file_locker_state_v1 *state,
PSI_file_key key, enum PSI_file_operation op, const char *name,
const void *identity);
typedef struct PSI_file_locker* (*get_thread_file_stream_locker_v1_t)
(struct PSI_file_locker_state_v1 *state,
struct PSI_file *file, enum PSI_file_operation op);
typedef struct PSI_file_locker* (*get_thread_file_descriptor_locker_v1_t)
(struct PSI_file_locker_state_v1 *state,
File file, enum PSI_file_operation op);
typedef void (*unlock_mutex_v1_t)
(struct PSI_mutex *mutex);
typedef void (*unlock_rwlock_v1_t)
(struct PSI_rwlock *rwlock);
typedef void (*signal_cond_v1_t)
(struct PSI_cond *cond);
typedef void (*broadcast_cond_v1_t)
(struct PSI_cond *cond);
typedef struct PSI_idle_locker* (*start_idle_wait_v1_t)
(struct PSI_idle_locker_state_v1 *state, const char *src_file, uint src_line);
typedef void (*end_idle_wait_v1_t)
(struct PSI_idle_locker *locker);
typedef struct PSI_mutex_locker* (*start_mutex_wait_v1_t)
(struct PSI_mutex_locker_state_v1 *state,
struct PSI_mutex *mutex,
enum PSI_mutex_operation op,
const char *src_file, uint src_line);
typedef void (*end_mutex_wait_v1_t)
(struct PSI_mutex_locker *locker, int rc);
typedef struct PSI_rwlock_locker* (*start_rwlock_rdwait_v1_t)
(struct PSI_rwlock_locker_state_v1 *state,
struct PSI_rwlock *rwlock,
enum PSI_rwlock_operation op,
const char *src_file, uint src_line);
typedef void (*end_rwlock_rdwait_v1_t)
(struct PSI_rwlock_locker *locker, int rc);
typedef struct PSI_rwlock_locker* (*start_rwlock_wrwait_v1_t)
(struct PSI_rwlock_locker_state_v1 *state,
struct PSI_rwlock *rwlock,
enum PSI_rwlock_operation op,
const char *src_file, uint src_line);
typedef void (*end_rwlock_wrwait_v1_t)
(struct PSI_rwlock_locker *locker, int rc);
typedef struct PSI_cond_locker* (*start_cond_wait_v1_t)
(struct PSI_cond_locker_state_v1 *state,
struct PSI_cond *cond,
struct PSI_mutex *mutex,
enum PSI_cond_operation op,
const char *src_file, uint src_line);
typedef void (*end_cond_wait_v1_t)
(struct PSI_cond_locker *locker, int rc);
typedef struct PSI_table_locker* (*start_table_io_wait_v1_t)
(struct PSI_table_locker_state_v1 *state,
struct PSI_table *table,
enum PSI_table_io_operation op,
uint index,
const char *src_file, uint src_line);
typedef void (*end_table_io_wait_v1_t)(struct PSI_table_locker *locker);
typedef struct PSI_table_locker* (*start_table_lock_wait_v1_t)
(struct PSI_table_locker_state_v1 *state,
struct PSI_table *table,
enum PSI_table_lock_operation op,
ulong flags,
const char *src_file, uint src_line);
typedef void (*end_table_lock_wait_v1_t)(struct PSI_table_locker *locker);
typedef void (*start_file_open_wait_v1_t)
(struct PSI_file_locker *locker, const char *src_file, uint src_line);
typedef struct PSI_file* (*end_file_open_wait_v1_t)
(struct PSI_file_locker *locker, void *result);
typedef void (*end_file_open_wait_and_bind_to_descriptor_v1_t)
(struct PSI_file_locker *locker, File file);
typedef void (*start_file_wait_v1_t)
(struct PSI_file_locker *locker, size_t count,
const char *src_file, uint src_line);
typedef void (*end_file_wait_v1_t)
(struct PSI_file_locker *locker, size_t count);
typedef void (*start_file_close_wait_v1_t)
(struct PSI_file_locker *locker, const char *src_file, uint src_line);
typedef void (*end_file_close_wait_v1_t)
(struct PSI_file_locker *locker, int rc);
typedef void (*start_stage_v1_t)
(PSI_stage_key key, const char *src_file, int src_line);
typedef void (*end_stage_v1_t) (void);
typedef struct PSI_statement_locker* (*get_thread_statement_locker_v1_t)
(struct PSI_statement_locker_state_v1 *state,
PSI_statement_key key, const void *charset);
typedef struct PSI_statement_locker* (*refine_statement_v1_t)
(struct PSI_statement_locker *locker,
PSI_statement_key key);
typedef void (*start_statement_v1_t)
(struct PSI_statement_locker *locker,
const char *db, uint db_length,
const char *src_file, uint src_line);
typedef void (*set_statement_text_v1_t)
(struct PSI_statement_locker *locker,
const char *text, uint text_len);
typedef void (*set_statement_lock_time_t)
(struct PSI_statement_locker *locker, ulonglong lock_time);
typedef void (*set_statement_rows_sent_t)
(struct PSI_statement_locker *locker, ulonglong count);
typedef void (*set_statement_rows_examined_t)
(struct PSI_statement_locker *locker, ulonglong count);
typedef void (*inc_statement_created_tmp_disk_tables_t)
(struct PSI_statement_locker *locker, ulong count);
typedef void (*inc_statement_created_tmp_tables_t)
(struct PSI_statement_locker *locker, ulong count);
typedef void (*inc_statement_select_full_join_t)
(struct PSI_statement_locker *locker, ulong count);
typedef void (*inc_statement_select_full_range_join_t)
(struct PSI_statement_locker *locker, ulong count);
typedef void (*inc_statement_select_range_t)
(struct PSI_statement_locker *locker, ulong count);
typedef void (*inc_statement_select_range_check_t)
(struct PSI_statement_locker *locker, ulong count);
typedef void (*inc_statement_select_scan_t)
(struct PSI_statement_locker *locker, ulong count);
typedef void (*inc_statement_sort_merge_passes_t)
(struct PSI_statement_locker *locker, ulong count);
typedef void (*inc_statement_sort_range_t)
(struct PSI_statement_locker *locker, ulong count);
typedef void (*inc_statement_sort_rows_t)
(struct PSI_statement_locker *locker, ulong count);
typedef void (*inc_statement_sort_scan_t)
(struct PSI_statement_locker *locker, ulong count);
typedef void (*set_statement_no_index_used_t)
(struct PSI_statement_locker *locker);
typedef void (*set_statement_no_good_index_used_t)
(struct PSI_statement_locker *locker);
typedef void (*end_statement_v1_t)
(struct PSI_statement_locker *locker, void *stmt_da);
typedef struct PSI_socket_locker* (*start_socket_wait_v1_t)
(struct PSI_socket_locker_state_v1 *state,
struct PSI_socket *socket,
enum PSI_socket_operation op,
size_t count,
const char *src_file, uint src_line);
typedef void (*end_socket_wait_v1_t)
(struct PSI_socket_locker *locker, size_t count);
typedef void (*set_socket_state_v1_t)(struct PSI_socket *socket,
enum PSI_socket_state state);
typedef void (*set_socket_info_v1_t)(struct PSI_socket *socket,
const my_socket *fd,
const struct sockaddr *addr,
socklen_t addr_len);
typedef void (*set_socket_thread_owner_v1_t)(struct PSI_socket *socket);
typedef struct PSI_digest_locker * (*digest_start_v1_t)
(struct PSI_statement_locker *locker);
typedef struct PSI_digest_locker* (*digest_add_token_v1_t)
(struct PSI_digest_locker *locker, uint token, struct OPAQUE_LEX_YYSTYPE *yylval);
typedef int (*set_thread_connect_attrs_v1_t)(const char *buffer, uint length,
const void *from_cs);
struct PSI_v1
{
register_mutex_v1_t register_mutex;
register_rwlock_v1_t register_rwlock;
register_cond_v1_t register_cond;
register_thread_v1_t register_thread;
register_file_v1_t register_file;
register_stage_v1_t register_stage;
register_statement_v1_t register_statement;
register_socket_v1_t register_socket;
init_mutex_v1_t init_mutex;
destroy_mutex_v1_t destroy_mutex;
init_rwlock_v1_t init_rwlock;
destroy_rwlock_v1_t destroy_rwlock;
init_cond_v1_t init_cond;
destroy_cond_v1_t destroy_cond;
init_socket_v1_t init_socket;
destroy_socket_v1_t destroy_socket;
get_table_share_v1_t get_table_share;
release_table_share_v1_t release_table_share;
drop_table_share_v1_t drop_table_share;
open_table_v1_t open_table;
unbind_table_v1_t unbind_table;
rebind_table_v1_t rebind_table;
close_table_v1_t close_table;
create_file_v1_t create_file;
spawn_thread_v1_t spawn_thread;
new_thread_v1_t new_thread;
set_thread_id_v1_t set_thread_id;
get_thread_v1_t get_thread;
set_thread_user_v1_t set_thread_user;
set_thread_user_host_v1_t set_thread_user_host;
set_thread_db_v1_t set_thread_db;
set_thread_command_v1_t set_thread_command;
set_thread_start_time_v1_t set_thread_start_time;
set_thread_state_v1_t set_thread_state;
set_thread_info_v1_t set_thread_info;
set_thread_v1_t set_thread;
delete_current_thread_v1_t delete_current_thread;
delete_thread_v1_t delete_thread;
get_thread_file_name_locker_v1_t get_thread_file_name_locker;
get_thread_file_stream_locker_v1_t get_thread_file_stream_locker;
get_thread_file_descriptor_locker_v1_t get_thread_file_descriptor_locker;
unlock_mutex_v1_t unlock_mutex;
unlock_rwlock_v1_t unlock_rwlock;
signal_cond_v1_t signal_cond;
broadcast_cond_v1_t broadcast_cond;
start_idle_wait_v1_t start_idle_wait;
end_idle_wait_v1_t end_idle_wait;
start_mutex_wait_v1_t start_mutex_wait;
end_mutex_wait_v1_t end_mutex_wait;
start_rwlock_rdwait_v1_t start_rwlock_rdwait;
end_rwlock_rdwait_v1_t end_rwlock_rdwait;
start_rwlock_wrwait_v1_t start_rwlock_wrwait;
end_rwlock_wrwait_v1_t end_rwlock_wrwait;
start_cond_wait_v1_t start_cond_wait;
end_cond_wait_v1_t end_cond_wait;
start_table_io_wait_v1_t start_table_io_wait;
end_table_io_wait_v1_t end_table_io_wait;
start_table_lock_wait_v1_t start_table_lock_wait;
end_table_lock_wait_v1_t end_table_lock_wait;
start_file_open_wait_v1_t start_file_open_wait;
end_file_open_wait_v1_t end_file_open_wait;
end_file_open_wait_and_bind_to_descriptor_v1_t
end_file_open_wait_and_bind_to_descriptor;
start_file_wait_v1_t start_file_wait;
end_file_wait_v1_t end_file_wait;
start_file_close_wait_v1_t start_file_close_wait;
end_file_close_wait_v1_t end_file_close_wait;
start_stage_v1_t start_stage;
end_stage_v1_t end_stage;
get_thread_statement_locker_v1_t get_thread_statement_locker;
refine_statement_v1_t refine_statement;
start_statement_v1_t start_statement;
set_statement_text_v1_t set_statement_text;
set_statement_lock_time_t set_statement_lock_time;
set_statement_rows_sent_t set_statement_rows_sent;
set_statement_rows_examined_t set_statement_rows_examined;
inc_statement_created_tmp_disk_tables_t inc_statement_created_tmp_disk_tables;
inc_statement_created_tmp_tables_t inc_statement_created_tmp_tables;
inc_statement_select_full_join_t inc_statement_select_full_join;
inc_statement_select_full_range_join_t inc_statement_select_full_range_join;
inc_statement_select_range_t inc_statement_select_range;
inc_statement_select_range_check_t inc_statement_select_range_check;
inc_statement_select_scan_t inc_statement_select_scan;
inc_statement_sort_merge_passes_t inc_statement_sort_merge_passes;
inc_statement_sort_range_t inc_statement_sort_range;
inc_statement_sort_rows_t inc_statement_sort_rows;
inc_statement_sort_scan_t inc_statement_sort_scan;
set_statement_no_index_used_t set_statement_no_index_used;
set_statement_no_good_index_used_t set_statement_no_good_index_used;
end_statement_v1_t end_statement;
start_socket_wait_v1_t start_socket_wait;
end_socket_wait_v1_t end_socket_wait;
set_socket_state_v1_t set_socket_state;
set_socket_info_v1_t set_socket_info;
set_socket_thread_owner_v1_t set_socket_thread_owner;
digest_start_v1_t digest_start;
digest_add_token_v1_t digest_add_token;
set_thread_connect_attrs_v1_t set_thread_connect_attrs;
};
typedef struct PSI_v1 PSI;
typedef struct PSI_mutex_info_v1 PSI_mutex_info;
typedef struct PSI_rwlock_info_v1 PSI_rwlock_info;
typedef struct PSI_cond_info_v1 PSI_cond_info;
typedef struct PSI_thread_info_v1 PSI_thread_info;
typedef struct PSI_file_info_v1 PSI_file_info;
typedef struct PSI_stage_info_v1 PSI_stage_info;
typedef struct PSI_statement_info_v1 PSI_statement_info;
typedef struct PSI_socket_info_v1 PSI_socket_info;
typedef struct PSI_idle_locker_state_v1 PSI_idle_locker_state;
typedef struct PSI_mutex_locker_state_v1 PSI_mutex_locker_state;
typedef struct PSI_rwlock_locker_state_v1 PSI_rwlock_locker_state;
typedef struct PSI_cond_locker_state_v1 PSI_cond_locker_state;
typedef struct PSI_file_locker_state_v1 PSI_file_locker_state;
typedef struct PSI_table_locker_state_v1 PSI_table_locker_state;
typedef struct PSI_statement_locker_state_v1 PSI_statement_locker_state;
typedef struct PSI_socket_locker_state_v1 PSI_socket_locker_state;
extern MYSQL_PLUGIN_IMPORT PSI *PSI_server;
C_MODE_END

View file

@ -0,0 +1,26 @@
/* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */
/**
@file mysql/psi/psi_abi_v1.h
ABI check for mysql/psi/psi.h, when using PSI_VERSION_2.
This file is only used to automate detection of changes between versions.
Do not include this file, include mysql/psi/psi.h instead.
*/
#define USE_PSI_2
#define HAVE_PSI_INTERFACE
#define _global_h
#include "mysql/psi/psi.h"

View file

@ -0,0 +1,214 @@
#include "mysql/psi/psi.h"
C_MODE_START
struct TABLE_SHARE;
struct OPAQUE_LEX_YYSTYPE;
struct PSI_mutex;
typedef struct PSI_mutex PSI_mutex;
struct PSI_rwlock;
typedef struct PSI_rwlock PSI_rwlock;
struct PSI_cond;
typedef struct PSI_cond PSI_cond;
struct PSI_table_share;
typedef struct PSI_table_share PSI_table_share;
struct PSI_table;
typedef struct PSI_table PSI_table;
struct PSI_thread;
typedef struct PSI_thread PSI_thread;
struct PSI_file;
typedef struct PSI_file PSI_file;
struct PSI_socket;
typedef struct PSI_socket PSI_socket;
struct PSI_table_locker;
typedef struct PSI_table_locker PSI_table_locker;
struct PSI_statement_locker;
typedef struct PSI_statement_locker PSI_statement_locker;
struct PSI_idle_locker;
typedef struct PSI_idle_locker PSI_idle_locker;
struct PSI_digest_locker;
typedef struct PSI_digest_locker PSI_digest_locker;
struct PSI_bootstrap
{
void* (*get_interface)(int version);
};
typedef struct PSI_bootstrap PSI_bootstrap;
struct PSI_mutex_locker;
typedef struct PSI_mutex_locker PSI_mutex_locker;
struct PSI_rwlock_locker;
typedef struct PSI_rwlock_locker PSI_rwlock_locker;
struct PSI_cond_locker;
typedef struct PSI_cond_locker PSI_cond_locker;
struct PSI_file_locker;
typedef struct PSI_file_locker PSI_file_locker;
struct PSI_socket_locker;
typedef struct PSI_socket_locker PSI_socket_locker;
enum PSI_mutex_operation
{
PSI_MUTEX_LOCK= 0,
PSI_MUTEX_TRYLOCK= 1
};
typedef enum PSI_mutex_operation PSI_mutex_operation;
enum PSI_rwlock_operation
{
PSI_RWLOCK_READLOCK= 0,
PSI_RWLOCK_WRITELOCK= 1,
PSI_RWLOCK_TRYREADLOCK= 2,
PSI_RWLOCK_TRYWRITELOCK= 3
};
typedef enum PSI_rwlock_operation PSI_rwlock_operation;
enum PSI_cond_operation
{
PSI_COND_WAIT= 0,
PSI_COND_TIMEDWAIT= 1
};
typedef enum PSI_cond_operation PSI_cond_operation;
enum PSI_file_operation
{
PSI_FILE_CREATE= 0,
PSI_FILE_CREATE_TMP= 1,
PSI_FILE_OPEN= 2,
PSI_FILE_STREAM_OPEN= 3,
PSI_FILE_CLOSE= 4,
PSI_FILE_STREAM_CLOSE= 5,
PSI_FILE_READ= 6,
PSI_FILE_WRITE= 7,
PSI_FILE_SEEK= 8,
PSI_FILE_TELL= 9,
PSI_FILE_FLUSH= 10,
PSI_FILE_STAT= 11,
PSI_FILE_FSTAT= 12,
PSI_FILE_CHSIZE= 13,
PSI_FILE_DELETE= 14,
PSI_FILE_RENAME= 15,
PSI_FILE_SYNC= 16
};
typedef enum PSI_file_operation PSI_file_operation;
enum PSI_table_io_operation
{
PSI_TABLE_FETCH_ROW= 0,
PSI_TABLE_WRITE_ROW= 1,
PSI_TABLE_UPDATE_ROW= 2,
PSI_TABLE_DELETE_ROW= 3
};
typedef enum PSI_table_io_operation PSI_table_io_operation;
enum PSI_table_lock_operation
{
PSI_TABLE_LOCK= 0,
PSI_TABLE_EXTERNAL_LOCK= 1
};
typedef enum PSI_table_lock_operation PSI_table_lock_operation;
enum PSI_socket_state
{
PSI_SOCKET_STATE_IDLE= 1,
PSI_SOCKET_STATE_ACTIVE= 2
};
typedef enum PSI_socket_state PSI_socket_state;
enum PSI_socket_operation
{
PSI_SOCKET_CREATE= 0,
PSI_SOCKET_CONNECT= 1,
PSI_SOCKET_BIND= 2,
PSI_SOCKET_CLOSE= 3,
PSI_SOCKET_SEND= 4,
PSI_SOCKET_RECV= 5,
PSI_SOCKET_SENDTO= 6,
PSI_SOCKET_RECVFROM= 7,
PSI_SOCKET_SENDMSG= 8,
PSI_SOCKET_RECVMSG= 9,
PSI_SOCKET_SEEK= 10,
PSI_SOCKET_OPT= 11,
PSI_SOCKET_STAT= 12,
PSI_SOCKET_SHUTDOWN= 13,
PSI_SOCKET_SELECT= 14
};
typedef enum PSI_socket_operation PSI_socket_operation;
typedef unsigned int PSI_mutex_key;
typedef unsigned int PSI_rwlock_key;
typedef unsigned int PSI_cond_key;
typedef unsigned int PSI_thread_key;
typedef unsigned int PSI_file_key;
typedef unsigned int PSI_stage_key;
typedef unsigned int PSI_statement_key;
typedef unsigned int PSI_socket_key;
struct PSI_v2
{
int placeholder;
};
struct PSI_mutex_info_v2
{
int placeholder;
};
struct PSI_rwlock_info_v2
{
int placeholder;
};
struct PSI_cond_info_v2
{
int placeholder;
};
struct PSI_thread_info_v2
{
int placeholder;
};
struct PSI_file_info_v2
{
int placeholder;
};
struct PSI_stage_info_v2
{
int placeholder;
};
struct PSI_statement_info_v2
{
int placeholder;
};
struct PSI_idle_locker_state_v2
{
int placeholder;
};
struct PSI_mutex_locker_state_v2
{
int placeholder;
};
struct PSI_rwlock_locker_state_v2
{
int placeholder;
};
struct PSI_cond_locker_state_v2
{
int placeholder;
};
struct PSI_file_locker_state_v2
{
int placeholder;
};
struct PSI_table_locker_state_v2
{
int placeholder;
};
struct PSI_statement_locker_state_v2
{
int placeholder;
};
struct PSI_socket_locker_state_v2
{
int placeholder;
};
typedef struct PSI_v2 PSI;
typedef struct PSI_mutex_info_v2 PSI_mutex_info;
typedef struct PSI_rwlock_info_v2 PSI_rwlock_info;
typedef struct PSI_cond_info_v2 PSI_cond_info;
typedef struct PSI_thread_info_v2 PSI_thread_info;
typedef struct PSI_file_info_v2 PSI_file_info;
typedef struct PSI_stage_info_v2 PSI_stage_info;
typedef struct PSI_statement_info_v2 PSI_statement_info;
typedef struct PSI_socket_info_v2 PSI_socket_info;
typedef struct PSI_idle_locker_state_v2 PSI_idle_locker_state;
typedef struct PSI_mutex_locker_state_v2 PSI_mutex_locker_state;
typedef struct PSI_rwlock_locker_state_v2 PSI_rwlock_locker_state;
typedef struct PSI_cond_locker_state_v2 PSI_cond_locker_state;
typedef struct PSI_file_locker_state_v2 PSI_file_locker_state;
typedef struct PSI_table_locker_state_v2 PSI_table_locker_state;
typedef struct PSI_statement_locker_state_v2 PSI_statement_locker_state;
typedef struct PSI_socket_locker_state_v2 PSI_socket_locker_state;
extern MYSQL_PLUGIN_IMPORT PSI *PSI_server;
C_MODE_END