mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
5.7.13
This commit is contained in:
@ -43,6 +43,10 @@
|
||||
|
||||
#include "mysql/psi/psi.h"
|
||||
|
||||
#ifndef PSI_FILE_CALL
|
||||
#define PSI_FILE_CALL(M) PSI_DYNAMIC_CALL(M)
|
||||
#endif
|
||||
|
||||
/**
|
||||
@defgroup File_instrumentation File Instrumentation
|
||||
@ingroup Instrumentation_interface
|
||||
@ -290,7 +294,7 @@
|
||||
*/
|
||||
#ifdef HAVE_PSI_FILE_INTERFACE
|
||||
#define mysql_file_create_temp(K, T, D, P, M, F) \
|
||||
inline_mysql_file_create_temp(K, T, D, P, M, F)
|
||||
inline_mysql_file_create_temp(K, __FILE__, __LINE__, T, D, P, M, F)
|
||||
#else
|
||||
#define mysql_file_create_temp(K, T, D, P, M, F) \
|
||||
inline_mysql_file_create_temp(T, D, P, M, F)
|
||||
@ -803,7 +807,8 @@ inline_mysql_file_fopen(
|
||||
const char *filename, int flags, myf myFlags)
|
||||
{
|
||||
MYSQL_FILE *that;
|
||||
that= (MYSQL_FILE*) my_malloc(sizeof(MYSQL_FILE), MYF(MY_WME));
|
||||
that= (MYSQL_FILE*) my_malloc(PSI_NOT_INSTRUMENTED,
|
||||
sizeof(MYSQL_FILE), MYF(MY_WME));
|
||||
if (likely(that != NULL))
|
||||
{
|
||||
#ifdef HAVE_PSI_FILE_INTERFACE
|
||||
@ -1011,20 +1016,27 @@ inline_mysql_file_create(
|
||||
static inline File
|
||||
inline_mysql_file_create_temp(
|
||||
#ifdef HAVE_PSI_FILE_INTERFACE
|
||||
PSI_file_key key,
|
||||
PSI_file_key key, const char *src_file, uint src_line,
|
||||
#endif
|
||||
char *to, const char *dir, const char *pfx, int mode, myf myFlags)
|
||||
{
|
||||
File file;
|
||||
/*
|
||||
TODO: This event is instrumented, but not timed.
|
||||
The problem is that the file name is now known
|
||||
before the create_temp_file call.
|
||||
*/
|
||||
file= create_temp_file(to, dir, pfx, mode, myFlags);
|
||||
#ifdef HAVE_PSI_FILE_INTERFACE
|
||||
PSI_FILE_CALL(create_file)(key, to, file);
|
||||
struct PSI_file_locker *locker;
|
||||
PSI_file_locker_state state;
|
||||
locker= PSI_FILE_CALL(get_thread_file_name_locker)
|
||||
(&state, key, PSI_FILE_CREATE, NULL, &locker);
|
||||
if (likely(locker != NULL))
|
||||
{
|
||||
PSI_FILE_CALL(start_file_open_wait)(locker, src_file, src_line);
|
||||
/* The file name is generated by create_temp_file(). */
|
||||
file= create_temp_file(to, dir, pfx, mode, myFlags);
|
||||
PSI_FILE_CALL(end_temp_file_open_wait_and_bind_to_descriptor)(locker, file, (const char*)to);
|
||||
return file;
|
||||
}
|
||||
#endif
|
||||
|
||||
file= create_temp_file(to, dir, pfx, mode, myFlags);
|
||||
return file;
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
/* Copyright (c) 2011, 2013, 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
|
||||
@ -23,6 +23,10 @@
|
||||
|
||||
#include "mysql/psi/psi.h"
|
||||
|
||||
#ifndef PSI_IDLE_CALL
|
||||
#define PSI_IDLE_CALL(M) PSI_DYNAMIC_CALL(M)
|
||||
#endif
|
||||
|
||||
/**
|
||||
@defgroup Idle_instrumentation Idle Instrumentation
|
||||
@ingroup Instrumentation_interface
|
||||
|
121
include/mysql/psi/mysql_mdl.h
Normal file
121
include/mysql/psi/mysql_mdl.h
Normal file
@ -0,0 +1,121 @@
|
||||
/* Copyright (c) 2012, 2015, 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_MDL_H
|
||||
#define MYSQL_MDL_H
|
||||
|
||||
/**
|
||||
@file mysql/psi/mysql_mdl.h
|
||||
Instrumentation helpers for metadata locks.
|
||||
*/
|
||||
|
||||
#include "mysql/psi/psi.h"
|
||||
|
||||
#ifndef PSI_METADATA_CALL
|
||||
#define PSI_METADATA_CALL(M) PSI_DYNAMIC_CALL(M)
|
||||
#endif
|
||||
|
||||
/**
|
||||
@defgroup Thread_instrumentation Metadata Instrumentation
|
||||
@ingroup Instrumentation_interface
|
||||
@{
|
||||
*/
|
||||
|
||||
/**
|
||||
@def mysql_mdl_create(K, M, A)
|
||||
Instrumented metadata lock creation.
|
||||
@param I Metadata lock identity
|
||||
@param K Metadata key
|
||||
@param T Metadata lock type
|
||||
@param D Metadata lock duration
|
||||
@param S Metadata lock status
|
||||
@param F request source file
|
||||
@param L request source line
|
||||
*/
|
||||
|
||||
#ifdef HAVE_PSI_METADATA_INTERFACE
|
||||
#define mysql_mdl_create(I, K, T, D, S, F, L) \
|
||||
inline_mysql_mdl_create(I, K, T, D, S, F, L)
|
||||
#else
|
||||
#define mysql_mdl_create(I, K, T, D, S, F, L) NULL
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PSI_METADATA_INTERFACE
|
||||
#define mysql_mdl_set_status(L, S) \
|
||||
inline_mysql_mdl_set_status(L, S)
|
||||
#else
|
||||
#define mysql_mdl_set_status(L, S) \
|
||||
do {} while (0)
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
@def mysql_mdl_destroy(M)
|
||||
Instrumented metadata lock destruction.
|
||||
@param M Metadata lock
|
||||
*/
|
||||
#ifdef HAVE_PSI_METADATA_INTERFACE
|
||||
#define mysql_mdl_destroy(M) \
|
||||
inline_mysql_mdl_destroy(M, __FILE__, __LINE__)
|
||||
#else
|
||||
#define mysql_mdl_destroy(M) \
|
||||
do {} while (0)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PSI_METADATA_INTERFACE
|
||||
|
||||
static inline PSI_metadata_lock *
|
||||
inline_mysql_mdl_create(void *identity,
|
||||
const MDL_key *mdl_key,
|
||||
enum_mdl_type mdl_type,
|
||||
enum_mdl_duration mdl_duration,
|
||||
MDL_ticket::enum_psi_status mdl_status,
|
||||
const char *src_file, uint src_line)
|
||||
{
|
||||
PSI_metadata_lock *result;
|
||||
|
||||
/* static_cast: Fit a round C++ enum peg into a square C int hole ... */
|
||||
result= PSI_METADATA_CALL(create_metadata_lock)
|
||||
(identity,
|
||||
mdl_key,
|
||||
static_cast<opaque_mdl_type> (mdl_type),
|
||||
static_cast<opaque_mdl_duration> (mdl_duration),
|
||||
static_cast<opaque_mdl_status> (mdl_status),
|
||||
src_file, src_line);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
static inline void inline_mysql_mdl_set_status(
|
||||
PSI_metadata_lock *psi,
|
||||
MDL_ticket::enum_psi_status mdl_status)
|
||||
{
|
||||
if (psi != NULL)
|
||||
PSI_METADATA_CALL(set_metadata_lock_status)(psi, mdl_status);
|
||||
}
|
||||
|
||||
static inline void inline_mysql_mdl_destroy(
|
||||
PSI_metadata_lock *psi,
|
||||
const char *src_file, uint src_line)
|
||||
{
|
||||
if (psi != NULL)
|
||||
PSI_METADATA_CALL(destroy_metadata_lock)(psi);
|
||||
}
|
||||
#endif /* HAVE_PSI_METADATA_INTERFACE */
|
||||
|
||||
/** @} (end of group Metadata_instrumentation) */
|
||||
|
||||
#endif
|
||||
|
62
include/mysql/psi/mysql_memory.h
Normal file
62
include/mysql/psi/mysql_memory.h
Normal file
@ -0,0 +1,62 @@
|
||||
/* Copyright (c) 2012, 2016, 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_MEMORY_H
|
||||
#define MYSQL_MEMORY_H
|
||||
|
||||
/**
|
||||
@file mysql/psi/mysql_memory.h
|
||||
Instrumentation helpers for memory allocation.
|
||||
*/
|
||||
|
||||
#include "mysql/psi/psi.h"
|
||||
|
||||
#ifndef PSI_MEMORY_CALL
|
||||
#define PSI_MEMORY_CALL(M) PSI_DYNAMIC_CALL(M)
|
||||
#endif
|
||||
|
||||
/**
|
||||
@defgroup Memory_instrumentation Memory Instrumentation
|
||||
@ingroup Instrumentation_interface
|
||||
@{
|
||||
*/
|
||||
|
||||
/**
|
||||
@def mysql_memory_register(P1, P2, P3)
|
||||
Memory registration.
|
||||
*/
|
||||
#define mysql_memory_register(P1, P2, P3) \
|
||||
inline_mysql_memory_register(P1, P2, P3)
|
||||
|
||||
static inline void inline_mysql_memory_register(
|
||||
#ifdef HAVE_PSI_MEMORY_INTERFACE
|
||||
const char *category,
|
||||
PSI_memory_info *info,
|
||||
int count)
|
||||
#else
|
||||
const char *category MY_ATTRIBUTE((unused)),
|
||||
void *info MY_ATTRIBUTE((unused)),
|
||||
int count MY_ATTRIBUTE((unused)))
|
||||
#endif
|
||||
{
|
||||
#ifdef HAVE_PSI_MEMORY_INTERFACE
|
||||
PSI_MEMORY_CALL(register_memory)(category, info, count);
|
||||
#endif
|
||||
}
|
||||
|
||||
/** @} (end of group Memory_instrumentation) */
|
||||
|
||||
#endif
|
||||
|
88
include/mysql/psi/mysql_ps.h
Normal file
88
include/mysql/psi/mysql_ps.h
Normal file
@ -0,0 +1,88 @@
|
||||
/* Copyright (c) 2014, 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_PS_H
|
||||
#define MYSQL_PS_H
|
||||
|
||||
/**
|
||||
@file mysql/psi/mysql_ps.h
|
||||
Instrumentation helpers for prepared statements.
|
||||
*/
|
||||
|
||||
#include "mysql/psi/psi.h"
|
||||
|
||||
#ifndef PSI_PS_CALL
|
||||
#define PSI_PS_CALL(M) PSI_DYNAMIC_CALL(M)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PSI_PS_INTERFACE
|
||||
#define MYSQL_CREATE_PS(IDENTITY, ID, LOCKER, NAME, NAME_LENGTH, SQLTEXT, SQLTEXT_LENGTH) \
|
||||
inline_mysql_create_prepared_stmt(IDENTITY, ID, LOCKER, NAME, NAME_LENGTH, SQLTEXT, SQLTEXT_LENGTH)
|
||||
#define MYSQL_EXECUTE_PS(LOCKER, PREPARED_STMT) \
|
||||
inline_mysql_execute_prepared_stmt(LOCKER, PREPARED_STMT)
|
||||
#define MYSQL_DESTROY_PS(PREPARED_STMT) \
|
||||
inline_mysql_destroy_prepared_stmt(PREPARED_STMT)
|
||||
#define MYSQL_REPREPARE_PS(PREPARED_STMT) \
|
||||
inline_mysql_reprepare_prepared_stmt(PREPARED_STMT)
|
||||
#else
|
||||
#define MYSQL_CREATE_PS(IDENTITY, ID, LOCKER, NAME, NAME_LENGTH, SQLTEXT, SQLTEXT_LENGTH) \
|
||||
NULL
|
||||
#define MYSQL_EXECUTE_PS(LOCKER, PREPARED_STMT) \
|
||||
do {} while (0)
|
||||
#define MYSQL_DESTROY_PS(PREPARED_STMT) \
|
||||
do {} while (0)
|
||||
#define MYSQL_REPREPARE_PS(PREPARED_STMT) \
|
||||
do {} while (0)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PSI_PS_INTERFACE
|
||||
static inline 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)
|
||||
{
|
||||
if (locker == NULL)
|
||||
return NULL;
|
||||
return PSI_PS_CALL(create_prepared_stmt)(identity, stmt_id,
|
||||
locker,
|
||||
stmt_name, stmt_name_length,
|
||||
sqltext, sqltext_length);
|
||||
}
|
||||
|
||||
static inline void
|
||||
inline_mysql_execute_prepared_stmt(PSI_statement_locker *locker,
|
||||
PSI_prepared_stmt* prepared_stmt)
|
||||
{
|
||||
if (prepared_stmt != NULL && locker != NULL)
|
||||
PSI_PS_CALL(execute_prepared_stmt)(locker, prepared_stmt);
|
||||
}
|
||||
|
||||
static inline void
|
||||
inline_mysql_destroy_prepared_stmt(PSI_prepared_stmt *prepared_stmt)
|
||||
{
|
||||
if (prepared_stmt != NULL)
|
||||
PSI_PS_CALL(destroy_prepared_stmt)(prepared_stmt);
|
||||
}
|
||||
|
||||
static inline void
|
||||
inline_mysql_reprepare_prepared_stmt(PSI_prepared_stmt *prepared_stmt)
|
||||
{
|
||||
if (prepared_stmt != NULL)
|
||||
PSI_PS_CALL(reprepare_prepared_stmt)(prepared_stmt);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
@ -26,7 +26,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
||||
/* For my_chsize */
|
||||
#include <my_sys.h>
|
||||
/* For socket api */
|
||||
#ifdef __WIN__
|
||||
#ifdef _WIN32
|
||||
#include <ws2def.h>
|
||||
#include <winsock2.h>
|
||||
#include <MSWSock.h>
|
||||
@ -42,6 +42,10 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
||||
|
||||
#include "mysql/psi/psi.h"
|
||||
|
||||
#ifndef PSI_SOCKET_CALL
|
||||
#define PSI_SOCKET_CALL(M) PSI_DYNAMIC_CALL(M)
|
||||
#endif
|
||||
|
||||
/**
|
||||
@defgroup Socket_instrumentation Socket Instrumentation
|
||||
@ingroup Instrumentation_interface
|
||||
@ -60,6 +64,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
||||
do {} while (0)
|
||||
#endif
|
||||
|
||||
/** An instrumented socket. */
|
||||
struct st_mysql_socket
|
||||
{
|
||||
/** The real socket descriptor. */
|
||||
@ -102,9 +107,8 @@ mysql_socket_invalid()
|
||||
/**
|
||||
Set socket descriptor and address.
|
||||
@param socket nstrumented socket
|
||||
@param fd socket descriptor
|
||||
@param addr unformatted socket address
|
||||
@param adr_len length of socket addres
|
||||
@param addr_len length of socket addres
|
||||
*/
|
||||
|
||||
static inline void
|
||||
@ -129,7 +133,6 @@ mysql_socket_set_address(
|
||||
/**
|
||||
Set socket descriptor and address.
|
||||
@param socket instrumented socket
|
||||
@param thread instrumented owning thread
|
||||
*/
|
||||
static inline void
|
||||
mysql_socket_set_thread_owner(
|
||||
@ -196,7 +199,6 @@ mysql_socket_setfd(MYSQL_SOCKET *mysql_socket, my_socket fd)
|
||||
@param STATE locker state
|
||||
@param SOCKET instrumented socket
|
||||
@param OP The socket operation to be performed
|
||||
@param FLAGS per-socket operation flags.
|
||||
@param COUNT bytes to be written/read
|
||||
@sa MYSQL_END_SOCKET_WAIT.
|
||||
*/
|
||||
@ -225,6 +227,13 @@ mysql_socket_setfd(MYSQL_SOCKET *mysql_socket, my_socket fd)
|
||||
do {} while (0)
|
||||
#endif
|
||||
|
||||
/**
|
||||
@def MYSQL_SOCKET_SET_STATE
|
||||
Set the state (IDLE, ACTIVE) of an instrumented socket.
|
||||
@param SOCKET the instrumented socket
|
||||
@param STATE the new state
|
||||
@sa PSI_socket_state
|
||||
*/
|
||||
#ifdef HAVE_PSI_SOCKET_INTERFACE
|
||||
#define MYSQL_SOCKET_SET_STATE(SOCKET, STATE) \
|
||||
inline_mysql_socket_set_state(SOCKET, STATE)
|
||||
@ -320,8 +329,8 @@ inline_mysql_socket_set_state(MYSQL_SOCKET socket, enum PSI_socket_state state)
|
||||
Return port number and IP address of the local host
|
||||
@c mysql_socket_getsockname is a replacement for @c getsockname.
|
||||
@param FD Instrumented socket descriptor returned by socket()
|
||||
@param A Pointer to returned address of local host in sockaddr structure
|
||||
@param L Pointer to length of sockaddr structure
|
||||
@param AP Pointer to returned address of local host in @c sockaddr structure
|
||||
@param LP Pointer to length of @c sockaddr structure
|
||||
*/
|
||||
#ifdef HAVE_PSI_SOCKET_INTERFACE
|
||||
#define mysql_socket_getsockname(FD, AP, LP) \
|
||||
@ -425,7 +434,7 @@ inline_mysql_socket_set_state(MYSQL_SOCKET socket, enum PSI_socket_state state)
|
||||
@param N Maximum bytes to receive
|
||||
@param FL Control flags
|
||||
@param AP Pointer to source address in sockaddr_storage structure
|
||||
@param L Size of sockaddr_storage structure
|
||||
@param LP Size of sockaddr_storage structure
|
||||
*/
|
||||
#ifdef HAVE_PSI_SOCKET_INTERFACE
|
||||
#define mysql_socket_recvfrom(FD, B, N, FL, AP, LP) \
|
||||
@ -471,6 +480,19 @@ inline_mysql_socket_set_state(MYSQL_SOCKET socket, enum PSI_socket_state state)
|
||||
inline_mysql_socket_setsockopt(FD, LV, ON, OP, OL)
|
||||
#endif
|
||||
|
||||
/**
|
||||
@def mysql_sock_set_nonblocking
|
||||
Set socket to non-blocking.
|
||||
@param FD instrumented socket descriptor
|
||||
*/
|
||||
#ifdef HAVE_PSI_SOCKET_INTERFACE
|
||||
#define mysql_sock_set_nonblocking(FD) \
|
||||
inline_mysql_sock_set_nonblocking(__FILE__, __LINE__, FD)
|
||||
#else
|
||||
#define mysql_sock_set_nonblocking(FD) \
|
||||
inline_mysql_sock_set_nonblocking(FD)
|
||||
#endif
|
||||
|
||||
/**
|
||||
@def mysql_socket_listen(FD, N)
|
||||
Set socket state to listen for an incoming connection.
|
||||
@ -965,6 +987,78 @@ inline_mysql_socket_setsockopt
|
||||
return result;
|
||||
}
|
||||
|
||||
/** set_socket_nonblock */
|
||||
static inline int
|
||||
set_socket_nonblock(my_socket fd)
|
||||
{
|
||||
int ret= 0;
|
||||
#ifdef _WIN32
|
||||
{
|
||||
u_long nonblocking= 1;
|
||||
ret= ioctlsocket(fd, FIONBIO, &nonblocking);
|
||||
}
|
||||
#else
|
||||
{
|
||||
int fd_flags;
|
||||
fd_flags= fcntl(fd, F_GETFL, 0);
|
||||
if (fd_flags < 0)
|
||||
return errno;
|
||||
#if defined(O_NONBLOCK)
|
||||
fd_flags |= O_NONBLOCK;
|
||||
#elif defined(O_NDELAY)
|
||||
fd_flags |= O_NDELAY;
|
||||
#elif defined(O_FNDELAY)
|
||||
fd_flags |= O_FNDELAY;
|
||||
#else
|
||||
#error "No definition of non-blocking flag found."
|
||||
#endif /* O_NONBLOCK */
|
||||
if (fcntl(fd, F_SETFL, fd_flags) == -1)
|
||||
ret= errno;
|
||||
}
|
||||
#endif /* _WIN32 */
|
||||
return ret;
|
||||
}
|
||||
|
||||
/** mysql_socket_set_nonblocking */
|
||||
|
||||
static inline int
|
||||
inline_mysql_sock_set_nonblocking
|
||||
(
|
||||
#ifdef HAVE_PSI_SOCKET_INTERFACE
|
||||
const char *src_file, uint src_line,
|
||||
#endif
|
||||
MYSQL_SOCKET mysql_socket
|
||||
)
|
||||
{
|
||||
int result= 0;
|
||||
|
||||
#ifdef HAVE_PSI_SOCKET_INTERFACE
|
||||
if (mysql_socket.m_psi)
|
||||
{
|
||||
/* Instrumentation start */
|
||||
PSI_socket_locker *locker;
|
||||
PSI_socket_locker_state state;
|
||||
locker= PSI_SOCKET_CALL(start_socket_wait)
|
||||
(&state, mysql_socket.m_psi, PSI_SOCKET_OPT,
|
||||
(size_t)0, src_file, src_line);
|
||||
|
||||
/* Instrumented code */
|
||||
result= set_socket_nonblock(mysql_socket.fd);
|
||||
|
||||
/* Instrumentation end */
|
||||
if (locker != NULL)
|
||||
PSI_SOCKET_CALL(end_socket_wait)(locker, (size_t)0);
|
||||
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Non instrumented code */
|
||||
result= set_socket_nonblock(mysql_socket.fd);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/** mysql_socket_listen */
|
||||
|
||||
static inline int
|
||||
@ -1104,7 +1198,7 @@ inline_mysql_socket_shutdown
|
||||
{
|
||||
int result;
|
||||
|
||||
#ifdef __WIN__
|
||||
#ifdef _WIN32
|
||||
static LPFN_DISCONNECTEX DisconnectEx = NULL;
|
||||
if (DisconnectEx == NULL)
|
||||
{
|
||||
@ -1127,7 +1221,7 @@ inline_mysql_socket_shutdown
|
||||
(&state, mysql_socket.m_psi, PSI_SOCKET_SHUTDOWN, (size_t)0, src_file, src_line);
|
||||
|
||||
/* Instrumented code */
|
||||
#ifdef __WIN__
|
||||
#ifdef _WIN32
|
||||
if (DisconnectEx)
|
||||
result= (DisconnectEx(mysql_socket.fd, (LPOVERLAPPED) NULL,
|
||||
(DWORD) 0, (DWORD) 0) == TRUE) ? 0 : -1;
|
||||
@ -1144,7 +1238,7 @@ inline_mysql_socket_shutdown
|
||||
#endif
|
||||
|
||||
/* Non instrumented code */
|
||||
#ifdef __WIN__
|
||||
#ifdef _WIN32
|
||||
if (DisconnectEx)
|
||||
result= (DisconnectEx(mysql_socket.fd, (LPOVERLAPPED) NULL,
|
||||
(DWORD) 0, (DWORD) 0) == TRUE) ? 0 : -1;
|
||||
|
97
include/mysql/psi/mysql_sp.h
Normal file
97
include/mysql/psi/mysql_sp.h
Normal file
@ -0,0 +1,97 @@
|
||||
/* Copyright (c) 2013, 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_SP_H
|
||||
#define MYSQL_SP_H
|
||||
|
||||
/**
|
||||
@file mysql/psi/mysql_sp.h
|
||||
Instrumentation helpers for stored programs.
|
||||
*/
|
||||
|
||||
#include "mysql/psi/psi.h"
|
||||
|
||||
#ifndef PSI_SP_CALL
|
||||
#define PSI_SP_CALL(M) PSI_DYNAMIC_CALL(M)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PSI_SP_INTERFACE
|
||||
#define MYSQL_START_SP(STATE, SP_SHARE) \
|
||||
inline_mysql_start_sp(STATE, SP_SHARE)
|
||||
#else
|
||||
#define MYSQL_START_SP(STATE, SP_SHARE) \
|
||||
NULL
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef HAVE_PSI_SP_INTERFACE
|
||||
#define MYSQL_END_SP(LOCKER) \
|
||||
inline_mysql_end_sp(LOCKER)
|
||||
#else
|
||||
#define MYSQL_END_SP(LOCKER) \
|
||||
do {} while (0)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PSI_SP_INTERFACE
|
||||
#define MYSQL_DROP_SP(OT, SN, SNL, ON, ONL) \
|
||||
inline_mysql_drop_sp(OT, SN, SNL, ON, ONL)
|
||||
#else
|
||||
#define MYSQL_DROP_SP(OT, SN, SNL, ON, ONL) \
|
||||
do {} while (0)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PSI_SP_INTERFACE
|
||||
#define MYSQL_GET_SP_SHARE(OT, SN, SNL, ON, ONL) \
|
||||
inline_mysql_get_sp_share(OT, SN, SNL, ON, ONL)
|
||||
#else
|
||||
#define MYSQL_GET_SP_SHARE(OT, SN, SNL, ON, ONL) \
|
||||
NULL
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PSI_SP_INTERFACE
|
||||
static inline struct PSI_sp_locker*
|
||||
inline_mysql_start_sp(PSI_sp_locker_state *state, PSI_sp_share *sp_share)
|
||||
{
|
||||
return PSI_SP_CALL(start_sp)(state, sp_share);
|
||||
}
|
||||
|
||||
static inline void inline_mysql_end_sp(PSI_sp_locker *locker)
|
||||
{
|
||||
if (likely(locker != NULL))
|
||||
PSI_SP_CALL(end_sp)(locker);
|
||||
}
|
||||
|
||||
static inline void
|
||||
inline_mysql_drop_sp(uint sp_type,
|
||||
const char* schema_name, uint shcema_name_length,
|
||||
const char* object_name, uint object_name_length)
|
||||
{
|
||||
PSI_SP_CALL(drop_sp)(sp_type,
|
||||
schema_name, shcema_name_length,
|
||||
object_name, object_name_length);
|
||||
}
|
||||
|
||||
static inline PSI_sp_share*
|
||||
inline_mysql_get_sp_share(uint sp_type,
|
||||
const char* schema_name, uint shcema_name_length,
|
||||
const char* object_name, uint object_name_length)
|
||||
{
|
||||
return PSI_SP_CALL(get_sp_share)(sp_type,
|
||||
schema_name, shcema_name_length,
|
||||
object_name, object_name_length);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
/* Copyright (c) 2010, 2014, 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
|
||||
@ -23,6 +23,10 @@
|
||||
|
||||
#include "mysql/psi/psi.h"
|
||||
|
||||
#ifndef PSI_STAGE_CALL
|
||||
#define PSI_STAGE_CALL(M) PSI_DYNAMIC_CALL(M)
|
||||
#endif
|
||||
|
||||
/**
|
||||
@defgroup Stage_instrumentation Stage Instrumentation
|
||||
@ingroup Instrumentation_interface
|
||||
@ -41,11 +45,47 @@
|
||||
do {} while (0)
|
||||
#endif
|
||||
|
||||
/**
|
||||
@def MYSQL_SET_STAGE
|
||||
Set the current stage.
|
||||
Use this API when the file and line
|
||||
is passed from the caller.
|
||||
@param K the stage key
|
||||
@param F the source file name
|
||||
@param L the source file line
|
||||
@return the current stage progress
|
||||
*/
|
||||
#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) \
|
||||
NULL
|
||||
#endif
|
||||
|
||||
/**
|
||||
@def mysql_set_stage
|
||||
Set the current stage.
|
||||
@param K the stage key
|
||||
@return the current stage progress
|
||||
*/
|
||||
#ifdef HAVE_PSI_STAGE_INTERFACE
|
||||
#define mysql_set_stage(K) \
|
||||
inline_mysql_set_stage(K, __FILE__, __LINE__)
|
||||
#else
|
||||
#define mysql_set_stage(K) \
|
||||
NULL
|
||||
#endif
|
||||
|
||||
/**
|
||||
@def mysql_end_stage
|
||||
End the last stage
|
||||
*/
|
||||
#ifdef HAVE_PSI_STAGE_INTERFACE
|
||||
#define mysql_end_stage \
|
||||
inline_mysql_end_stage
|
||||
#else
|
||||
#define mysql_end_stage \
|
||||
do {} while (0)
|
||||
#endif
|
||||
|
||||
@ -58,11 +98,97 @@ static inline void inline_mysql_stage_register(
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PSI_STAGE_INTERFACE
|
||||
static inline void
|
||||
static inline PSI_stage_progress*
|
||||
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);
|
||||
return PSI_STAGE_CALL(start_stage)(key, src_file, src_line);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PSI_STAGE_INTERFACE
|
||||
static inline void
|
||||
inline_mysql_end_stage()
|
||||
{
|
||||
PSI_STAGE_CALL(end_stage)();
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PSI_STAGE_INTERFACE
|
||||
#define mysql_stage_set_work_completed(P1, P2) \
|
||||
inline_mysql_stage_set_work_completed(P1, P2)
|
||||
|
||||
#define mysql_stage_get_work_completed(P1) \
|
||||
inline_mysql_stage_get_work_completed(P1)
|
||||
#else
|
||||
#define mysql_stage_set_work_completed(P1, P2) \
|
||||
do {} while (0)
|
||||
|
||||
#define mysql_stage_get_work_completed(P1) \
|
||||
do {} while (0)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PSI_STAGE_INTERFACE
|
||||
#define mysql_stage_inc_work_completed(P1, P2) \
|
||||
inline_mysql_stage_inc_work_completed(P1, P2)
|
||||
#else
|
||||
#define mysql_stage_inc_work_completed(P1, P2) \
|
||||
do {} while (0)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PSI_STAGE_INTERFACE
|
||||
#define mysql_stage_set_work_estimated(P1, P2) \
|
||||
inline_mysql_stage_set_work_estimated(P1, P2)
|
||||
|
||||
#define mysql_stage_get_work_estimated(P1) \
|
||||
inline_mysql_stage_get_work_estimated(P1)
|
||||
#else
|
||||
#define mysql_stage_set_work_estimated(P1, P2) \
|
||||
do {} while (0)
|
||||
|
||||
#define mysql_stage_get_work_estimated(P1) \
|
||||
do {} while (0)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PSI_STAGE_INTERFACE
|
||||
static inline void
|
||||
inline_mysql_stage_set_work_completed(PSI_stage_progress *progress,
|
||||
ulonglong val)
|
||||
{
|
||||
if (progress != NULL)
|
||||
progress->m_work_completed= val;
|
||||
}
|
||||
|
||||
static inline ulonglong
|
||||
inline_mysql_stage_get_work_completed(PSI_stage_progress *progress)
|
||||
{
|
||||
return progress->m_work_completed;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PSI_STAGE_INTERFACE
|
||||
static inline void
|
||||
inline_mysql_stage_inc_work_completed(PSI_stage_progress *progress,
|
||||
ulonglong val)
|
||||
{
|
||||
if (progress != NULL)
|
||||
progress->m_work_completed+= val;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PSI_STAGE_INTERFACE
|
||||
static inline void
|
||||
inline_mysql_stage_set_work_estimated(PSI_stage_progress *progress,
|
||||
ulonglong val)
|
||||
{
|
||||
if (progress != NULL)
|
||||
progress->m_work_estimated= val;
|
||||
}
|
||||
|
||||
static inline ulonglong
|
||||
inline_mysql_stage_get_work_estimated(PSI_stage_progress *progress)
|
||||
{
|
||||
return progress->m_work_estimated;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -23,6 +23,17 @@
|
||||
|
||||
#include "mysql/psi/psi.h"
|
||||
|
||||
class Diagnostics_area;
|
||||
typedef struct charset_info_st CHARSET_INFO;
|
||||
|
||||
#ifndef PSI_STATEMENT_CALL
|
||||
#define PSI_STATEMENT_CALL(M) PSI_DYNAMIC_CALL(M)
|
||||
#endif
|
||||
|
||||
#ifndef PSI_DIGEST_CALL
|
||||
#define PSI_DIGEST_CALL(M) PSI_DYNAMIC_CALL(M)
|
||||
#endif
|
||||
|
||||
/**
|
||||
@defgroup Statement_instrumentation Statement Instrumentation
|
||||
@ingroup Instrumentation_interface
|
||||
@ -58,10 +69,10 @@
|
||||
#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__)
|
||||
#define MYSQL_START_STATEMENT(STATE, K, DB, DB_LEN, CS, SPS) \
|
||||
inline_mysql_start_statement(STATE, K, DB, DB_LEN, CS, SPS, __FILE__, __LINE__)
|
||||
#else
|
||||
#define MYSQL_START_STATEMENT(STATE, K, DB, DB_LEN, CS) \
|
||||
#define MYSQL_START_STATEMENT(STATE, K, DB, DB_LEN, CS, SPS) \
|
||||
NULL
|
||||
#endif
|
||||
|
||||
@ -146,10 +157,12 @@ inline_mysql_start_statement(PSI_statement_locker_state *state,
|
||||
PSI_statement_key key,
|
||||
const char *db, uint db_len,
|
||||
const CHARSET_INFO *charset,
|
||||
PSI_sp_share *sp_share,
|
||||
const char *src_file, int src_line)
|
||||
{
|
||||
PSI_statement_locker *locker;
|
||||
locker= PSI_STATEMENT_CALL(get_thread_statement_locker)(state, key, charset);
|
||||
locker= PSI_STATEMENT_CALL(get_thread_statement_locker)(state, key, charset,
|
||||
sp_share);
|
||||
if (likely(locker != NULL))
|
||||
PSI_STATEMENT_CALL(start_statement)(locker, db, db_len, src_file, src_line);
|
||||
return locker;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
/* Copyright (c) 2010, 2014, 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
|
||||
@ -23,6 +23,10 @@
|
||||
|
||||
#include "mysql/psi/psi.h"
|
||||
|
||||
#ifndef PSI_TABLE_CALL
|
||||
#define PSI_TABLE_CALL(M) PSI_DYNAMIC_CALL(M)
|
||||
#endif
|
||||
|
||||
/**
|
||||
@defgroup Table_instrumentation Table Instrumentation
|
||||
@ingroup Instrumentation_interface
|
||||
@ -49,72 +53,6 @@
|
||||
#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.
|
||||
@ -150,6 +88,14 @@
|
||||
do {} while (0)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PSI_TABLE_INTERFACE
|
||||
#define MYSQL_UNLOCK_TABLE(T) \
|
||||
inline_mysql_unlock_table(T)
|
||||
#else
|
||||
#define MYSQL_UNLOCK_TABLE(T) \
|
||||
do {} while (0)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PSI_TABLE_INTERFACE
|
||||
/**
|
||||
Instrumentation calls for MYSQL_START_TABLE_LOCK_WAIT.
|
||||
@ -181,6 +127,13 @@ inline_mysql_end_table_lock_wait(struct PSI_table_locker *locker)
|
||||
if (locker != NULL)
|
||||
PSI_TABLE_CALL(end_table_lock_wait)(locker);
|
||||
}
|
||||
|
||||
static inline void
|
||||
inline_mysql_unlock_table(struct PSI_table *table)
|
||||
{
|
||||
if (table != NULL)
|
||||
PSI_TABLE_CALL(unlock_table)(table);
|
||||
}
|
||||
#endif
|
||||
|
||||
/** @} (end of group Table_instrumentation) */
|
||||
|
@ -29,9 +29,9 @@
|
||||
Other compilers, like gcc, optimize these dependencies by default.
|
||||
|
||||
Since the instrumented APIs declared here are wrapper on top
|
||||
of my_pthread / safemutex / etc APIs,
|
||||
of my_thread / safemutex / etc APIs,
|
||||
including mysql/psi/mysql_thread.h assumes that
|
||||
the dependency on my_pthread and safemutex already exists.
|
||||
the dependency on my_thread and safemutex already exists.
|
||||
*/
|
||||
/*
|
||||
Note: there are several orthogonal dimensions here.
|
||||
@ -49,12 +49,37 @@
|
||||
- the pthread library
|
||||
- fast mutexes
|
||||
- window apis
|
||||
This is implemented by various macro definitions in my_pthread.h
|
||||
This is implemented by various macro definitions in my_thread.h
|
||||
|
||||
This causes complexity with '#ifdef'-ery that can't be avoided.
|
||||
*/
|
||||
|
||||
#include "my_thread.h"
|
||||
#include "my_thread_local.h"
|
||||
#include "thr_mutex.h"
|
||||
#include "thr_rwlock.h"
|
||||
#include "mysql/psi/psi.h"
|
||||
#ifdef MYSQL_SERVER
|
||||
#ifndef MYSQL_DYNAMIC_PLUGIN
|
||||
#include "pfs_thread_provider.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef PSI_MUTEX_CALL
|
||||
#define PSI_MUTEX_CALL(M) PSI_DYNAMIC_CALL(M)
|
||||
#endif
|
||||
|
||||
#ifndef PSI_RWLOCK_CALL
|
||||
#define PSI_RWLOCK_CALL(M) PSI_DYNAMIC_CALL(M)
|
||||
#endif
|
||||
|
||||
#ifndef PSI_COND_CALL
|
||||
#define PSI_COND_CALL(M) PSI_DYNAMIC_CALL(M)
|
||||
#endif
|
||||
|
||||
#ifndef PSI_THREAD_CALL
|
||||
#define PSI_THREAD_CALL(M) PSI_DYNAMIC_CALL(M)
|
||||
#endif
|
||||
|
||||
/**
|
||||
@defgroup Thread_instrumentation Thread Instrumentation
|
||||
@ -69,13 +94,7 @@
|
||||
struct st_mysql_mutex
|
||||
{
|
||||
/** The real mutex. */
|
||||
#ifdef SAFE_MUTEX
|
||||
safe_mutex_t m_mutex;
|
||||
#elif defined(MY_PTHREAD_FASTMUTEX)
|
||||
my_pthread_fastmutex_t m_mutex;
|
||||
#else
|
||||
pthread_mutex_t m_mutex;
|
||||
#endif
|
||||
my_mutex_t m_mutex;
|
||||
/**
|
||||
The instrumentation hook.
|
||||
Note that this hook is not conditionally defined,
|
||||
@ -86,7 +105,7 @@ struct st_mysql_mutex
|
||||
|
||||
/**
|
||||
Type of an instrumented mutex.
|
||||
@c mysql_mutex_t is a drop-in replacement for @c pthread_mutex_t.
|
||||
@c mysql_mutex_t is a drop-in replacement for @c my_mutex_t.
|
||||
@sa mysql_mutex_assert_owner
|
||||
@sa mysql_mutex_assert_not_owner
|
||||
@sa mysql_mutex_init
|
||||
@ -103,7 +122,7 @@ typedef struct st_mysql_mutex mysql_mutex_t;
|
||||
struct st_mysql_rwlock
|
||||
{
|
||||
/** The real rwlock */
|
||||
rw_lock_t m_rwlock;
|
||||
native_rw_lock_t m_rwlock;
|
||||
/**
|
||||
The instrumentation hook.
|
||||
Note that this hook is not conditionally defined,
|
||||
@ -160,7 +179,7 @@ typedef struct st_mysql_prlock mysql_prlock_t;
|
||||
struct st_mysql_cond
|
||||
{
|
||||
/** The real condition */
|
||||
pthread_cond_t m_cond;
|
||||
native_cond_t m_cond;
|
||||
/**
|
||||
The instrumentation hook.
|
||||
Note that this hook is not conditionally defined,
|
||||
@ -171,7 +190,7 @@ struct st_mysql_cond
|
||||
|
||||
/**
|
||||
Type of an instrumented condition.
|
||||
@c mysql_cond_t is a drop-in replacement for @c pthread_cond_t.
|
||||
@c mysql_cond_t is a drop-in replacement for @c native_cond_t.
|
||||
@sa mysql_cond_init
|
||||
@sa mysql_cond_wait
|
||||
@sa mysql_cond_timedwait
|
||||
@ -207,8 +226,12 @@ typedef struct st_mysql_cond mysql_cond_t;
|
||||
@c mysql_mutex_assert_owner is a drop-in replacement
|
||||
for @c safe_mutex_assert_owner.
|
||||
*/
|
||||
#ifdef SAFE_MUTEX
|
||||
#define mysql_mutex_assert_owner(M) \
|
||||
safe_mutex_assert_owner(&(M)->m_mutex)
|
||||
safe_mutex_assert_owner(&(M)->m_mutex);
|
||||
#else
|
||||
#define mysql_mutex_assert_owner(M) { }
|
||||
#endif
|
||||
|
||||
/**
|
||||
@def mysql_mutex_assert_not_owner(M)
|
||||
@ -216,14 +239,26 @@ typedef struct st_mysql_cond mysql_cond_t;
|
||||
@c mysql_mutex_assert_not_owner is a drop-in replacement
|
||||
for @c safe_mutex_assert_not_owner.
|
||||
*/
|
||||
#ifdef SAFE_MUTEX
|
||||
#define mysql_mutex_assert_not_owner(M) \
|
||||
safe_mutex_assert_not_owner(&(M)->m_mutex)
|
||||
|
||||
/** Wrappers for instrumented prlock objects. */
|
||||
safe_mutex_assert_not_owner(&(M)->m_mutex);
|
||||
#else
|
||||
#define mysql_mutex_assert_not_owner(M) { }
|
||||
#endif
|
||||
|
||||
/**
|
||||
@def mysql_prlock_assert_write_owner(M)
|
||||
Drop-in replacement
|
||||
for @c rw_pr_lock_assert_write_owner.
|
||||
*/
|
||||
#define mysql_prlock_assert_write_owner(M) \
|
||||
rw_pr_lock_assert_write_owner(&(M)->m_prlock)
|
||||
|
||||
/**
|
||||
@def mysql_prlock_assert_not_write_owner(M)
|
||||
Drop-in replacement
|
||||
for @c rw_pr_lock_assert_not_write_owner.
|
||||
*/
|
||||
#define mysql_prlock_assert_not_write_owner(M) \
|
||||
rw_pr_lock_assert_not_write_owner(&(M)->m_prlock)
|
||||
|
||||
@ -294,7 +329,7 @@ typedef struct st_mysql_cond mysql_cond_t;
|
||||
@def mysql_mutex_trylock(M)
|
||||
Instrumented mutex_lock.
|
||||
@c mysql_mutex_trylock is a drop-in replacement
|
||||
for @c pthread_mutex_trylock.
|
||||
for @c my_mutex_trylock.
|
||||
*/
|
||||
|
||||
#if defined(SAFE_MUTEX) || defined (HAVE_PSI_MUTEX_INTERFACE)
|
||||
@ -476,17 +511,18 @@ typedef struct st_mysql_cond mysql_cond_t;
|
||||
inline_mysql_cond_register(P1, P2, P3)
|
||||
|
||||
/**
|
||||
@def mysql_cond_init(K, C, A)
|
||||
@def mysql_cond_init(K, C)
|
||||
Instrumented cond_init.
|
||||
@c mysql_cond_init is a replacement for @c pthread_cond_init.
|
||||
Note that pthread_condattr_t is not supported in MySQL.
|
||||
@param C The cond to initialize
|
||||
@param K The PSI_cond_key for this instrumented cond
|
||||
@param A Condition attributes
|
||||
|
||||
*/
|
||||
#ifdef HAVE_PSI_COND_INTERFACE
|
||||
#define mysql_cond_init(K, C, A) inline_mysql_cond_init(K, C, A)
|
||||
#define mysql_cond_init(K, C) inline_mysql_cond_init(K, C)
|
||||
#else
|
||||
#define mysql_cond_init(K, C, A) inline_mysql_cond_init(C, A)
|
||||
#define mysql_cond_init(K, C) inline_mysql_cond_init(C)
|
||||
#endif
|
||||
|
||||
/**
|
||||
@ -499,9 +535,9 @@ typedef struct st_mysql_cond mysql_cond_t;
|
||||
/**
|
||||
@def mysql_cond_wait(C)
|
||||
Instrumented cond_wait.
|
||||
@c mysql_cond_wait is a drop-in replacement for @c pthread_cond_wait.
|
||||
@c mysql_cond_wait is a drop-in replacement for @c native_cond_wait.
|
||||
*/
|
||||
#ifdef HAVE_PSI_COND_INTERFACE
|
||||
#if defined(SAFE_MUTEX) || defined(HAVE_PSI_COND_INTERFACE)
|
||||
#define mysql_cond_wait(C, M) \
|
||||
inline_mysql_cond_wait(C, M, __FILE__, __LINE__)
|
||||
#else
|
||||
@ -513,9 +549,9 @@ typedef struct st_mysql_cond mysql_cond_t;
|
||||
@def mysql_cond_timedwait(C, M, W)
|
||||
Instrumented cond_timedwait.
|
||||
@c mysql_cond_timedwait is a drop-in replacement
|
||||
for @c pthread_cond_timedwait.
|
||||
for @c native_cond_timedwait.
|
||||
*/
|
||||
#ifdef HAVE_PSI_COND_INTERFACE
|
||||
#if defined(SAFE_MUTEX) || defined(HAVE_PSI_COND_INTERFACE)
|
||||
#define mysql_cond_timedwait(C, M, W) \
|
||||
inline_mysql_cond_timedwait(C, M, W, __FILE__, __LINE__)
|
||||
#else
|
||||
@ -547,9 +583,9 @@ typedef struct st_mysql_cond mysql_cond_t;
|
||||
|
||||
/**
|
||||
@def mysql_thread_create(K, P1, P2, P3, P4)
|
||||
Instrumented pthread_create.
|
||||
Instrumented my_thread_create.
|
||||
This function creates both the thread instrumentation and a thread.
|
||||
@c mysql_thread_create is a replacement for @c pthread_create.
|
||||
@c mysql_thread_create is a replacement for @c my_thread_create.
|
||||
The parameter P4 (or, if it is NULL, P1) will be used as the
|
||||
instrumented thread "indentity".
|
||||
Providing a P1 / P4 parameter with a different value for each call
|
||||
@ -557,22 +593,22 @@ typedef struct st_mysql_cond mysql_cond_t;
|
||||
is used internally to randomize access to data and prevent contention.
|
||||
This is optional, and the improvement is not guaranteed, only statistical.
|
||||
@param K The PSI_thread_key for this instrumented thread
|
||||
@param P1 pthread_create parameter 1
|
||||
@param P2 pthread_create parameter 2
|
||||
@param P3 pthread_create parameter 3
|
||||
@param P4 pthread_create parameter 4
|
||||
@param P1 my_thread_create parameter 1
|
||||
@param P2 my_thread_create parameter 2
|
||||
@param P3 my_thread_create parameter 3
|
||||
@param P4 my_thread_create parameter 4
|
||||
*/
|
||||
#ifdef HAVE_PSI_THREAD_INTERFACE
|
||||
#define mysql_thread_create(K, P1, P2, P3, P4) \
|
||||
inline_mysql_thread_create(K, P1, P2, P3, P4)
|
||||
#else
|
||||
#define mysql_thread_create(K, P1, P2, P3, P4) \
|
||||
pthread_create(P1, P2, P3, P4)
|
||||
my_thread_create(P1, P2, P3, P4)
|
||||
#endif
|
||||
|
||||
/**
|
||||
@def mysql_thread_set_psi_id(I)
|
||||
Set the thread indentifier for the instrumentation.
|
||||
Set the thread identifier for the instrumentation.
|
||||
@param I The thread identifier
|
||||
*/
|
||||
#ifdef HAVE_PSI_THREAD_INTERFACE
|
||||
@ -581,6 +617,17 @@ typedef struct st_mysql_cond mysql_cond_t;
|
||||
#define mysql_thread_set_psi_id(I) do {} while (0)
|
||||
#endif
|
||||
|
||||
/**
|
||||
@def mysql_thread_set_psi_THD(T)
|
||||
Set the thread sql session for the instrumentation.
|
||||
@param I The thread identifier
|
||||
*/
|
||||
#ifdef HAVE_PSI_THREAD_INTERFACE
|
||||
#define mysql_thread_set_psi_THD(T) inline_mysql_thread_set_psi_THD(T)
|
||||
#else
|
||||
#define mysql_thread_set_psi_THD(T) do {} while (0)
|
||||
#endif
|
||||
|
||||
static inline void inline_mysql_mutex_register(
|
||||
#ifdef HAVE_PSI_MUTEX_INTERFACE
|
||||
const char *category,
|
||||
@ -603,7 +650,7 @@ static inline int inline_mysql_mutex_init(
|
||||
PSI_mutex_key key,
|
||||
#endif
|
||||
mysql_mutex_t *that,
|
||||
const pthread_mutexattr_t *attr
|
||||
const native_mutexattr_t *attr
|
||||
#ifdef SAFE_MUTEX
|
||||
, const char *src_file, uint src_line
|
||||
#endif
|
||||
@ -614,13 +661,11 @@ static inline int inline_mysql_mutex_init(
|
||||
#else
|
||||
that->m_psi= NULL;
|
||||
#endif
|
||||
return my_mutex_init(&that->m_mutex, attr
|
||||
#ifdef SAFE_MUTEX
|
||||
return safe_mutex_init(&that->m_mutex, attr, src_file, src_line);
|
||||
#elif defined(MY_PTHREAD_FASTMUTEX)
|
||||
return my_pthread_fastmutex_init(&that->m_mutex, attr);
|
||||
#else
|
||||
return pthread_mutex_init(&that->m_mutex, attr);
|
||||
, src_file, src_line
|
||||
#endif
|
||||
);
|
||||
}
|
||||
|
||||
static inline int inline_mysql_mutex_destroy(
|
||||
@ -637,13 +682,11 @@ static inline int inline_mysql_mutex_destroy(
|
||||
that->m_psi= NULL;
|
||||
}
|
||||
#endif
|
||||
return my_mutex_destroy(&that->m_mutex
|
||||
#ifdef SAFE_MUTEX
|
||||
return safe_mutex_destroy(&that->m_mutex, src_file, src_line);
|
||||
#elif defined(MY_PTHREAD_FASTMUTEX)
|
||||
return pthread_mutex_destroy(&that->m_mutex.mutex);
|
||||
#else
|
||||
return pthread_mutex_destroy(&that->m_mutex);
|
||||
, src_file, src_line
|
||||
#endif
|
||||
);
|
||||
}
|
||||
|
||||
static inline int inline_mysql_mutex_lock(
|
||||
@ -665,13 +708,11 @@ static inline int inline_mysql_mutex_lock(
|
||||
PSI_MUTEX_LOCK, src_file, src_line);
|
||||
|
||||
/* Instrumented code */
|
||||
result= my_mutex_lock(&that->m_mutex
|
||||
#ifdef SAFE_MUTEX
|
||||
result= safe_mutex_lock(&that->m_mutex, FALSE, src_file, src_line);
|
||||
#elif defined(MY_PTHREAD_FASTMUTEX)
|
||||
result= my_pthread_fastmutex_lock(&that->m_mutex);
|
||||
#else
|
||||
result= pthread_mutex_lock(&that->m_mutex);
|
||||
, src_file, src_line
|
||||
#endif
|
||||
);
|
||||
|
||||
/* Instrumentation end */
|
||||
if (locker != NULL)
|
||||
@ -682,13 +723,11 @@ static inline int inline_mysql_mutex_lock(
|
||||
#endif
|
||||
|
||||
/* Non instrumented code */
|
||||
result= my_mutex_lock(&that->m_mutex
|
||||
#ifdef SAFE_MUTEX
|
||||
result= safe_mutex_lock(&that->m_mutex, FALSE, src_file, src_line);
|
||||
#elif defined(MY_PTHREAD_FASTMUTEX)
|
||||
result= my_pthread_fastmutex_lock(&that->m_mutex);
|
||||
#else
|
||||
result= pthread_mutex_lock(&that->m_mutex);
|
||||
, src_file, src_line
|
||||
#endif
|
||||
);
|
||||
|
||||
return result;
|
||||
}
|
||||
@ -712,13 +751,11 @@ static inline int inline_mysql_mutex_trylock(
|
||||
PSI_MUTEX_TRYLOCK, src_file, src_line);
|
||||
|
||||
/* Instrumented code */
|
||||
result= my_mutex_trylock(&that->m_mutex
|
||||
#ifdef SAFE_MUTEX
|
||||
result= safe_mutex_lock(&that->m_mutex, TRUE, src_file, src_line);
|
||||
#elif defined(MY_PTHREAD_FASTMUTEX)
|
||||
result= pthread_mutex_trylock(&that->m_mutex.mutex);
|
||||
#else
|
||||
result= pthread_mutex_trylock(&that->m_mutex);
|
||||
, src_file, src_line
|
||||
#endif
|
||||
);
|
||||
|
||||
/* Instrumentation end */
|
||||
if (locker != NULL)
|
||||
@ -729,13 +766,11 @@ static inline int inline_mysql_mutex_trylock(
|
||||
#endif
|
||||
|
||||
/* Non instrumented code */
|
||||
result= my_mutex_trylock(&that->m_mutex
|
||||
#ifdef SAFE_MUTEX
|
||||
result= safe_mutex_lock(&that->m_mutex, TRUE, src_file, src_line);
|
||||
#elif defined(MY_PTHREAD_FASTMUTEX)
|
||||
result= pthread_mutex_trylock(&that->m_mutex.mutex);
|
||||
#else
|
||||
result= pthread_mutex_trylock(&that->m_mutex);
|
||||
, src_file, src_line
|
||||
#endif
|
||||
);
|
||||
|
||||
return result;
|
||||
}
|
||||
@ -754,13 +789,11 @@ static inline int inline_mysql_mutex_unlock(
|
||||
PSI_MUTEX_CALL(unlock_mutex)(that->m_psi);
|
||||
#endif
|
||||
|
||||
result= my_mutex_unlock(&that->m_mutex
|
||||
#ifdef SAFE_MUTEX
|
||||
result= safe_mutex_unlock(&that->m_mutex, src_file, src_line);
|
||||
#elif defined(MY_PTHREAD_FASTMUTEX)
|
||||
result= pthread_mutex_unlock(&that->m_mutex.mutex);
|
||||
#else
|
||||
result= pthread_mutex_unlock(&that->m_mutex);
|
||||
, src_file, src_line
|
||||
#endif
|
||||
);
|
||||
|
||||
return result;
|
||||
}
|
||||
@ -793,10 +826,7 @@ static inline int inline_mysql_rwlock_init(
|
||||
#else
|
||||
that->m_psi= NULL;
|
||||
#endif
|
||||
/*
|
||||
pthread_rwlockattr_t is not used in MySQL.
|
||||
*/
|
||||
return my_rwlock_init(&that->m_rwlock, NULL);
|
||||
return native_rw_init(&that->m_rwlock);
|
||||
}
|
||||
|
||||
#ifndef DISABLE_MYSQL_PRLOCK_H
|
||||
@ -825,7 +855,7 @@ static inline int inline_mysql_rwlock_destroy(
|
||||
that->m_psi= NULL;
|
||||
}
|
||||
#endif
|
||||
return rwlock_destroy(&that->m_rwlock);
|
||||
return native_rw_destroy(&that->m_rwlock);
|
||||
}
|
||||
|
||||
#ifndef DISABLE_MYSQL_PRLOCK_H
|
||||
@ -862,7 +892,7 @@ static inline int inline_mysql_rwlock_rdlock(
|
||||
PSI_RWLOCK_READLOCK, src_file, src_line);
|
||||
|
||||
/* Instrumented code */
|
||||
result= rw_rdlock(&that->m_rwlock);
|
||||
result= native_rw_rdlock(&that->m_rwlock);
|
||||
|
||||
/* Instrumentation end */
|
||||
if (locker != NULL)
|
||||
@ -873,7 +903,7 @@ static inline int inline_mysql_rwlock_rdlock(
|
||||
#endif
|
||||
|
||||
/* Non instrumented code */
|
||||
result= rw_rdlock(&that->m_rwlock);
|
||||
result= native_rw_rdlock(&that->m_rwlock);
|
||||
|
||||
return result;
|
||||
}
|
||||
@ -934,7 +964,7 @@ static inline int inline_mysql_rwlock_wrlock(
|
||||
PSI_RWLOCK_WRITELOCK, src_file, src_line);
|
||||
|
||||
/* Instrumented code */
|
||||
result= rw_wrlock(&that->m_rwlock);
|
||||
result= native_rw_wrlock(&that->m_rwlock);
|
||||
|
||||
/* Instrumentation end */
|
||||
if (locker != NULL)
|
||||
@ -945,7 +975,7 @@ static inline int inline_mysql_rwlock_wrlock(
|
||||
#endif
|
||||
|
||||
/* Non instrumented code */
|
||||
result= rw_wrlock(&that->m_rwlock);
|
||||
result= native_rw_wrlock(&that->m_rwlock);
|
||||
|
||||
return result;
|
||||
}
|
||||
@ -1006,7 +1036,7 @@ static inline int inline_mysql_rwlock_tryrdlock(
|
||||
PSI_RWLOCK_TRYREADLOCK, src_file, src_line);
|
||||
|
||||
/* Instrumented code */
|
||||
result= rw_tryrdlock(&that->m_rwlock);
|
||||
result= native_rw_tryrdlock(&that->m_rwlock);
|
||||
|
||||
/* Instrumentation end */
|
||||
if (locker != NULL)
|
||||
@ -1017,7 +1047,7 @@ static inline int inline_mysql_rwlock_tryrdlock(
|
||||
#endif
|
||||
|
||||
/* Non instrumented code */
|
||||
result= rw_tryrdlock(&that->m_rwlock);
|
||||
result= native_rw_tryrdlock(&that->m_rwlock);
|
||||
|
||||
return result;
|
||||
}
|
||||
@ -1041,7 +1071,7 @@ static inline int inline_mysql_rwlock_trywrlock(
|
||||
PSI_RWLOCK_TRYWRITELOCK, src_file, src_line);
|
||||
|
||||
/* Instrumented code */
|
||||
result= rw_trywrlock(&that->m_rwlock);
|
||||
result= native_rw_trywrlock(&that->m_rwlock);
|
||||
|
||||
/* Instrumentation end */
|
||||
if (locker != NULL)
|
||||
@ -1052,7 +1082,7 @@ static inline int inline_mysql_rwlock_trywrlock(
|
||||
#endif
|
||||
|
||||
/* Non instrumented code */
|
||||
result= rw_trywrlock(&that->m_rwlock);
|
||||
result= native_rw_trywrlock(&that->m_rwlock);
|
||||
|
||||
return result;
|
||||
}
|
||||
@ -1065,7 +1095,7 @@ static inline int inline_mysql_rwlock_unlock(
|
||||
if (that->m_psi != NULL)
|
||||
PSI_RWLOCK_CALL(unlock_rwlock)(that->m_psi);
|
||||
#endif
|
||||
result= rw_unlock(&that->m_rwlock);
|
||||
result= native_rw_unlock(&that->m_rwlock);
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -1104,15 +1134,14 @@ static inline int inline_mysql_cond_init(
|
||||
#ifdef HAVE_PSI_COND_INTERFACE
|
||||
PSI_cond_key key,
|
||||
#endif
|
||||
mysql_cond_t *that,
|
||||
const pthread_condattr_t *attr)
|
||||
mysql_cond_t *that)
|
||||
{
|
||||
#ifdef HAVE_PSI_COND_INTERFACE
|
||||
that->m_psi= PSI_COND_CALL(init_cond)(key, &that->m_cond);
|
||||
#else
|
||||
that->m_psi= NULL;
|
||||
#endif
|
||||
return pthread_cond_init(&that->m_cond, attr);
|
||||
return native_cond_init(&that->m_cond);
|
||||
}
|
||||
|
||||
static inline int inline_mysql_cond_destroy(
|
||||
@ -1125,13 +1154,13 @@ static inline int inline_mysql_cond_destroy(
|
||||
that->m_psi= NULL;
|
||||
}
|
||||
#endif
|
||||
return pthread_cond_destroy(&that->m_cond);
|
||||
return native_cond_destroy(&that->m_cond);
|
||||
}
|
||||
|
||||
static inline int inline_mysql_cond_wait(
|
||||
mysql_cond_t *that,
|
||||
mysql_mutex_t *mutex
|
||||
#ifdef HAVE_PSI_COND_INTERFACE
|
||||
#if defined(SAFE_MUTEX) || defined(HAVE_PSI_COND_INTERFACE)
|
||||
, const char *src_file, uint src_line
|
||||
#endif
|
||||
)
|
||||
@ -1148,7 +1177,11 @@ static inline int inline_mysql_cond_wait(
|
||||
PSI_COND_WAIT, src_file, src_line);
|
||||
|
||||
/* Instrumented code */
|
||||
result= my_cond_wait(&that->m_cond, &mutex->m_mutex);
|
||||
result= my_cond_wait(&that->m_cond, &mutex->m_mutex
|
||||
#ifdef SAFE_MUTEX
|
||||
, src_file, src_line
|
||||
#endif
|
||||
);
|
||||
|
||||
/* Instrumentation end */
|
||||
if (locker != NULL)
|
||||
@ -1159,7 +1192,11 @@ static inline int inline_mysql_cond_wait(
|
||||
#endif
|
||||
|
||||
/* Non instrumented code */
|
||||
result= my_cond_wait(&that->m_cond, &mutex->m_mutex);
|
||||
result= my_cond_wait(&that->m_cond, &mutex->m_mutex
|
||||
#ifdef SAFE_MUTEX
|
||||
, src_file, src_line
|
||||
#endif
|
||||
);
|
||||
|
||||
return result;
|
||||
}
|
||||
@ -1168,7 +1205,7 @@ static inline int inline_mysql_cond_timedwait(
|
||||
mysql_cond_t *that,
|
||||
mysql_mutex_t *mutex,
|
||||
const struct timespec *abstime
|
||||
#ifdef HAVE_PSI_COND_INTERFACE
|
||||
#if defined(SAFE_MUTEX) || defined(HAVE_PSI_COND_INTERFACE)
|
||||
, const char *src_file, uint src_line
|
||||
#endif
|
||||
)
|
||||
@ -1185,7 +1222,11 @@ static inline int inline_mysql_cond_timedwait(
|
||||
PSI_COND_TIMEDWAIT, src_file, src_line);
|
||||
|
||||
/* Instrumented code */
|
||||
result= my_cond_timedwait(&that->m_cond, &mutex->m_mutex, abstime);
|
||||
result= my_cond_timedwait(&that->m_cond, &mutex->m_mutex, abstime
|
||||
#ifdef SAFE_MUTEX
|
||||
, src_file, src_line
|
||||
#endif
|
||||
);
|
||||
|
||||
/* Instrumentation end */
|
||||
if (locker != NULL)
|
||||
@ -1196,7 +1237,11 @@ static inline int inline_mysql_cond_timedwait(
|
||||
#endif
|
||||
|
||||
/* Non instrumented code */
|
||||
result= my_cond_timedwait(&that->m_cond, &mutex->m_mutex, abstime);
|
||||
result= my_cond_timedwait(&that->m_cond, &mutex->m_mutex, abstime
|
||||
#ifdef SAFE_MUTEX
|
||||
, src_file, src_line
|
||||
#endif
|
||||
);
|
||||
|
||||
return result;
|
||||
}
|
||||
@ -1209,7 +1254,7 @@ static inline int inline_mysql_cond_signal(
|
||||
if (that->m_psi != NULL)
|
||||
PSI_COND_CALL(signal_cond)(that->m_psi);
|
||||
#endif
|
||||
result= pthread_cond_signal(&that->m_cond);
|
||||
result= native_cond_signal(&that->m_cond);
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -1221,7 +1266,7 @@ static inline int inline_mysql_cond_broadcast(
|
||||
if (that->m_psi != NULL)
|
||||
PSI_COND_CALL(broadcast_cond)(that->m_psi);
|
||||
#endif
|
||||
result= pthread_cond_broadcast(&that->m_cond);
|
||||
result= native_cond_broadcast(&that->m_cond);
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -1245,19 +1290,29 @@ static inline void inline_mysql_thread_register(
|
||||
#ifdef HAVE_PSI_THREAD_INTERFACE
|
||||
static inline int inline_mysql_thread_create(
|
||||
PSI_thread_key key,
|
||||
pthread_t *thread, const pthread_attr_t *attr,
|
||||
void *(*start_routine)(void*), void *arg)
|
||||
my_thread_handle *thread, const my_thread_attr_t *attr,
|
||||
my_start_routine start_routine, void *arg)
|
||||
{
|
||||
int result;
|
||||
result= PSI_THREAD_CALL(spawn_thread)(key, thread, attr, start_routine, arg);
|
||||
return result;
|
||||
}
|
||||
|
||||
static inline void inline_mysql_thread_set_psi_id(ulong id)
|
||||
static inline void inline_mysql_thread_set_psi_id(my_thread_id id)
|
||||
{
|
||||
struct PSI_thread *psi= PSI_THREAD_CALL(get_thread)();
|
||||
PSI_THREAD_CALL(set_thread_id)(psi, id);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
class THD;
|
||||
static inline void inline_mysql_thread_set_psi_THD(THD *thd)
|
||||
{
|
||||
struct PSI_thread *psi= PSI_THREAD_CALL(get_thread)();
|
||||
PSI_THREAD_CALL(set_thread_THD)(psi, thd);
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* DISABLE_MYSQL_THREAD_H */
|
||||
|
213
include/mysql/psi/mysql_transaction.h
Normal file
213
include/mysql/psi/mysql_transaction.h
Normal file
@ -0,0 +1,213 @@
|
||||
/* Copyright (c) 2013, 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_TRANSACTION_H
|
||||
#define MYSQL_TRANSACTION_H
|
||||
|
||||
/**
|
||||
@file mysql/psi/mysql_transaction.h
|
||||
Instrumentation helpers for transactions.
|
||||
*/
|
||||
|
||||
#include "mysql/psi/psi.h"
|
||||
|
||||
#ifndef PSI_TRANSACTION_CALL
|
||||
#define PSI_TRANSACTION_CALL(M) PSI_DYNAMIC_CALL(M)
|
||||
#endif
|
||||
|
||||
/**
|
||||
@defgroup Transaction_instrumentation Transaction Instrumentation
|
||||
@ingroup Instrumentation_interface
|
||||
@{
|
||||
*/
|
||||
|
||||
#ifdef HAVE_PSI_TRANSACTION_INTERFACE
|
||||
#define MYSQL_START_TRANSACTION(STATE, XID, TRXID, ISO, RO, AC) \
|
||||
inline_mysql_start_transaction(STATE, XID, TRXID, ISO, RO, AC, __FILE__, __LINE__)
|
||||
#else
|
||||
#define MYSQL_START_TRANSACTION(STATE, XID, TRXID, ISO, RO, AC) \
|
||||
do {} while (0)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PSI_TRANSACTION_INTERFACE
|
||||
#define MYSQL_SET_TRANSACTION_GTID(LOCKER, P1, P2) \
|
||||
inline_mysql_set_transaction_gtid(LOCKER, P1, P2)
|
||||
#else
|
||||
#define MYSQL_SET_TRANSACTION_GTID(LOCKER, P1, P2) \
|
||||
do {} while (0)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PSI_TRANSACTION_INTERFACE
|
||||
#define MYSQL_SET_TRANSACTION_XID(LOCKER, P1, P2) \
|
||||
inline_mysql_set_transaction_xid(LOCKER, P1, P2)
|
||||
#else
|
||||
#define MYSQL_SET_TRANSACTION_XID(LOCKER, P1, P2) \
|
||||
do {} while (0)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PSI_TRANSACTION_INTERFACE
|
||||
#define MYSQL_SET_TRANSACTION_XA_STATE(LOCKER, P1) \
|
||||
inline_mysql_set_transaction_xa_state(LOCKER, P1)
|
||||
#else
|
||||
#define MYSQL_SET_TRANSACTION_XA_STATE(LOCKER, P1) \
|
||||
do {} while (0)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PSI_TRANSACTION_INTERFACE
|
||||
#define MYSQL_SET_TRANSACTION_TRXID(LOCKER, P1) \
|
||||
inline_mysql_set_transaction_trxid(LOCKER, P1)
|
||||
#else
|
||||
#define MYSQL_SET_TRANSACTION_TRXID(LOCKER, P1) \
|
||||
do {} while (0)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PSI_TRANSACTION_INTERFACE
|
||||
#define MYSQL_INC_TRANSACTION_SAVEPOINTS(LOCKER, P1) \
|
||||
inline_mysql_inc_transaction_savepoints(LOCKER, P1)
|
||||
#else
|
||||
#define MYSQL_INC_TRANSACTION_SAVEPOINTS(LOCKER, P1) \
|
||||
do {} while (0)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PSI_TRANSACTION_INTERFACE
|
||||
#define MYSQL_INC_TRANSACTION_ROLLBACK_TO_SAVEPOINT(LOCKER, P1) \
|
||||
inline_mysql_inc_transaction_rollback_to_savepoint(LOCKER, P1)
|
||||
#else
|
||||
#define MYSQL_INC_TRANSACTION_ROLLBACK_TO_SAVEPOINT(LOCKER, P1) \
|
||||
do {} while (0)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PSI_TRANSACTION_INTERFACE
|
||||
#define MYSQL_INC_TRANSACTION_RELEASE_SAVEPOINT(LOCKER, P1) \
|
||||
inline_mysql_inc_transaction_release_savepoint(LOCKER, P1)
|
||||
#else
|
||||
#define MYSQL_INC_TRANSACTION_RELEASE_SAVEPOINT(LOCKER, P1) \
|
||||
do {} while (0)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PSI_TRANSACTION_INTERFACE
|
||||
#define MYSQL_ROLLBACK_TRANSACTION(LOCKER) \
|
||||
inline_mysql_rollback_transaction(LOCKER)
|
||||
#else
|
||||
#define MYSQL_ROLLBACK_TRANSACTION(LOCKER) \
|
||||
NULL
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PSI_TRANSACTION_INTERFACE
|
||||
#define MYSQL_COMMIT_TRANSACTION(LOCKER) \
|
||||
inline_mysql_commit_transaction(LOCKER)
|
||||
#else
|
||||
#define MYSQL_COMMIT_TRANSACTION(LOCKER) \
|
||||
NULL
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PSI_TRANSACTION_INTERFACE
|
||||
static inline struct PSI_transaction_locker *
|
||||
inline_mysql_start_transaction(PSI_transaction_locker_state *state,
|
||||
const void *xid,
|
||||
const ulonglong *trxid,
|
||||
int isolation_level,
|
||||
my_bool read_only,
|
||||
my_bool autocommit,
|
||||
const char *src_file, int src_line)
|
||||
{
|
||||
PSI_transaction_locker *locker;
|
||||
locker= PSI_TRANSACTION_CALL(get_thread_transaction_locker)(state,
|
||||
xid, trxid,
|
||||
isolation_level,
|
||||
read_only,
|
||||
autocommit);
|
||||
if (likely(locker != NULL))
|
||||
PSI_TRANSACTION_CALL(start_transaction)(locker, src_file, src_line);
|
||||
return locker;
|
||||
}
|
||||
|
||||
static inline void
|
||||
inline_mysql_set_transaction_gtid(PSI_transaction_locker *locker,
|
||||
const void *sid,
|
||||
const void *gtid_spec)
|
||||
{
|
||||
if (likely(locker != NULL))
|
||||
PSI_TRANSACTION_CALL(set_transaction_gtid)(locker, sid, gtid_spec);
|
||||
}
|
||||
|
||||
static inline void
|
||||
inline_mysql_set_transaction_xid(PSI_transaction_locker *locker,
|
||||
const void *xid,
|
||||
int xa_state)
|
||||
{
|
||||
if (likely(locker != NULL))
|
||||
PSI_TRANSACTION_CALL(set_transaction_xid)(locker, xid, xa_state);
|
||||
}
|
||||
|
||||
static inline void
|
||||
inline_mysql_set_transaction_xa_state(PSI_transaction_locker *locker,
|
||||
int xa_state)
|
||||
{
|
||||
if (likely(locker != NULL))
|
||||
PSI_TRANSACTION_CALL(set_transaction_xa_state)(locker, xa_state);
|
||||
}
|
||||
|
||||
static inline void
|
||||
inline_mysql_set_transaction_trxid(PSI_transaction_locker *locker,
|
||||
const ulonglong *trxid)
|
||||
{
|
||||
if (likely(locker != NULL))
|
||||
PSI_TRANSACTION_CALL(set_transaction_trxid)(locker, trxid);
|
||||
}
|
||||
|
||||
static inline void
|
||||
inline_mysql_inc_transaction_savepoints(PSI_transaction_locker *locker,
|
||||
ulong count)
|
||||
{
|
||||
if (likely(locker != NULL))
|
||||
PSI_TRANSACTION_CALL(inc_transaction_savepoints)(locker, count);
|
||||
}
|
||||
|
||||
static inline void
|
||||
inline_mysql_inc_transaction_rollback_to_savepoint(PSI_transaction_locker *locker,
|
||||
ulong count)
|
||||
{
|
||||
if (likely(locker != NULL))
|
||||
PSI_TRANSACTION_CALL(inc_transaction_rollback_to_savepoint)(locker, count);
|
||||
}
|
||||
|
||||
static inline void
|
||||
inline_mysql_inc_transaction_release_savepoint(PSI_transaction_locker *locker,
|
||||
ulong count)
|
||||
{
|
||||
if (likely(locker != NULL))
|
||||
PSI_TRANSACTION_CALL(inc_transaction_release_savepoint)(locker, count);
|
||||
}
|
||||
|
||||
static inline void
|
||||
inline_mysql_rollback_transaction(struct PSI_transaction_locker *locker)
|
||||
{
|
||||
if (likely(locker != NULL))
|
||||
PSI_TRANSACTION_CALL(end_transaction)(locker, false);
|
||||
}
|
||||
|
||||
static inline void
|
||||
inline_mysql_commit_transaction(struct PSI_transaction_locker *locker)
|
||||
{
|
||||
if (likely(locker != NULL))
|
||||
PSI_TRANSACTION_CALL(end_transaction)(locker, true);
|
||||
}
|
||||
#endif
|
||||
|
||||
/** @} (end of group Transaction_instrumentation) */
|
||||
|
||||
#endif
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
/* Copyright (c) 2011, 2013, 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
|
||||
@ -19,6 +19,6 @@
|
||||
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
|
||||
#define MY_GLOBAL_INCLUDED
|
||||
#include "mysql/psi/psi.h"
|
||||
|
||||
|
@ -1,7 +1,23 @@
|
||||
#include "mysql/psi/psi.h"
|
||||
#include "psi_base.h"
|
||||
#include "psi_memory.h"
|
||||
#include "psi_base.h"
|
||||
struct PSI_thread;
|
||||
typedef unsigned int PSI_memory_key;
|
||||
C_MODE_START
|
||||
struct MDL_key;
|
||||
typedef struct MDL_key MDL_key;
|
||||
typedef int opaque_mdl_type;
|
||||
typedef int opaque_mdl_duration;
|
||||
typedef int opaque_mdl_status;
|
||||
typedef int opaque_vio_type;
|
||||
struct TABLE_SHARE;
|
||||
struct sql_digest_storage;
|
||||
struct opaque_THD
|
||||
{
|
||||
int dummy;
|
||||
};
|
||||
typedef struct opaque_THD THD;
|
||||
struct PSI_mutex;
|
||||
typedef struct PSI_mutex PSI_mutex;
|
||||
struct PSI_rwlock;
|
||||
@ -18,14 +34,51 @@ struct PSI_file;
|
||||
typedef struct PSI_file PSI_file;
|
||||
struct PSI_socket;
|
||||
typedef struct PSI_socket PSI_socket;
|
||||
struct PSI_prepared_stmt;
|
||||
typedef struct PSI_prepared_stmt PSI_prepared_stmt;
|
||||
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_transaction_locker;
|
||||
typedef struct PSI_transaction_locker PSI_transaction_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_sp_share;
|
||||
typedef struct PSI_sp_share PSI_sp_share;
|
||||
struct PSI_sp_locker;
|
||||
typedef struct PSI_sp_locker PSI_sp_locker;
|
||||
struct PSI_metadata_lock;
|
||||
typedef struct PSI_metadata_lock PSI_metadata_lock;
|
||||
struct PSI_stage_progress
|
||||
{
|
||||
ulonglong m_work_completed;
|
||||
ulonglong m_work_estimated;
|
||||
};
|
||||
typedef struct PSI_stage_progress PSI_stage_progress;
|
||||
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;
|
||||
struct PSI_table_locker_state
|
||||
{
|
||||
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;
|
||||
};
|
||||
typedef struct PSI_table_locker_state PSI_table_locker_state;
|
||||
struct PSI_bootstrap
|
||||
{
|
||||
void* (*get_interface)(int version);
|
||||
|
@ -1,7 +1,41 @@
|
||||
#include "mysql/psi/psi.h"
|
||||
#include "psi_base.h"
|
||||
#include "psi_memory.h"
|
||||
#include "psi_base.h"
|
||||
struct PSI_thread;
|
||||
typedef unsigned int PSI_memory_key;
|
||||
struct PSI_memory_info_v1
|
||||
{
|
||||
PSI_memory_key *m_key;
|
||||
const char *m_name;
|
||||
int m_flags;
|
||||
};
|
||||
typedef struct PSI_memory_info_v1 PSI_memory_info_v1;
|
||||
typedef void (*register_memory_v1_t)
|
||||
(const char *category, struct PSI_memory_info_v1 *info, int count);
|
||||
typedef PSI_memory_key (*memory_alloc_v1_t)
|
||||
(PSI_memory_key key, size_t size, struct PSI_thread ** owner);
|
||||
typedef PSI_memory_key (*memory_realloc_v1_t)
|
||||
(PSI_memory_key key, size_t old_size, size_t new_size, struct PSI_thread ** owner);
|
||||
typedef PSI_memory_key (*memory_claim_v1_t)
|
||||
(PSI_memory_key key, size_t size, struct PSI_thread ** owner);
|
||||
typedef void (*memory_free_v1_t)
|
||||
(PSI_memory_key key, size_t size, struct PSI_thread * owner);
|
||||
typedef struct PSI_memory_info_v1 PSI_memory_info;
|
||||
C_MODE_START
|
||||
struct MDL_key;
|
||||
typedef struct MDL_key MDL_key;
|
||||
typedef int opaque_mdl_type;
|
||||
typedef int opaque_mdl_duration;
|
||||
typedef int opaque_mdl_status;
|
||||
typedef int opaque_vio_type;
|
||||
struct TABLE_SHARE;
|
||||
struct sql_digest_storage;
|
||||
struct opaque_THD
|
||||
{
|
||||
int dummy;
|
||||
};
|
||||
typedef struct opaque_THD THD;
|
||||
struct PSI_mutex;
|
||||
typedef struct PSI_mutex PSI_mutex;
|
||||
struct PSI_rwlock;
|
||||
@ -18,14 +52,51 @@ struct PSI_file;
|
||||
typedef struct PSI_file PSI_file;
|
||||
struct PSI_socket;
|
||||
typedef struct PSI_socket PSI_socket;
|
||||
struct PSI_prepared_stmt;
|
||||
typedef struct PSI_prepared_stmt PSI_prepared_stmt;
|
||||
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_transaction_locker;
|
||||
typedef struct PSI_transaction_locker PSI_transaction_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_sp_share;
|
||||
typedef struct PSI_sp_share PSI_sp_share;
|
||||
struct PSI_sp_locker;
|
||||
typedef struct PSI_sp_locker PSI_sp_locker;
|
||||
struct PSI_metadata_lock;
|
||||
typedef struct PSI_metadata_lock PSI_metadata_lock;
|
||||
struct PSI_stage_progress
|
||||
{
|
||||
ulonglong m_work_completed;
|
||||
ulonglong m_work_estimated;
|
||||
};
|
||||
typedef struct PSI_stage_progress PSI_stage_progress;
|
||||
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;
|
||||
struct PSI_table_locker_state
|
||||
{
|
||||
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;
|
||||
};
|
||||
typedef struct PSI_table_locker_state PSI_table_locker_state;
|
||||
struct PSI_bootstrap
|
||||
{
|
||||
void* (*get_interface)(int version);
|
||||
@ -41,6 +112,8 @@ struct PSI_file_locker;
|
||||
typedef struct PSI_file_locker PSI_file_locker;
|
||||
struct PSI_socket_locker;
|
||||
typedef struct PSI_socket_locker PSI_socket_locker;
|
||||
struct PSI_metadata_locker;
|
||||
typedef struct PSI_metadata_locker PSI_metadata_locker;
|
||||
enum PSI_mutex_operation
|
||||
{
|
||||
PSI_MUTEX_LOCK= 0,
|
||||
@ -52,7 +125,13 @@ enum PSI_rwlock_operation
|
||||
PSI_RWLOCK_READLOCK= 0,
|
||||
PSI_RWLOCK_WRITELOCK= 1,
|
||||
PSI_RWLOCK_TRYREADLOCK= 2,
|
||||
PSI_RWLOCK_TRYWRITELOCK= 3
|
||||
PSI_RWLOCK_TRYWRITELOCK= 3,
|
||||
PSI_RWLOCK_SHAREDLOCK= 4,
|
||||
PSI_RWLOCK_SHAREDEXCLUSIVELOCK= 5,
|
||||
PSI_RWLOCK_EXCLUSIVELOCK= 6,
|
||||
PSI_RWLOCK_TRYSHAREDLOCK= 7,
|
||||
PSI_RWLOCK_TRYSHAREDEXCLUSIVELOCK= 8,
|
||||
PSI_RWLOCK_TRYEXCLUSIVELOCK= 9
|
||||
};
|
||||
typedef enum PSI_rwlock_operation PSI_rwlock_operation;
|
||||
enum PSI_cond_operation
|
||||
@ -82,14 +161,6 @@ enum PSI_file_operation
|
||||
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,
|
||||
@ -135,48 +206,56 @@ struct PSI_mutex_info_v1
|
||||
const char *m_name;
|
||||
int m_flags;
|
||||
};
|
||||
typedef struct PSI_mutex_info_v1 PSI_mutex_info_v1;
|
||||
struct PSI_rwlock_info_v1
|
||||
{
|
||||
PSI_rwlock_key *m_key;
|
||||
const char *m_name;
|
||||
int m_flags;
|
||||
};
|
||||
typedef struct PSI_rwlock_info_v1 PSI_rwlock_info_v1;
|
||||
struct PSI_cond_info_v1
|
||||
{
|
||||
PSI_cond_key *m_key;
|
||||
const char *m_name;
|
||||
int m_flags;
|
||||
};
|
||||
typedef struct PSI_cond_info_v1 PSI_cond_info_v1;
|
||||
struct PSI_thread_info_v1
|
||||
{
|
||||
PSI_thread_key *m_key;
|
||||
const char *m_name;
|
||||
int m_flags;
|
||||
};
|
||||
typedef struct PSI_thread_info_v1 PSI_thread_info_v1;
|
||||
struct PSI_file_info_v1
|
||||
{
|
||||
PSI_file_key *m_key;
|
||||
const char *m_name;
|
||||
int m_flags;
|
||||
};
|
||||
typedef struct PSI_file_info_v1 PSI_file_info_v1;
|
||||
struct PSI_stage_info_v1
|
||||
{
|
||||
PSI_stage_key m_key;
|
||||
const char *m_name;
|
||||
int m_flags;
|
||||
};
|
||||
typedef struct PSI_stage_info_v1 PSI_stage_info_v1;
|
||||
struct PSI_statement_info_v1
|
||||
{
|
||||
PSI_statement_key m_key;
|
||||
const char *m_name;
|
||||
int m_flags;
|
||||
};
|
||||
typedef struct PSI_statement_info_v1 PSI_statement_info_v1;
|
||||
struct PSI_socket_info_v1
|
||||
{
|
||||
PSI_socket_key *m_key;
|
||||
const char *m_name;
|
||||
int m_flags;
|
||||
};
|
||||
typedef struct PSI_socket_info_v1 PSI_socket_info_v1;
|
||||
struct PSI_idle_locker_state_v1
|
||||
{
|
||||
uint m_flags;
|
||||
@ -185,6 +264,7 @@ struct PSI_idle_locker_state_v1
|
||||
ulonglong (*m_timer)(void);
|
||||
void *m_wait;
|
||||
};
|
||||
typedef struct PSI_idle_locker_state_v1 PSI_idle_locker_state_v1;
|
||||
struct PSI_mutex_locker_state_v1
|
||||
{
|
||||
uint m_flags;
|
||||
@ -195,6 +275,7 @@ struct PSI_mutex_locker_state_v1
|
||||
ulonglong (*m_timer)(void);
|
||||
void *m_wait;
|
||||
};
|
||||
typedef struct PSI_mutex_locker_state_v1 PSI_mutex_locker_state_v1;
|
||||
struct PSI_rwlock_locker_state_v1
|
||||
{
|
||||
uint m_flags;
|
||||
@ -205,6 +286,7 @@ struct PSI_rwlock_locker_state_v1
|
||||
ulonglong (*m_timer)(void);
|
||||
void *m_wait;
|
||||
};
|
||||
typedef struct PSI_rwlock_locker_state_v1 PSI_rwlock_locker_state_v1;
|
||||
struct PSI_cond_locker_state_v1
|
||||
{
|
||||
uint m_flags;
|
||||
@ -216,6 +298,7 @@ struct PSI_cond_locker_state_v1
|
||||
ulonglong (*m_timer)(void);
|
||||
void *m_wait;
|
||||
};
|
||||
typedef struct PSI_cond_locker_state_v1 PSI_cond_locker_state_v1;
|
||||
struct PSI_file_locker_state_v1
|
||||
{
|
||||
uint m_flags;
|
||||
@ -229,21 +312,21 @@ struct PSI_file_locker_state_v1
|
||||
ulonglong (*m_timer)(void);
|
||||
void *m_wait;
|
||||
};
|
||||
struct PSI_table_locker_state_v1
|
||||
typedef struct PSI_file_locker_state_v1 PSI_file_locker_state_v1;
|
||||
struct PSI_metadata_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_metadata_lock *m_metadata_lock;
|
||||
struct PSI_thread *m_thread;
|
||||
ulonglong m_timer_start;
|
||||
ulonglong (*m_timer)(void);
|
||||
void *m_wait;
|
||||
uint m_index;
|
||||
};
|
||||
typedef struct PSI_metadata_locker_state_v1 PSI_metadata_locker_state_v1;
|
||||
struct PSI_statement_locker_state_v1
|
||||
{
|
||||
my_bool m_discarded;
|
||||
my_bool m_in_prepare;
|
||||
uchar m_no_index_used;
|
||||
uchar m_no_good_index_used;
|
||||
uint m_flags;
|
||||
@ -270,7 +353,26 @@ struct PSI_statement_locker_state_v1
|
||||
char m_schema_name[(64 * 3)];
|
||||
uint m_schema_name_length;
|
||||
uint m_cs_number;
|
||||
PSI_sp_share *m_parent_sp_share;
|
||||
PSI_prepared_stmt *m_parent_prepared_stmt;
|
||||
};
|
||||
typedef struct PSI_statement_locker_state_v1 PSI_statement_locker_state_v1;
|
||||
struct PSI_transaction_locker_state_v1
|
||||
{
|
||||
uint m_flags;
|
||||
void *m_class;
|
||||
struct PSI_thread *m_thread;
|
||||
ulonglong m_timer_start;
|
||||
ulonglong (*m_timer)(void);
|
||||
void *m_transaction;
|
||||
my_bool m_read_only;
|
||||
my_bool m_autocommit;
|
||||
ulong m_statement_count;
|
||||
ulong m_savepoint_count;
|
||||
ulong m_rollback_to_savepoint_count;
|
||||
ulong m_release_savepoint_count;
|
||||
};
|
||||
typedef struct PSI_transaction_locker_state_v1 PSI_transaction_locker_state_v1;
|
||||
struct PSI_socket_locker_state_v1
|
||||
{
|
||||
uint m_flags;
|
||||
@ -284,6 +386,16 @@ struct PSI_socket_locker_state_v1
|
||||
int m_src_line;
|
||||
void *m_wait;
|
||||
};
|
||||
typedef struct PSI_socket_locker_state_v1 PSI_socket_locker_state_v1;
|
||||
struct PSI_sp_locker_state_v1
|
||||
{
|
||||
uint m_flags;
|
||||
struct PSI_thread *m_thread;
|
||||
ulonglong m_timer_start;
|
||||
ulonglong (*m_timer)(void);
|
||||
PSI_sp_share* m_sp_share;
|
||||
};
|
||||
typedef struct PSI_sp_locker_state_v1 PSI_sp_locker_state_v1;
|
||||
typedef void (*register_mutex_v1_t)
|
||||
(const char *category, struct PSI_mutex_info_v1 *info, int count);
|
||||
typedef void (*register_rwlock_v1_t)
|
||||
@ -325,23 +437,28 @@ 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 (*close_table_v1_t)(struct TABLE_SHARE *server_share,
|
||||
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,
|
||||
my_thread_handle *thread,
|
||||
const my_thread_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_THD_v1_t)(struct PSI_thread *thread,
|
||||
THD *thd);
|
||||
typedef void (*set_thread_id_v1_t)(struct PSI_thread *thread,
|
||||
ulonglong id);
|
||||
typedef void (*set_thread_os_id_v1_t)(struct PSI_thread *thread);
|
||||
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,
|
||||
typedef void (*set_thread_account_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_connection_type_v1_t)(opaque_vio_type conn_type);
|
||||
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, uint info_len);
|
||||
@ -400,25 +517,30 @@ typedef struct PSI_cond_locker* (*start_cond_wait_v1_t)
|
||||
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_locker_state *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 void (*end_table_io_wait_v1_t)
|
||||
(struct PSI_table_locker *locker,
|
||||
ulonglong numrows);
|
||||
typedef struct PSI_table_locker* (*start_table_lock_wait_v1_t)
|
||||
(struct PSI_table_locker_state_v1 *state,
|
||||
(struct PSI_table_locker_state *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 (*unlock_table_v1_t)(struct PSI_table *table);
|
||||
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 (*end_temp_file_open_wait_and_bind_to_descriptor_v1_t)
|
||||
(struct PSI_file_locker *locker, File file, const char *filename);
|
||||
typedef void (*start_file_wait_v1_t)
|
||||
(struct PSI_file_locker *locker, size_t count,
|
||||
const char *src_file, uint src_line);
|
||||
@ -428,12 +550,13 @@ 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)
|
||||
typedef PSI_stage_progress* (*start_stage_v1_t)
|
||||
(PSI_stage_key key, const char *src_file, int src_line);
|
||||
typedef PSI_stage_progress* (*get_current_stage_progress_v1_t)(void);
|
||||
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);
|
||||
PSI_statement_key key, const void *charset, PSI_sp_share *sp_share);
|
||||
typedef struct PSI_statement_locker* (*refine_statement_v1_t)
|
||||
(struct PSI_statement_locker *locker,
|
||||
PSI_statement_key key);
|
||||
@ -478,6 +601,34 @@ 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_transaction_locker* (*get_thread_transaction_locker_v1_t)
|
||||
(struct PSI_transaction_locker_state_v1 *state, const void *xid,
|
||||
const ulonglong *trxid, int isolation_level, my_bool read_only,
|
||||
my_bool autocommit);
|
||||
typedef void (*start_transaction_v1_t)
|
||||
(struct PSI_transaction_locker *locker,
|
||||
const char *src_file, uint src_line);
|
||||
typedef void (*set_transaction_xid_v1_t)
|
||||
(struct PSI_transaction_locker *locker,
|
||||
const void *xid, int xa_state);
|
||||
typedef void (*set_transaction_xa_state_v1_t)
|
||||
(struct PSI_transaction_locker *locker,
|
||||
int xa_state);
|
||||
typedef void (*set_transaction_gtid_v1_t)
|
||||
(struct PSI_transaction_locker *locker,
|
||||
const void *sid, const void *gtid_spec);
|
||||
typedef void (*set_transaction_trxid_v1_t)
|
||||
(struct PSI_transaction_locker *locker,
|
||||
const ulonglong *trxid);
|
||||
typedef void (*inc_transaction_savepoints_v1_t)
|
||||
(struct PSI_transaction_locker *locker, ulong count);
|
||||
typedef void (*inc_transaction_rollback_to_savepoint_v1_t)
|
||||
(struct PSI_transaction_locker *locker, ulong count);
|
||||
typedef void (*inc_transaction_release_savepoint_v1_t)
|
||||
(struct PSI_transaction_locker *locker, ulong count);
|
||||
typedef void (*end_transaction_v1_t)
|
||||
(struct PSI_transaction_locker *locker,
|
||||
my_bool commit);
|
||||
typedef struct PSI_socket_locker* (*start_socket_wait_v1_t)
|
||||
(struct PSI_socket_locker_state_v1 *state,
|
||||
struct PSI_socket *socket,
|
||||
@ -493,10 +644,50 @@ typedef void (*set_socket_info_v1_t)(struct PSI_socket *socket,
|
||||
const struct sockaddr *addr,
|
||||
socklen_t addr_len);
|
||||
typedef void (*set_socket_thread_owner_v1_t)(struct PSI_socket *socket);
|
||||
typedef PSI_prepared_stmt* (*create_prepared_stmt_v1_t)
|
||||
(void *identity, uint stmt_id, PSI_statement_locker *locker,
|
||||
const char *stmt_name, size_t stmt_name_length,
|
||||
const char *name, size_t length);
|
||||
typedef void (*destroy_prepared_stmt_v1_t)
|
||||
(PSI_prepared_stmt *prepared_stmt);
|
||||
typedef void (*reprepare_prepared_stmt_v1_t)
|
||||
(PSI_prepared_stmt *prepared_stmt);
|
||||
typedef void (*execute_prepared_stmt_v1_t)
|
||||
(PSI_statement_locker *locker, PSI_prepared_stmt* prepared_stmt);
|
||||
typedef struct PSI_digest_locker * (*digest_start_v1_t)
|
||||
(struct PSI_statement_locker *locker);
|
||||
typedef void (*digest_end_v1_t)
|
||||
(struct PSI_digest_locker *locker, const struct sql_digest_storage *digest);
|
||||
typedef PSI_sp_locker* (*start_sp_v1_t)
|
||||
(struct PSI_sp_locker_state_v1 *state, struct PSI_sp_share* sp_share);
|
||||
typedef void (*end_sp_v1_t)
|
||||
(struct PSI_sp_locker *locker);
|
||||
typedef void (*drop_sp_v1_t)
|
||||
(uint object_type,
|
||||
const char *schema_name, uint schema_name_length,
|
||||
const char *object_name, uint object_name_length);
|
||||
typedef struct PSI_sp_share* (*get_sp_share_v1_t)
|
||||
(uint object_type,
|
||||
const char *schema_name, uint schema_name_length,
|
||||
const char *object_name, uint object_name_length);
|
||||
typedef void (*release_sp_share_v1_t)(struct PSI_sp_share *share);
|
||||
typedef PSI_metadata_lock* (*create_metadata_lock_v1_t)
|
||||
(void *identity,
|
||||
const MDL_key *key,
|
||||
opaque_mdl_type mdl_type,
|
||||
opaque_mdl_duration mdl_duration,
|
||||
opaque_mdl_status mdl_status,
|
||||
const char *src_file,
|
||||
uint src_line);
|
||||
typedef void (*set_metadata_lock_status_v1_t)(PSI_metadata_lock *lock,
|
||||
opaque_mdl_status mdl_status);
|
||||
typedef void (*destroy_metadata_lock_v1_t)(PSI_metadata_lock *lock);
|
||||
typedef struct PSI_metadata_locker* (*start_metadata_wait_v1_t)
|
||||
(struct PSI_metadata_locker_state_v1 *state,
|
||||
struct PSI_metadata_lock *mdl,
|
||||
const char *src_file, uint src_line);
|
||||
typedef void (*end_metadata_wait_v1_t)
|
||||
(struct PSI_metadata_locker *locker, int rc);
|
||||
typedef int (*set_thread_connect_attrs_v1_t)(const char *buffer, uint length,
|
||||
const void *from_cs);
|
||||
struct PSI_v1
|
||||
@ -528,11 +719,14 @@ struct PSI_v1
|
||||
spawn_thread_v1_t spawn_thread;
|
||||
new_thread_v1_t new_thread;
|
||||
set_thread_id_v1_t set_thread_id;
|
||||
set_thread_THD_v1_t set_thread_THD;
|
||||
set_thread_os_id_v1_t set_thread_os_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_account_v1_t set_thread_account;
|
||||
set_thread_db_v1_t set_thread_db;
|
||||
set_thread_command_v1_t set_thread_command;
|
||||
set_connection_type_v1_t set_connection_type;
|
||||
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;
|
||||
@ -564,11 +758,14 @@ struct PSI_v1
|
||||
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;
|
||||
end_temp_file_open_wait_and_bind_to_descriptor_v1_t
|
||||
end_temp_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;
|
||||
get_current_stage_progress_v1_t get_current_stage_progress;
|
||||
end_stage_v1_t end_stage;
|
||||
get_thread_statement_locker_v1_t get_thread_statement_locker;
|
||||
refine_statement_v1_t refine_statement;
|
||||
@ -591,14 +788,44 @@ struct PSI_v1
|
||||
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;
|
||||
get_thread_transaction_locker_v1_t get_thread_transaction_locker;
|
||||
start_transaction_v1_t start_transaction;
|
||||
set_transaction_xid_v1_t set_transaction_xid;
|
||||
set_transaction_xa_state_v1_t set_transaction_xa_state;
|
||||
set_transaction_gtid_v1_t set_transaction_gtid;
|
||||
set_transaction_trxid_v1_t set_transaction_trxid;
|
||||
inc_transaction_savepoints_v1_t inc_transaction_savepoints;
|
||||
inc_transaction_rollback_to_savepoint_v1_t inc_transaction_rollback_to_savepoint;
|
||||
inc_transaction_release_savepoint_v1_t inc_transaction_release_savepoint;
|
||||
end_transaction_v1_t end_transaction;
|
||||
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;
|
||||
create_prepared_stmt_v1_t create_prepared_stmt;
|
||||
destroy_prepared_stmt_v1_t destroy_prepared_stmt;
|
||||
reprepare_prepared_stmt_v1_t reprepare_prepared_stmt;
|
||||
execute_prepared_stmt_v1_t execute_prepared_stmt;
|
||||
digest_start_v1_t digest_start;
|
||||
digest_end_v1_t digest_end;
|
||||
set_thread_connect_attrs_v1_t set_thread_connect_attrs;
|
||||
start_sp_v1_t start_sp;
|
||||
end_sp_v1_t end_sp;
|
||||
drop_sp_v1_t drop_sp;
|
||||
get_sp_share_v1_t get_sp_share;
|
||||
release_sp_share_v1_t release_sp_share;
|
||||
register_memory_v1_t register_memory;
|
||||
memory_alloc_v1_t memory_alloc;
|
||||
memory_realloc_v1_t memory_realloc;
|
||||
memory_claim_v1_t memory_claim;
|
||||
memory_free_v1_t memory_free;
|
||||
unlock_table_v1_t unlock_table;
|
||||
create_metadata_lock_v1_t create_metadata_lock;
|
||||
set_metadata_lock_status_v1_t set_metadata_lock_status;
|
||||
destroy_metadata_lock_v1_t destroy_metadata_lock;
|
||||
start_metadata_wait_v1_t start_metadata_wait;
|
||||
end_metadata_wait_v1_t end_metadata_wait;
|
||||
};
|
||||
typedef struct PSI_v1 PSI;
|
||||
typedef struct PSI_mutex_info_v1 PSI_mutex_info;
|
||||
@ -608,14 +835,17 @@ 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_transaction_info_v1 PSI_transaction_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_transaction_locker_state_v1 PSI_transaction_locker_state;
|
||||
typedef struct PSI_socket_locker_state_v1 PSI_socket_locker_state;
|
||||
typedef struct PSI_sp_locker_state_v1 PSI_sp_locker_state;
|
||||
typedef struct PSI_metadata_locker_state_v1 PSI_metadata_locker_state;
|
||||
extern MYSQL_PLUGIN_IMPORT PSI *PSI_server;
|
||||
C_MODE_END
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
/* Copyright (c) 2008, 2013, 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
|
||||
@ -21,6 +21,6 @@
|
||||
*/
|
||||
#define USE_PSI_2
|
||||
#define HAVE_PSI_INTERFACE
|
||||
#define _global_h
|
||||
#define MY_GLOBAL_INCLUDED
|
||||
#include "mysql/psi/psi.h"
|
||||
|
||||
|
@ -1,7 +1,28 @@
|
||||
#include "mysql/psi/psi.h"
|
||||
#include "psi_base.h"
|
||||
#include "psi_memory.h"
|
||||
#include "psi_base.h"
|
||||
struct PSI_thread;
|
||||
typedef unsigned int PSI_memory_key;
|
||||
struct PSI_memory_info_v2
|
||||
{
|
||||
int placeholder;
|
||||
};
|
||||
typedef struct PSI_memory_info_v2 PSI_memory_info;
|
||||
C_MODE_START
|
||||
struct MDL_key;
|
||||
typedef struct MDL_key MDL_key;
|
||||
typedef int opaque_mdl_type;
|
||||
typedef int opaque_mdl_duration;
|
||||
typedef int opaque_mdl_status;
|
||||
typedef int opaque_vio_type;
|
||||
struct TABLE_SHARE;
|
||||
struct sql_digest_storage;
|
||||
struct opaque_THD
|
||||
{
|
||||
int dummy;
|
||||
};
|
||||
typedef struct opaque_THD THD;
|
||||
struct PSI_mutex;
|
||||
typedef struct PSI_mutex PSI_mutex;
|
||||
struct PSI_rwlock;
|
||||
@ -18,14 +39,51 @@ struct PSI_file;
|
||||
typedef struct PSI_file PSI_file;
|
||||
struct PSI_socket;
|
||||
typedef struct PSI_socket PSI_socket;
|
||||
struct PSI_prepared_stmt;
|
||||
typedef struct PSI_prepared_stmt PSI_prepared_stmt;
|
||||
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_transaction_locker;
|
||||
typedef struct PSI_transaction_locker PSI_transaction_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_sp_share;
|
||||
typedef struct PSI_sp_share PSI_sp_share;
|
||||
struct PSI_sp_locker;
|
||||
typedef struct PSI_sp_locker PSI_sp_locker;
|
||||
struct PSI_metadata_lock;
|
||||
typedef struct PSI_metadata_lock PSI_metadata_lock;
|
||||
struct PSI_stage_progress
|
||||
{
|
||||
ulonglong m_work_completed;
|
||||
ulonglong m_work_estimated;
|
||||
};
|
||||
typedef struct PSI_stage_progress PSI_stage_progress;
|
||||
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;
|
||||
struct PSI_table_locker_state
|
||||
{
|
||||
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;
|
||||
};
|
||||
typedef struct PSI_table_locker_state PSI_table_locker_state;
|
||||
struct PSI_bootstrap
|
||||
{
|
||||
void* (*get_interface)(int version);
|
||||
@ -41,6 +99,8 @@ struct PSI_file_locker;
|
||||
typedef struct PSI_file_locker PSI_file_locker;
|
||||
struct PSI_socket_locker;
|
||||
typedef struct PSI_socket_locker PSI_socket_locker;
|
||||
struct PSI_metadata_locker;
|
||||
typedef struct PSI_metadata_locker PSI_metadata_locker;
|
||||
enum PSI_mutex_operation
|
||||
{
|
||||
PSI_MUTEX_LOCK= 0,
|
||||
@ -52,7 +112,13 @@ enum PSI_rwlock_operation
|
||||
PSI_RWLOCK_READLOCK= 0,
|
||||
PSI_RWLOCK_WRITELOCK= 1,
|
||||
PSI_RWLOCK_TRYREADLOCK= 2,
|
||||
PSI_RWLOCK_TRYWRITELOCK= 3
|
||||
PSI_RWLOCK_TRYWRITELOCK= 3,
|
||||
PSI_RWLOCK_SHAREDLOCK= 4,
|
||||
PSI_RWLOCK_SHAREDEXCLUSIVELOCK= 5,
|
||||
PSI_RWLOCK_EXCLUSIVELOCK= 6,
|
||||
PSI_RWLOCK_TRYSHAREDLOCK= 7,
|
||||
PSI_RWLOCK_TRYSHAREDEXCLUSIVELOCK= 8,
|
||||
PSI_RWLOCK_TRYEXCLUSIVELOCK= 9
|
||||
};
|
||||
typedef enum PSI_rwlock_operation PSI_rwlock_operation;
|
||||
enum PSI_cond_operation
|
||||
@ -82,14 +148,6 @@ enum PSI_file_operation
|
||||
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,
|
||||
@ -161,6 +219,10 @@ struct PSI_statement_info_v2
|
||||
{
|
||||
int placeholder;
|
||||
};
|
||||
struct PSI_transaction_info_v2
|
||||
{
|
||||
int placeholder;
|
||||
};
|
||||
struct PSI_idle_locker_state_v2
|
||||
{
|
||||
int placeholder;
|
||||
@ -181,18 +243,22 @@ 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_transaction_locker_state_v2
|
||||
{
|
||||
int placeholder;
|
||||
};
|
||||
struct PSI_socket_locker_state_v2
|
||||
{
|
||||
int placeholder;
|
||||
};
|
||||
struct PSI_metadata_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;
|
||||
@ -201,14 +267,17 @@ 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_transaction_info_v2 PSI_transaction_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_transaction_locker_state_v2 PSI_transaction_locker_state;
|
||||
typedef struct PSI_socket_locker_state_v2 PSI_socket_locker_state;
|
||||
typedef struct PSI_sp_locker_state_v2 PSI_sp_locker_state;
|
||||
typedef struct PSI_metadata_locker_state_v2 PSI_metadata_locker_state;
|
||||
extern MYSQL_PLUGIN_IMPORT PSI *PSI_server;
|
||||
C_MODE_END
|
||||
|
155
include/mysql/psi/psi_base.h
Normal file
155
include/mysql/psi/psi_base.h
Normal file
@ -0,0 +1,155 @@
|
||||
/* Copyright (c) 2008, 2016, 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_PSI_BASE_H
|
||||
#define MYSQL_PSI_BASE_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
@file mysql/psi/psi_base.h
|
||||
Performance schema instrumentation interface.
|
||||
|
||||
@defgroup Instrumentation_interface Instrumentation Interface
|
||||
@ingroup Performance_schema
|
||||
@{
|
||||
*/
|
||||
|
||||
#define PSI_INSTRUMENT_ME 0
|
||||
|
||||
#define PSI_NOT_INSTRUMENTED 0
|
||||
|
||||
/**
|
||||
Global flag.
|
||||
This flag indicate that an instrumentation point is a global variable,
|
||||
or a singleton.
|
||||
*/
|
||||
#define PSI_FLAG_GLOBAL (1 << 0)
|
||||
|
||||
/**
|
||||
Mutable flag.
|
||||
This flag indicate that an instrumentation point is a general placeholder,
|
||||
that can mutate into a more specific instrumentation point.
|
||||
*/
|
||||
#define PSI_FLAG_MUTABLE (1 << 1)
|
||||
|
||||
#define PSI_FLAG_THREAD (1 << 2)
|
||||
|
||||
/**
|
||||
Stage progress flag.
|
||||
This flag apply to the stage instruments only.
|
||||
It indicates the instrumentation provides progress data.
|
||||
*/
|
||||
#define PSI_FLAG_STAGE_PROGRESS (1 << 3)
|
||||
|
||||
/**
|
||||
Shared Exclusive flag.
|
||||
Indicates that rwlock support the shared exclusive state.
|
||||
*/
|
||||
#define PSI_RWLOCK_FLAG_SX (1 << 4)
|
||||
|
||||
/**
|
||||
Transferable flag.
|
||||
This flag indicate that an instrumented object can
|
||||
be created by a thread and destroyed by another thread.
|
||||
*/
|
||||
#define PSI_FLAG_TRANSFER (1 << 5)
|
||||
|
||||
/**
|
||||
Volatility flag.
|
||||
This flag indicate that an instrumented object
|
||||
has a volatility (life cycle) comparable
|
||||
to the volatility of a session.
|
||||
*/
|
||||
#define PSI_FLAG_VOLATILITY_SESSION (1 << 6)
|
||||
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
|
||||
/**
|
||||
@def PSI_VERSION_1
|
||||
Performance Schema Interface number for version 1.
|
||||
This version is supported.
|
||||
*/
|
||||
#define PSI_VERSION_1 1
|
||||
|
||||
/**
|
||||
@def PSI_VERSION_2
|
||||
Performance Schema Interface number for version 2.
|
||||
This version is not implemented, it's a placeholder.
|
||||
*/
|
||||
#define PSI_VERSION_2 2
|
||||
|
||||
/**
|
||||
@def PSI_CURRENT_VERSION
|
||||
Performance Schema Interface number for the most recent version.
|
||||
The most current version is @c PSI_VERSION_1
|
||||
*/
|
||||
#define PSI_CURRENT_VERSION 1
|
||||
|
||||
/**
|
||||
@def USE_PSI_1
|
||||
Define USE_PSI_1 to use the interface version 1.
|
||||
*/
|
||||
|
||||
/**
|
||||
@def USE_PSI_2
|
||||
Define USE_PSI_2 to use the interface version 2.
|
||||
*/
|
||||
|
||||
/**
|
||||
@def HAVE_PSI_1
|
||||
Define HAVE_PSI_1 if the interface version 1 needs to be compiled in.
|
||||
*/
|
||||
|
||||
/**
|
||||
@def HAVE_PSI_2
|
||||
Define HAVE_PSI_2 if the interface version 2 needs to be compiled in.
|
||||
*/
|
||||
|
||||
#ifndef USE_PSI_2
|
||||
#ifndef USE_PSI_1
|
||||
#define USE_PSI_1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef USE_PSI_1
|
||||
#define HAVE_PSI_1
|
||||
#endif
|
||||
|
||||
#ifdef USE_PSI_2
|
||||
#define HAVE_PSI_2
|
||||
#endif
|
||||
|
||||
/*
|
||||
Allow to override PSI_XXX_CALL at compile time
|
||||
with more efficient implementations, if available.
|
||||
If nothing better is available,
|
||||
make a dynamic call using the PSI_server function pointer.
|
||||
*/
|
||||
|
||||
#define PSI_DYNAMIC_CALL(M) PSI_server->M
|
||||
|
||||
#endif /* HAVE_PSI_INTERFACE */
|
||||
|
||||
/** @} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* MYSQL_PSI_BASE_H */
|
||||
|
155
include/mysql/psi/psi_memory.h
Normal file
155
include/mysql/psi/psi_memory.h
Normal file
@ -0,0 +1,155 @@
|
||||
/* Copyright (c) 2013, 2015, 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_PSI_MEMORY_H
|
||||
#define MYSQL_PSI_MEMORY_H
|
||||
|
||||
#include "psi_base.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
@file mysql/psi/psi_memory.h
|
||||
Performance schema instrumentation interface.
|
||||
|
||||
@defgroup Instrumentation_interface Instrumentation Interface
|
||||
@ingroup Performance_schema
|
||||
@{
|
||||
*/
|
||||
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
#ifndef DISABLE_ALL_PSI
|
||||
#ifndef DISABLE_PSI_MEMORY
|
||||
#define HAVE_PSI_MEMORY_INTERFACE
|
||||
#endif /* DISABLE_PSI_MEMORY */
|
||||
#endif /* DISABLE_ALL_PSI */
|
||||
#endif /* HAVE_PSI_INTERFACE */
|
||||
|
||||
struct PSI_thread;
|
||||
|
||||
/**
|
||||
Instrumented memory key.
|
||||
To instrument memory, a memory key must be obtained using @c register_memory.
|
||||
Using a zero key always disable the instrumentation.
|
||||
*/
|
||||
typedef unsigned int PSI_memory_key;
|
||||
|
||||
#ifdef HAVE_PSI_1
|
||||
|
||||
/**
|
||||
@defgroup Group_PSI_v1 Application Binary Interface, version 1
|
||||
@ingroup Instrumentation_interface
|
||||
@{
|
||||
*/
|
||||
|
||||
/**
|
||||
Memory instrument information.
|
||||
@since PSI_VERSION_1
|
||||
This structure is used to register instrumented memory.
|
||||
*/
|
||||
struct PSI_memory_info_v1
|
||||
{
|
||||
/** Pointer to the key assigned to the registered memory. */
|
||||
PSI_memory_key *m_key;
|
||||
/** The name of the memory instrument to register. */
|
||||
const char *m_name;
|
||||
/**
|
||||
The flags of the socket instrument to register.
|
||||
@sa PSI_FLAG_GLOBAL
|
||||
*/
|
||||
int m_flags;
|
||||
};
|
||||
typedef struct PSI_memory_info_v1 PSI_memory_info_v1;
|
||||
|
||||
/**
|
||||
Memory registration API.
|
||||
@param category a category name (typically a plugin name)
|
||||
@param info an array of memory info to register
|
||||
@param count the size of the info array
|
||||
*/
|
||||
typedef void (*register_memory_v1_t)
|
||||
(const char *category, struct PSI_memory_info_v1 *info, int count);
|
||||
|
||||
/**
|
||||
Instrument memory allocation.
|
||||
@param key the memory instrument key
|
||||
@param size the size of memory allocated
|
||||
@param[out] owner the memory owner
|
||||
@return the effective memory instrument key
|
||||
*/
|
||||
typedef PSI_memory_key (*memory_alloc_v1_t)
|
||||
(PSI_memory_key key, size_t size, struct PSI_thread ** owner);
|
||||
|
||||
/**
|
||||
Instrument memory re allocation.
|
||||
@param key the memory instrument key
|
||||
@param old_size the size of memory previously allocated
|
||||
@param new_size the size of memory re allocated
|
||||
@param[in, out] owner the memory owner
|
||||
@return the effective memory instrument key
|
||||
*/
|
||||
typedef PSI_memory_key (*memory_realloc_v1_t)
|
||||
(PSI_memory_key key, size_t old_size, size_t new_size, struct PSI_thread ** owner);
|
||||
|
||||
/**
|
||||
Instrument memory claim.
|
||||
@param key the memory instrument key
|
||||
@param size the size of memory allocated
|
||||
@param[in, out] owner the memory owner
|
||||
@return the effective memory instrument key
|
||||
*/
|
||||
typedef PSI_memory_key (*memory_claim_v1_t)
|
||||
(PSI_memory_key key, size_t size, struct PSI_thread ** owner);
|
||||
|
||||
/**
|
||||
Instrument memory free.
|
||||
@param key the memory instrument key
|
||||
@param size the size of memory allocated
|
||||
@param owner the memory owner
|
||||
*/
|
||||
typedef void (*memory_free_v1_t)
|
||||
(PSI_memory_key key, size_t size, struct PSI_thread * owner);
|
||||
|
||||
/** @} (end of group Group_PSI_v1) */
|
||||
|
||||
#endif /* HAVE_PSI_1 */
|
||||
|
||||
#ifdef HAVE_PSI_2
|
||||
struct PSI_memory_info_v2
|
||||
{
|
||||
int placeholder;
|
||||
};
|
||||
|
||||
#endif /* HAVE_PSI_2 */
|
||||
|
||||
#ifdef USE_PSI_1
|
||||
typedef struct PSI_memory_info_v1 PSI_memory_info;
|
||||
#endif
|
||||
|
||||
#ifdef USE_PSI_2
|
||||
typedef struct PSI_memory_info_v2 PSI_memory_info;
|
||||
#endif
|
||||
|
||||
/** @} (end of group Instrumentation_interface) */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* MYSQL_PSI_MEMORY_H */
|
||||
|
@ -148,7 +148,7 @@ drop table if exists marker_multi_delete;
|
||||
use my_replicated_db;
|
||||
|
||||
insert into performance_schema.setup_actors
|
||||
values ('FOO', 'FOO', 'FOO');
|
||||
values ('FOO', 'FOO', 'FOO', 'YES', 'YES');
|
||||
|
||||
--error 0, ER_BINLOG_STMT_MODE_AND_NO_REPL_TABLES
|
||||
delete my_tx_table.*, performance_schema.setup_actors.*
|
||||
@ -157,7 +157,7 @@ delete my_tx_table.*, performance_schema.setup_actors.*
|
||||
or performance_schema.setup_actors.role='FOO';
|
||||
|
||||
insert into performance_schema.setup_actors
|
||||
values ('BAR', 'BAR', 'BAR');
|
||||
values ('BAR', 'BAR', 'BAR', 'YES', 'YES');
|
||||
|
||||
--error 0, ER_BINLOG_STMT_MODE_AND_NO_REPL_TABLES
|
||||
delete my_non_tx_table.*, performance_schema.setup_actors.*
|
||||
@ -166,7 +166,7 @@ delete my_non_tx_table.*, performance_schema.setup_actors.*
|
||||
or performance_schema.setup_actors.role='BAR';
|
||||
|
||||
insert into performance_schema.setup_actors
|
||||
values ('BAZ', 'BAZ', 'BAZ');
|
||||
values ('BAZ', 'BAZ', 'BAZ', 'YES', 'YES');
|
||||
|
||||
--error 0, ER_BINLOG_STMT_MODE_AND_NO_REPL_TABLES
|
||||
delete my_bh_table.*, performance_schema.setup_actors.*
|
||||
@ -184,5 +184,5 @@ drop database my_replicated_db;
|
||||
# Restore performance_schema.setup_actors, damaged by this script
|
||||
|
||||
truncate table performance_schema.setup_actors;
|
||||
insert into performance_schema.setup_actors values ('%', '%', '%');
|
||||
insert into performance_schema.setup_actors values ('%', '%', '%', 'YES', 'YES');
|
||||
|
||||
|
@ -53,11 +53,14 @@
|
||||
|
||||
--disable_query_log
|
||||
|
||||
set @orig_sql_mode= @@sql_mode;
|
||||
set sql_mode= (select replace(@@sql_mode,'NO_AUTO_CREATE_USER',''));
|
||||
grant ALL on *.* to user1@localhost;
|
||||
grant ALL on *.* to user2@localhost;
|
||||
grant ALL on *.* to user3@localhost;
|
||||
grant ALL on *.* to user4@localhost;
|
||||
grant ALL on *.* to user5@localhost;
|
||||
set sql_mode= @orig_sql_mode;
|
||||
|
||||
flush privileges;
|
||||
|
||||
|
@ -96,7 +96,7 @@ CREATE TABLE dup_table (c char(4));
|
||||
--ERROR ER_TABLE_EXISTS_ERROR
|
||||
CREATE TABLE dup_table (c char(4));
|
||||
DROP TABLE dup_table;
|
||||
INSERT INTO t11 VALUES("MySQL");
|
||||
INSERT IGNORE INTO t11 VALUES("MySQL");
|
||||
|
||||
# -----------------------------------------------------------------------
|
||||
# Tests to show sub-statements for following statements are not
|
||||
|
@ -36,6 +36,12 @@ drop prepare dump_statements_host;
|
||||
drop prepare dump_statements_history;
|
||||
drop prepare dump_statements_global;
|
||||
|
||||
drop prepare dump_transactions_account;
|
||||
drop prepare dump_transactions_user;
|
||||
drop prepare dump_transactions_host;
|
||||
drop prepare dump_transactions_history;
|
||||
drop prepare dump_transactions_global;
|
||||
|
||||
drop prepare dump_users;
|
||||
drop prepare dump_hosts;
|
||||
drop prepare dump_accounts;
|
||||
@ -49,6 +55,7 @@ insert into performance_schema.setup_actors
|
||||
select * from test.setup_actors;
|
||||
drop table test.setup_actors;
|
||||
drop table test.t1;
|
||||
drop function test.f;
|
||||
|
||||
update performance_schema.threads set instrumented='YES';
|
||||
update performance_schema.setup_instruments set enabled='YES', timed='YES';
|
||||
|
@ -21,6 +21,11 @@ execute dump_statements_user;
|
||||
execute dump_statements_host;
|
||||
execute dump_statements_global;
|
||||
execute dump_statements_history;
|
||||
execute dump_transactions_account;
|
||||
execute dump_transactions_user;
|
||||
execute dump_transactions_host;
|
||||
execute dump_transactions_global;
|
||||
execute dump_transactions_history;
|
||||
execute dump_accounts;
|
||||
execute dump_users;
|
||||
execute dump_hosts;
|
||||
@ -33,7 +38,7 @@ execute dump_hosts;
|
||||
# The main thread does not count for BY_ACCOUNT / BY_HOST.
|
||||
# The user thread does count for BY_ACCOUNT, BY_HOST
|
||||
#
|
||||
# Each get_lock() causes 1 wait/synch/mutex/sql/LOCK_user_locks
|
||||
# Each uuid_short() causes 1 wait/synch/mutex/sql/LOCK_uuid_generator
|
||||
#
|
||||
# To avoid noise from main, the background threads are disabled.
|
||||
|
||||
@ -66,15 +71,23 @@ execute dump_statements_user;
|
||||
execute dump_statements_host;
|
||||
execute dump_statements_global;
|
||||
execute dump_statements_history;
|
||||
execute dump_transactions_account;
|
||||
execute dump_transactions_user;
|
||||
execute dump_transactions_host;
|
||||
execute dump_transactions_global;
|
||||
execute dump_transactions_history;
|
||||
execute dump_accounts;
|
||||
execute dump_users;
|
||||
execute dump_hosts;
|
||||
|
||||
--connection con1
|
||||
|
||||
select get_lock("marker", 10);
|
||||
select release_lock("marker");
|
||||
select uuid_short() <> 1;
|
||||
select uuid_short() <> 1;
|
||||
start transaction;
|
||||
insert into test.t1 values ("marker");
|
||||
commit;
|
||||
select test.f(10,20);
|
||||
|
||||
echo "================== con1 marker ==================";
|
||||
|
||||
@ -103,6 +116,11 @@ execute dump_statements_user;
|
||||
execute dump_statements_host;
|
||||
execute dump_statements_global;
|
||||
execute dump_statements_history;
|
||||
execute dump_transactions_account;
|
||||
execute dump_transactions_user;
|
||||
execute dump_transactions_host;
|
||||
execute dump_transactions_global;
|
||||
execute dump_transactions_history;
|
||||
execute dump_accounts;
|
||||
execute dump_users;
|
||||
execute dump_hosts;
|
||||
@ -140,15 +158,23 @@ execute dump_statements_user;
|
||||
execute dump_statements_host;
|
||||
execute dump_statements_global;
|
||||
execute dump_statements_history;
|
||||
execute dump_transactions_account;
|
||||
execute dump_transactions_user;
|
||||
execute dump_transactions_host;
|
||||
execute dump_transactions_global;
|
||||
execute dump_transactions_history;
|
||||
execute dump_accounts;
|
||||
execute dump_users;
|
||||
execute dump_hosts;
|
||||
|
||||
--connection con2
|
||||
|
||||
select get_lock("marker", 10);
|
||||
select release_lock("marker");
|
||||
select uuid_short() <> 1;
|
||||
select uuid_short() <> 1;
|
||||
start transaction;
|
||||
insert into test.t1 values ("marker");
|
||||
commit;
|
||||
select test.f(10,20);
|
||||
|
||||
echo "================== con2 marker ==================";
|
||||
|
||||
@ -177,6 +203,11 @@ execute dump_statements_user;
|
||||
execute dump_statements_host;
|
||||
execute dump_statements_global;
|
||||
execute dump_statements_history;
|
||||
execute dump_transactions_account;
|
||||
execute dump_transactions_user;
|
||||
execute dump_transactions_host;
|
||||
execute dump_transactions_global;
|
||||
execute dump_transactions_history;
|
||||
execute dump_accounts;
|
||||
execute dump_users;
|
||||
execute dump_hosts;
|
||||
@ -210,15 +241,23 @@ execute dump_statements_user;
|
||||
execute dump_statements_host;
|
||||
execute dump_statements_global;
|
||||
execute dump_statements_history;
|
||||
execute dump_transactions_account;
|
||||
execute dump_transactions_user;
|
||||
execute dump_transactions_host;
|
||||
execute dump_transactions_global;
|
||||
execute dump_transactions_history;
|
||||
execute dump_accounts;
|
||||
execute dump_users;
|
||||
execute dump_hosts;
|
||||
|
||||
--connection con3
|
||||
|
||||
select get_lock("marker", 10);
|
||||
select release_lock("marker");
|
||||
select uuid_short() <> 1;
|
||||
select uuid_short() <> 1;
|
||||
start transaction;
|
||||
insert into test.t1 values ("marker");
|
||||
commit;
|
||||
select test.f(10,20);
|
||||
|
||||
echo "================== con3 marker ==================";
|
||||
|
||||
@ -247,6 +286,11 @@ execute dump_statements_user;
|
||||
execute dump_statements_host;
|
||||
execute dump_statements_global;
|
||||
execute dump_statements_history;
|
||||
execute dump_transactions_account;
|
||||
execute dump_transactions_user;
|
||||
execute dump_transactions_host;
|
||||
execute dump_transactions_global;
|
||||
execute dump_transactions_history;
|
||||
execute dump_accounts;
|
||||
execute dump_users;
|
||||
execute dump_hosts;
|
||||
@ -280,15 +324,23 @@ execute dump_statements_user;
|
||||
execute dump_statements_host;
|
||||
execute dump_statements_global;
|
||||
execute dump_statements_history;
|
||||
execute dump_transactions_account;
|
||||
execute dump_transactions_user;
|
||||
execute dump_transactions_host;
|
||||
execute dump_transactions_global;
|
||||
execute dump_transactions_history;
|
||||
execute dump_accounts;
|
||||
execute dump_users;
|
||||
execute dump_hosts;
|
||||
|
||||
--connection con4
|
||||
|
||||
select get_lock("marker", 10);
|
||||
select release_lock("marker");
|
||||
select uuid_short() <> 1;
|
||||
select uuid_short() <> 1;
|
||||
start transaction;
|
||||
insert into test.t1 values ("marker");
|
||||
commit;
|
||||
select test.f(10,20);
|
||||
|
||||
echo "================== con4 marker ==================";
|
||||
|
||||
@ -317,6 +369,11 @@ execute dump_statements_user;
|
||||
execute dump_statements_host;
|
||||
execute dump_statements_global;
|
||||
execute dump_statements_history;
|
||||
execute dump_transactions_account;
|
||||
execute dump_transactions_user;
|
||||
execute dump_transactions_host;
|
||||
execute dump_transactions_global;
|
||||
execute dump_transactions_history;
|
||||
execute dump_accounts;
|
||||
execute dump_users;
|
||||
execute dump_hosts;
|
||||
@ -350,6 +407,11 @@ execute dump_statements_user;
|
||||
execute dump_statements_host;
|
||||
execute dump_statements_global;
|
||||
execute dump_statements_history;
|
||||
execute dump_transactions_account;
|
||||
execute dump_transactions_user;
|
||||
execute dump_transactions_host;
|
||||
execute dump_transactions_global;
|
||||
execute dump_transactions_history;
|
||||
execute dump_accounts;
|
||||
execute dump_users;
|
||||
execute dump_hosts;
|
||||
@ -383,6 +445,11 @@ execute dump_statements_user;
|
||||
execute dump_statements_host;
|
||||
execute dump_statements_global;
|
||||
execute dump_statements_history;
|
||||
execute dump_transactions_account;
|
||||
execute dump_transactions_user;
|
||||
execute dump_transactions_host;
|
||||
execute dump_transactions_global;
|
||||
execute dump_transactions_history;
|
||||
execute dump_accounts;
|
||||
execute dump_users;
|
||||
execute dump_hosts;
|
||||
@ -416,6 +483,11 @@ execute dump_statements_user;
|
||||
execute dump_statements_host;
|
||||
execute dump_statements_global;
|
||||
execute dump_statements_history;
|
||||
execute dump_transactions_account;
|
||||
execute dump_transactions_user;
|
||||
execute dump_transactions_host;
|
||||
execute dump_transactions_global;
|
||||
execute dump_transactions_history;
|
||||
execute dump_accounts;
|
||||
execute dump_users;
|
||||
execute dump_hosts;
|
||||
@ -449,6 +521,11 @@ execute dump_statements_user;
|
||||
execute dump_statements_host;
|
||||
execute dump_statements_global;
|
||||
execute dump_statements_history;
|
||||
execute dump_transactions_account;
|
||||
execute dump_transactions_user;
|
||||
execute dump_transactions_host;
|
||||
execute dump_transactions_global;
|
||||
execute dump_transactions_history;
|
||||
execute dump_accounts;
|
||||
execute dump_users;
|
||||
execute dump_hosts;
|
||||
@ -476,6 +553,11 @@ execute dump_statements_user;
|
||||
execute dump_statements_host;
|
||||
execute dump_statements_global;
|
||||
execute dump_statements_history;
|
||||
execute dump_transactions_account;
|
||||
execute dump_transactions_user;
|
||||
execute dump_transactions_host;
|
||||
execute dump_transactions_global;
|
||||
execute dump_transactions_history;
|
||||
execute dump_accounts;
|
||||
execute dump_users;
|
||||
execute dump_hosts;
|
||||
@ -501,6 +583,11 @@ execute dump_statements_user;
|
||||
execute dump_statements_host;
|
||||
execute dump_statements_global;
|
||||
execute dump_statements_history;
|
||||
execute dump_transactions_account;
|
||||
execute dump_transactions_user;
|
||||
execute dump_transactions_host;
|
||||
execute dump_transactions_global;
|
||||
execute dump_transactions_history;
|
||||
execute dump_accounts;
|
||||
execute dump_users;
|
||||
execute dump_hosts;
|
||||
@ -526,6 +613,11 @@ execute dump_statements_user;
|
||||
execute dump_statements_host;
|
||||
execute dump_statements_global;
|
||||
execute dump_statements_history;
|
||||
execute dump_transactions_account;
|
||||
execute dump_transactions_user;
|
||||
execute dump_transactions_host;
|
||||
execute dump_transactions_global;
|
||||
execute dump_transactions_history;
|
||||
execute dump_accounts;
|
||||
execute dump_users;
|
||||
execute dump_hosts;
|
||||
@ -551,6 +643,11 @@ execute dump_statements_user;
|
||||
execute dump_statements_host;
|
||||
execute dump_statements_global;
|
||||
execute dump_statements_history;
|
||||
execute dump_transactions_account;
|
||||
execute dump_transactions_user;
|
||||
execute dump_transactions_host;
|
||||
execute dump_transactions_global;
|
||||
execute dump_transactions_history;
|
||||
execute dump_accounts;
|
||||
execute dump_users;
|
||||
execute dump_hosts;
|
||||
@ -576,6 +673,11 @@ execute dump_statements_user;
|
||||
execute dump_statements_host;
|
||||
execute dump_statements_global;
|
||||
execute dump_statements_history;
|
||||
execute dump_transactions_account;
|
||||
execute dump_transactions_user;
|
||||
execute dump_transactions_host;
|
||||
execute dump_transactions_global;
|
||||
execute dump_transactions_history;
|
||||
execute dump_accounts;
|
||||
execute dump_users;
|
||||
execute dump_hosts;
|
||||
@ -601,6 +703,11 @@ execute dump_statements_user;
|
||||
execute dump_statements_host;
|
||||
execute dump_statements_global;
|
||||
execute dump_statements_history;
|
||||
execute dump_transactions_account;
|
||||
execute dump_transactions_user;
|
||||
execute dump_transactions_host;
|
||||
execute dump_transactions_global;
|
||||
execute dump_transactions_history;
|
||||
execute dump_accounts;
|
||||
execute dump_users;
|
||||
execute dump_hosts;
|
||||
@ -626,6 +733,11 @@ execute dump_statements_user;
|
||||
execute dump_statements_host;
|
||||
execute dump_statements_global;
|
||||
execute dump_statements_history;
|
||||
execute dump_transactions_account;
|
||||
execute dump_transactions_user;
|
||||
execute dump_transactions_host;
|
||||
execute dump_transactions_global;
|
||||
execute dump_transactions_history;
|
||||
execute dump_accounts;
|
||||
execute dump_users;
|
||||
execute dump_hosts;
|
||||
@ -651,6 +763,11 @@ execute dump_statements_user;
|
||||
execute dump_statements_host;
|
||||
execute dump_statements_global;
|
||||
execute dump_statements_history;
|
||||
execute dump_transactions_account;
|
||||
execute dump_transactions_user;
|
||||
execute dump_transactions_host;
|
||||
execute dump_transactions_global;
|
||||
execute dump_transactions_history;
|
||||
execute dump_accounts;
|
||||
execute dump_users;
|
||||
execute dump_hosts;
|
||||
@ -676,6 +793,11 @@ execute dump_statements_user;
|
||||
execute dump_statements_host;
|
||||
execute dump_statements_global;
|
||||
execute dump_statements_history;
|
||||
execute dump_transactions_account;
|
||||
execute dump_transactions_user;
|
||||
execute dump_transactions_host;
|
||||
execute dump_transactions_global;
|
||||
execute dump_transactions_history;
|
||||
execute dump_accounts;
|
||||
execute dump_users;
|
||||
execute dump_hosts;
|
||||
@ -701,6 +823,11 @@ execute dump_statements_user;
|
||||
execute dump_statements_host;
|
||||
execute dump_statements_global;
|
||||
execute dump_statements_history;
|
||||
execute dump_transactions_account;
|
||||
execute dump_transactions_user;
|
||||
execute dump_transactions_host;
|
||||
execute dump_transactions_global;
|
||||
execute dump_transactions_history;
|
||||
execute dump_accounts;
|
||||
execute dump_users;
|
||||
execute dump_hosts;
|
||||
@ -726,6 +853,11 @@ execute dump_statements_user;
|
||||
execute dump_statements_host;
|
||||
execute dump_statements_global;
|
||||
execute dump_statements_history;
|
||||
execute dump_transactions_account;
|
||||
execute dump_transactions_user;
|
||||
execute dump_transactions_host;
|
||||
execute dump_transactions_global;
|
||||
execute dump_transactions_history;
|
||||
execute dump_accounts;
|
||||
execute dump_users;
|
||||
execute dump_hosts;
|
||||
@ -751,6 +883,11 @@ execute dump_statements_user;
|
||||
execute dump_statements_host;
|
||||
execute dump_statements_global;
|
||||
execute dump_statements_history;
|
||||
execute dump_transactions_account;
|
||||
execute dump_transactions_user;
|
||||
execute dump_transactions_host;
|
||||
execute dump_transactions_global;
|
||||
execute dump_transactions_history;
|
||||
execute dump_accounts;
|
||||
execute dump_users;
|
||||
execute dump_hosts;
|
||||
@ -776,6 +913,11 @@ execute dump_statements_user;
|
||||
execute dump_statements_host;
|
||||
execute dump_statements_global;
|
||||
execute dump_statements_history;
|
||||
execute dump_transactions_account;
|
||||
execute dump_transactions_user;
|
||||
execute dump_transactions_host;
|
||||
execute dump_transactions_global;
|
||||
execute dump_transactions_history;
|
||||
execute dump_accounts;
|
||||
execute dump_users;
|
||||
execute dump_hosts;
|
||||
@ -801,6 +943,11 @@ execute dump_statements_user;
|
||||
execute dump_statements_host;
|
||||
execute dump_statements_global;
|
||||
execute dump_statements_history;
|
||||
execute dump_transactions_account;
|
||||
execute dump_transactions_user;
|
||||
execute dump_transactions_host;
|
||||
execute dump_transactions_global;
|
||||
execute dump_transactions_history;
|
||||
execute dump_accounts;
|
||||
execute dump_users;
|
||||
execute dump_hosts;
|
||||
@ -826,13 +973,18 @@ execute dump_statements_user;
|
||||
execute dump_statements_host;
|
||||
execute dump_statements_global;
|
||||
execute dump_statements_history;
|
||||
execute dump_transactions_account;
|
||||
execute dump_transactions_user;
|
||||
execute dump_transactions_host;
|
||||
execute dump_transactions_global;
|
||||
execute dump_transactions_history;
|
||||
execute dump_accounts;
|
||||
execute dump_users;
|
||||
execute dump_hosts;
|
||||
|
||||
truncate performance_schema.accounts;
|
||||
truncate performance_schema.events_transactions_summary_by_thread_by_event_name;
|
||||
|
||||
echo "================== ACCOUNTS truncated ==================";
|
||||
echo "================== TRANSACTIONS_BY_THREAD truncated ==================";
|
||||
|
||||
echo "================== Step 29 ==================";
|
||||
call dump_thread();
|
||||
@ -851,13 +1003,18 @@ execute dump_statements_user;
|
||||
execute dump_statements_host;
|
||||
execute dump_statements_global;
|
||||
execute dump_statements_history;
|
||||
execute dump_transactions_account;
|
||||
execute dump_transactions_user;
|
||||
execute dump_transactions_host;
|
||||
execute dump_transactions_global;
|
||||
execute dump_transactions_history;
|
||||
execute dump_accounts;
|
||||
execute dump_users;
|
||||
execute dump_hosts;
|
||||
|
||||
truncate performance_schema.users;
|
||||
truncate performance_schema.events_transactions_summary_by_account_by_event_name;
|
||||
|
||||
echo "================== USERS truncated ==================";
|
||||
echo "================== TRANSACTIONS_BY_ACCOUNT truncated ==================";
|
||||
|
||||
echo "================== Step 30 ==================";
|
||||
call dump_thread();
|
||||
@ -876,13 +1033,18 @@ execute dump_statements_user;
|
||||
execute dump_statements_host;
|
||||
execute dump_statements_global;
|
||||
execute dump_statements_history;
|
||||
execute dump_transactions_account;
|
||||
execute dump_transactions_user;
|
||||
execute dump_transactions_host;
|
||||
execute dump_transactions_global;
|
||||
execute dump_transactions_history;
|
||||
execute dump_accounts;
|
||||
execute dump_users;
|
||||
execute dump_hosts;
|
||||
|
||||
truncate performance_schema.hosts;
|
||||
truncate performance_schema.events_transactions_summary_by_user_by_event_name;
|
||||
|
||||
echo "================== HOSTS truncated ==================";
|
||||
echo "================== TRANSACTIONS_BY_USER truncated ==================";
|
||||
|
||||
echo "================== Step 31 ==================";
|
||||
call dump_thread();
|
||||
@ -901,6 +1063,161 @@ execute dump_statements_user;
|
||||
execute dump_statements_host;
|
||||
execute dump_statements_global;
|
||||
execute dump_statements_history;
|
||||
execute dump_transactions_account;
|
||||
execute dump_transactions_user;
|
||||
execute dump_transactions_host;
|
||||
execute dump_transactions_global;
|
||||
execute dump_transactions_history;
|
||||
execute dump_accounts;
|
||||
execute dump_users;
|
||||
execute dump_hosts;
|
||||
|
||||
truncate performance_schema.events_transactions_summary_by_host_by_event_name;
|
||||
|
||||
echo "================== TRANSACTIONS_BY_HOST truncated ==================";
|
||||
|
||||
echo "================== Step 32 ==================";
|
||||
call dump_thread();
|
||||
execute dump_waits_account;
|
||||
execute dump_waits_user;
|
||||
execute dump_waits_host;
|
||||
execute dump_waits_global;
|
||||
execute dump_waits_history;
|
||||
execute dump_stages_account;
|
||||
execute dump_stages_user;
|
||||
execute dump_stages_host;
|
||||
execute dump_stages_global;
|
||||
execute dump_stages_history;
|
||||
execute dump_statements_account;
|
||||
execute dump_statements_user;
|
||||
execute dump_statements_host;
|
||||
execute dump_statements_global;
|
||||
execute dump_statements_history;
|
||||
execute dump_transactions_account;
|
||||
execute dump_transactions_user;
|
||||
execute dump_transactions_host;
|
||||
execute dump_transactions_global;
|
||||
execute dump_transactions_history;
|
||||
execute dump_accounts;
|
||||
execute dump_users;
|
||||
execute dump_hosts;
|
||||
|
||||
truncate performance_schema.events_transactions_summary_global_by_event_name;
|
||||
|
||||
echo "================== TRANSACTIONS_GLOBAL truncated ==================";
|
||||
|
||||
echo "================== Step 33 ==================";
|
||||
call dump_thread();
|
||||
execute dump_waits_account;
|
||||
execute dump_waits_user;
|
||||
execute dump_waits_host;
|
||||
execute dump_waits_global;
|
||||
execute dump_waits_history;
|
||||
execute dump_stages_account;
|
||||
execute dump_stages_user;
|
||||
execute dump_stages_host;
|
||||
execute dump_stages_global;
|
||||
execute dump_stages_history;
|
||||
execute dump_statements_account;
|
||||
execute dump_statements_user;
|
||||
execute dump_statements_host;
|
||||
execute dump_statements_global;
|
||||
execute dump_statements_history;
|
||||
execute dump_transactions_account;
|
||||
execute dump_transactions_user;
|
||||
execute dump_transactions_host;
|
||||
execute dump_transactions_global;
|
||||
execute dump_transactions_history;
|
||||
execute dump_accounts;
|
||||
execute dump_users;
|
||||
execute dump_hosts;
|
||||
|
||||
truncate performance_schema.accounts;
|
||||
|
||||
echo "================== ACCOUNTS truncated ==================";
|
||||
|
||||
echo "================== Step 34 ==================";
|
||||
call dump_thread();
|
||||
execute dump_waits_account;
|
||||
execute dump_waits_user;
|
||||
execute dump_waits_host;
|
||||
execute dump_waits_global;
|
||||
execute dump_waits_history;
|
||||
execute dump_stages_account;
|
||||
execute dump_stages_user;
|
||||
execute dump_stages_host;
|
||||
execute dump_stages_global;
|
||||
execute dump_stages_history;
|
||||
execute dump_statements_account;
|
||||
execute dump_statements_user;
|
||||
execute dump_statements_host;
|
||||
execute dump_statements_global;
|
||||
execute dump_statements_history;
|
||||
execute dump_transactions_account;
|
||||
execute dump_transactions_user;
|
||||
execute dump_transactions_host;
|
||||
execute dump_transactions_global;
|
||||
execute dump_transactions_history;
|
||||
execute dump_accounts;
|
||||
execute dump_users;
|
||||
execute dump_hosts;
|
||||
|
||||
truncate performance_schema.users;
|
||||
|
||||
echo "================== USERS truncated ==================";
|
||||
|
||||
echo "================== Step 35 ==================";
|
||||
call dump_thread();
|
||||
execute dump_waits_account;
|
||||
execute dump_waits_user;
|
||||
execute dump_waits_host;
|
||||
execute dump_waits_global;
|
||||
execute dump_waits_history;
|
||||
execute dump_stages_account;
|
||||
execute dump_stages_user;
|
||||
execute dump_stages_host;
|
||||
execute dump_stages_global;
|
||||
execute dump_stages_history;
|
||||
execute dump_statements_account;
|
||||
execute dump_statements_user;
|
||||
execute dump_statements_host;
|
||||
execute dump_statements_global;
|
||||
execute dump_statements_history;
|
||||
execute dump_transactions_account;
|
||||
execute dump_transactions_user;
|
||||
execute dump_transactions_host;
|
||||
execute dump_transactions_global;
|
||||
execute dump_transactions_history;
|
||||
execute dump_accounts;
|
||||
execute dump_users;
|
||||
execute dump_hosts;
|
||||
|
||||
truncate performance_schema.hosts;
|
||||
|
||||
echo "================== HOSTS truncated ==================";
|
||||
|
||||
echo "================== Step 36 ==================";
|
||||
call dump_thread();
|
||||
execute dump_waits_account;
|
||||
execute dump_waits_user;
|
||||
execute dump_waits_host;
|
||||
execute dump_waits_global;
|
||||
execute dump_waits_history;
|
||||
execute dump_stages_account;
|
||||
execute dump_stages_user;
|
||||
execute dump_stages_host;
|
||||
execute dump_stages_global;
|
||||
execute dump_stages_history;
|
||||
execute dump_statements_account;
|
||||
execute dump_statements_user;
|
||||
execute dump_statements_host;
|
||||
execute dump_statements_global;
|
||||
execute dump_statements_history;
|
||||
execute dump_transactions_account;
|
||||
execute dump_transactions_user;
|
||||
execute dump_transactions_host;
|
||||
execute dump_transactions_global;
|
||||
execute dump_transactions_history;
|
||||
execute dump_accounts;
|
||||
execute dump_users;
|
||||
execute dump_hosts;
|
||||
|
@ -19,11 +19,16 @@
|
||||
# - events_statements_summary_by_account_by_event_name
|
||||
# - events_statements_summary_by_user_by_event_name
|
||||
# - events_statements_summary_by_host_by_event_name
|
||||
# - events_transactions_summary_by_thread_by_event_name
|
||||
# - events_transactions_summary_by_account_by_event_name
|
||||
# - events_transactions_summary_by_user_by_event_name
|
||||
# - events_transactions_summary_by_host_by_event_name
|
||||
#
|
||||
# Globally:
|
||||
# - events_waits_summary_global_by_event_name
|
||||
# - events_stages_summary_global_by_event_name
|
||||
# - events_statements_summary_global_by_event_name
|
||||
# - events_transactions_summary_global_by_event_name
|
||||
#
|
||||
# The tests are written with the following helpers:
|
||||
# - include/event_aggregate_setup.inc
|
||||
@ -67,10 +72,13 @@
|
||||
|
||||
--disable_query_log
|
||||
|
||||
set @orig_sql_mode= @@sql_mode;
|
||||
set sql_mode= (select replace(@@sql_mode,'NO_AUTO_CREATE_USER',''));
|
||||
grant ALL on *.* to user1@localhost;
|
||||
grant ALL on *.* to user2@localhost;
|
||||
grant ALL on *.* to user3@localhost;
|
||||
grant ALL on *.* to user4@localhost;
|
||||
set sql_mode= @orig_sql_mode;
|
||||
|
||||
flush privileges;
|
||||
|
||||
@ -87,6 +95,8 @@ drop table if exists test.t1;
|
||||
--enable_warnings
|
||||
|
||||
create table test.t1(a varchar(64));
|
||||
create function test.f(a int, b int) returns int
|
||||
return a+b;
|
||||
|
||||
create table test.setup_actors as
|
||||
select * from performance_schema.setup_actors;
|
||||
@ -109,13 +119,14 @@ update performance_schema.setup_instruments set enabled='NO', timed='NO';
|
||||
|
||||
update performance_schema.setup_instruments set enabled='YES', timed='YES'
|
||||
where name in ('wait/synch/mutex/sql/LOCK_connection_count',
|
||||
'wait/synch/mutex/sql/LOCK_user_locks',
|
||||
'wait/synch/mutex/sql/LOCK_uuid_generator',
|
||||
'wait/synch/rwlock/sql/LOCK_grant',
|
||||
'wait/io/file/sql/query_log',
|
||||
'idle');
|
||||
|
||||
update performance_schema.setup_instruments set enabled='YES', timed='YES'
|
||||
where name in ('stage/sql/init',
|
||||
where name in ('stage/sql/starting',
|
||||
'stage/sql/init',
|
||||
'stage/sql/checking permissions',
|
||||
'stage/sql/Opening tables',
|
||||
'stage/sql/closing tables');
|
||||
@ -126,7 +137,11 @@ update performance_schema.setup_instruments set enabled='YES', timed='YES'
|
||||
'statement/abstract/new_packet',
|
||||
'statement/abstract/Query',
|
||||
'statement/com/Quit',
|
||||
'statement/com/error');
|
||||
'statement/com/error',
|
||||
'statement/sp/freturn');
|
||||
|
||||
update performance_schema.setup_instruments set enabled='YES', timed='YES'
|
||||
where name in ('transaction');
|
||||
|
||||
# Start from a known clean state, to avoid noise from previous tests
|
||||
flush tables;
|
||||
@ -152,6 +167,13 @@ truncate performance_schema.events_statements_summary_by_host_by_event_name;
|
||||
truncate performance_schema.events_statements_summary_global_by_event_name;
|
||||
truncate performance_schema.events_statements_history_long;
|
||||
|
||||
truncate performance_schema.events_transactions_summary_by_thread_by_event_name;
|
||||
truncate performance_schema.events_transactions_summary_by_account_by_event_name;
|
||||
truncate performance_schema.events_transactions_summary_by_user_by_event_name;
|
||||
truncate performance_schema.events_transactions_summary_by_host_by_event_name;
|
||||
truncate performance_schema.events_transactions_summary_global_by_event_name;
|
||||
truncate performance_schema.events_transactions_history_long;
|
||||
|
||||
--disable_warnings
|
||||
drop procedure if exists dump_thread;
|
||||
drop procedure if exists dump_one_thread;
|
||||
@ -179,7 +201,7 @@ begin
|
||||
select username, event_name, count_star
|
||||
from performance_schema.events_waits_summary_by_thread_by_event_name
|
||||
where event_name in ('wait/synch/mutex/sql/LOCK_connection_count',
|
||||
'wait/synch/mutex/sql/LOCK_user_locks',
|
||||
'wait/synch/mutex/sql/LOCK_uuid_generator',
|
||||
'wait/synch/rwlock/sql/LOCK_grant',
|
||||
'wait/io/file/sql/query_log')
|
||||
and thread_id = my_thread_id
|
||||
@ -197,7 +219,7 @@ prepare dump_waits_account from
|
||||
from performance_schema.events_waits_summary_by_account_by_event_name
|
||||
where user like \'user%\'
|
||||
and event_name in ('wait/synch/mutex/sql/LOCK_connection_count',
|
||||
'wait/synch/mutex/sql/LOCK_user_locks',
|
||||
'wait/synch/mutex/sql/LOCK_uuid_generator',
|
||||
'wait/synch/rwlock/sql/LOCK_grant',
|
||||
'wait/io/file/sql/query_log')
|
||||
order by user, host, event_name;";
|
||||
@ -207,7 +229,7 @@ prepare dump_waits_user from
|
||||
from performance_schema.events_waits_summary_by_user_by_event_name
|
||||
where user like \'user%\'
|
||||
and event_name in ('wait/synch/mutex/sql/LOCK_connection_count',
|
||||
'wait/synch/mutex/sql/LOCK_user_locks',
|
||||
'wait/synch/mutex/sql/LOCK_uuid_generator',
|
||||
'wait/synch/rwlock/sql/LOCK_grant',
|
||||
'wait/io/file/sql/query_log')
|
||||
order by user, event_name;";
|
||||
@ -217,7 +239,7 @@ prepare dump_waits_host from
|
||||
from performance_schema.events_waits_summary_by_host_by_event_name
|
||||
where host=\'localhost\'
|
||||
and event_name in ('wait/synch/mutex/sql/LOCK_connection_count',
|
||||
'wait/synch/mutex/sql/LOCK_user_locks',
|
||||
'wait/synch/mutex/sql/LOCK_uuid_generator',
|
||||
'wait/synch/rwlock/sql/LOCK_grant',
|
||||
'wait/io/file/sql/query_log')
|
||||
order by host, event_name;";
|
||||
@ -226,7 +248,7 @@ prepare dump_waits_global from
|
||||
"select event_name, count_star
|
||||
from performance_schema.events_waits_summary_global_by_event_name
|
||||
where event_name in ('wait/synch/mutex/sql/LOCK_connection_count',
|
||||
'wait/synch/mutex/sql/LOCK_user_locks',
|
||||
'wait/synch/mutex/sql/LOCK_uuid_generator',
|
||||
'wait/synch/rwlock/sql/LOCK_grant',
|
||||
'wait/io/file/sql/query_log')
|
||||
order by event_name;";
|
||||
@ -235,7 +257,7 @@ prepare dump_waits_history from
|
||||
"select event_name, count(event_name)
|
||||
from performance_schema.events_waits_history_long
|
||||
where event_name in ('wait/synch/mutex/sql/LOCK_connection_count',
|
||||
'wait/synch/mutex/sql/LOCK_user_locks',
|
||||
'wait/synch/mutex/sql/LOCK_uuid_generator',
|
||||
'wait/synch/rwlock/sql/LOCK_grant',
|
||||
'wait/io/file/sql/query_log')
|
||||
group by event_name order by event_name;";
|
||||
@ -244,7 +266,8 @@ prepare dump_stages_account from
|
||||
"select user, host, event_name, count_star
|
||||
from performance_schema.events_stages_summary_by_account_by_event_name
|
||||
where user like \'user%\'
|
||||
and event_name in ('stage/sql/init',
|
||||
and event_name in ('stage/sql/starting',
|
||||
'stage/sql/init',
|
||||
'stage/sql/checking permissions',
|
||||
'stage/sql/Opening tables',
|
||||
'stage/sql/closing tables')
|
||||
@ -254,7 +277,8 @@ prepare dump_stages_user from
|
||||
"select user, event_name, count_star
|
||||
from performance_schema.events_stages_summary_by_user_by_event_name
|
||||
where user like \'user%\'
|
||||
and event_name in ('stage/sql/init',
|
||||
and event_name in ('stage/sql/starting',
|
||||
'stage/sql/init',
|
||||
'stage/sql/checking permissions',
|
||||
'stage/sql/Opening tables',
|
||||
'stage/sql/closing tables')
|
||||
@ -264,7 +288,8 @@ prepare dump_stages_host from
|
||||
"select host, event_name, count_star
|
||||
from performance_schema.events_stages_summary_by_host_by_event_name
|
||||
where host=\'localhost\'
|
||||
and event_name in ('stage/sql/init',
|
||||
and event_name in ('stage/sql/starting',
|
||||
'stage/sql/init',
|
||||
'stage/sql/checking permissions',
|
||||
'stage/sql/Opening tables',
|
||||
'stage/sql/closing tables')
|
||||
@ -273,7 +298,8 @@ prepare dump_stages_host from
|
||||
prepare dump_stages_global from
|
||||
"select event_name, count_star
|
||||
from performance_schema.events_stages_summary_global_by_event_name
|
||||
where event_name in ('stage/sql/init',
|
||||
where event_name in ('stage/sql/starting',
|
||||
'stage/sql/init',
|
||||
'stage/sql/checking permissions',
|
||||
'stage/sql/Opening tables',
|
||||
'stage/sql/closing tables')
|
||||
@ -282,7 +308,8 @@ prepare dump_stages_global from
|
||||
prepare dump_stages_history from
|
||||
"select event_name, count(event_name)
|
||||
from performance_schema.events_stages_history_long
|
||||
where event_name in ('stage/sql/init',
|
||||
where event_name in ('stage/sql/starting',
|
||||
'stage/sql/init',
|
||||
'stage/sql/checking permissions',
|
||||
'stage/sql/Opening tables',
|
||||
'stage/sql/closing tables')
|
||||
@ -295,7 +322,8 @@ prepare dump_statements_account from
|
||||
and event_name in ('statement/sql/select',
|
||||
'statement/sql/insert',
|
||||
'statement/com/Quit',
|
||||
'statement/com/error')
|
||||
'statement/com/error',
|
||||
'statement/sp/freturn')
|
||||
order by user, host, event_name;";
|
||||
|
||||
prepare dump_statements_user from
|
||||
@ -305,7 +333,8 @@ prepare dump_statements_user from
|
||||
and event_name in ('statement/sql/select',
|
||||
'statement/sql/insert',
|
||||
'statement/com/Quit',
|
||||
'statement/com/error')
|
||||
'statement/com/error',
|
||||
'statement/sp/freturn')
|
||||
order by user, event_name;";
|
||||
|
||||
prepare dump_statements_host from
|
||||
@ -315,7 +344,8 @@ prepare dump_statements_host from
|
||||
and event_name in ('statement/sql/select',
|
||||
'statement/sql/insert',
|
||||
'statement/com/Quit',
|
||||
'statement/com/error')
|
||||
'statement/com/error',
|
||||
'statement/sp/freturn')
|
||||
order by host, event_name;";
|
||||
|
||||
prepare dump_statements_global from
|
||||
@ -324,7 +354,8 @@ prepare dump_statements_global from
|
||||
where event_name in ('statement/sql/select',
|
||||
'statement/sql/insert',
|
||||
'statement/com/Quit',
|
||||
'statement/com/error')
|
||||
'statement/com/error',
|
||||
'statement/sp/freturn')
|
||||
order by event_name;";
|
||||
|
||||
prepare dump_statements_history from
|
||||
@ -333,7 +364,41 @@ prepare dump_statements_history from
|
||||
where event_name in ('statement/sql/select',
|
||||
'statement/sql/insert',
|
||||
'statement/com/Quit',
|
||||
'statement/com/error')
|
||||
'statement/com/error',
|
||||
'statement/sp/freturn')
|
||||
group by event_name order by event_name;";
|
||||
|
||||
prepare dump_transactions_account from
|
||||
"select user, host, event_name, count_star
|
||||
from performance_schema.events_transactions_summary_by_account_by_event_name
|
||||
where user like \'user%\'
|
||||
and event_name in ('transaction')
|
||||
order by user, host, event_name;";
|
||||
|
||||
prepare dump_transactions_user from
|
||||
"select user, event_name, count_star
|
||||
from performance_schema.events_transactions_summary_by_user_by_event_name
|
||||
where user like \'user%\'
|
||||
and event_name in ('transaction')
|
||||
order by user, event_name;";
|
||||
|
||||
prepare dump_transactions_host from
|
||||
"select host, event_name, count_star
|
||||
from performance_schema.events_transactions_summary_by_host_by_event_name
|
||||
where host=\'localhost\'
|
||||
and event_name in ('transaction')
|
||||
order by host, event_name;";
|
||||
|
||||
prepare dump_transactions_global from
|
||||
"select event_name, count_star
|
||||
from performance_schema.events_transactions_summary_global_by_event_name
|
||||
where event_name in ('transaction')
|
||||
order by event_name;";
|
||||
|
||||
prepare dump_transactions_history from
|
||||
"select event_name, count(event_name)
|
||||
from performance_schema.events_transactions_history_long
|
||||
where event_name in ('transaction')
|
||||
group by event_name order by event_name;";
|
||||
|
||||
prepare dump_users from
|
||||
|
@ -0,0 +1,45 @@
|
||||
# Tests for the performance schema
|
||||
|
||||
# ===========================================
|
||||
# HELPER include/memory_aggregate_cleanup.inc
|
||||
# ===========================================
|
||||
|
||||
--disable_query_log
|
||||
revoke all privileges, grant option from user1@localhost;
|
||||
revoke all privileges, grant option from user2@localhost;
|
||||
revoke all privileges, grant option from user3@localhost;
|
||||
revoke all privileges, grant option from user4@localhost;
|
||||
drop user user1@localhost;
|
||||
drop user user2@localhost;
|
||||
drop user user3@localhost;
|
||||
drop user user4@localhost;
|
||||
flush privileges;
|
||||
|
||||
drop procedure dump_thread;
|
||||
drop procedure dump_one_thread;
|
||||
|
||||
drop prepare dump_memory_account;
|
||||
drop prepare dump_memory_user;
|
||||
drop prepare dump_memory_host;
|
||||
drop prepare dump_memory_global;
|
||||
|
||||
drop prepare dump_users;
|
||||
drop prepare dump_hosts;
|
||||
drop prepare dump_accounts;
|
||||
|
||||
truncate table performance_schema.accounts;
|
||||
truncate table performance_schema.users;
|
||||
truncate table performance_schema.hosts;
|
||||
|
||||
truncate table performance_schema.setup_actors;
|
||||
insert into performance_schema.setup_actors
|
||||
select * from test.setup_actors;
|
||||
drop table test.setup_actors;
|
||||
|
||||
set global query_cache_size=0;
|
||||
|
||||
update performance_schema.threads set instrumented='YES';
|
||||
update performance_schema.setup_instruments set enabled='YES', timed='YES';
|
||||
|
||||
--enable_query_log
|
||||
|
506
mysql-test/suite/perfschema/include/memory_aggregate_load.inc
Normal file
506
mysql-test/suite/perfschema/include/memory_aggregate_load.inc
Normal file
@ -0,0 +1,506 @@
|
||||
# Tests for the performance schema
|
||||
|
||||
# ========================================
|
||||
# HELPER include/memory_aggregate_load.inc
|
||||
# ========================================
|
||||
|
||||
echo "================== Step 1 ==================";
|
||||
--vertical_results
|
||||
call dump_thread();
|
||||
execute dump_memory_account;
|
||||
execute dump_memory_user;
|
||||
execute dump_memory_host;
|
||||
execute dump_memory_global;
|
||||
--horizontal_results
|
||||
execute dump_accounts;
|
||||
execute dump_users;
|
||||
execute dump_hosts;
|
||||
|
||||
# Notes about this test
|
||||
#
|
||||
# get_lock("marker") causes the following memory allocation:
|
||||
# memory/sql/User_level_lock, 1 malloc, size 16 (size 8 for 32-bit systems).
|
||||
# release_lock("marker") causes the following memory free:
|
||||
# memory/sql/User_level_lock, 1 free, size 16 (size 8 for 32-bit systems).
|
||||
#
|
||||
# To avoid noise from main, the background threads are disabled.
|
||||
|
||||
connect (con1, localhost, user1, , );
|
||||
|
||||
echo "================== con1 connected ==================";
|
||||
|
||||
--connection default
|
||||
|
||||
# Wait for the connect to complete
|
||||
let $wait_condition=
|
||||
select count(*) = 1 from performance_schema.threads
|
||||
where `TYPE`='FOREGROUND' and PROCESSLIST_USER= 'user1';
|
||||
--source include/wait_condition.inc
|
||||
|
||||
echo "================== Step 2 ==================";
|
||||
--vertical_results
|
||||
call dump_thread();
|
||||
execute dump_memory_account;
|
||||
execute dump_memory_user;
|
||||
execute dump_memory_host;
|
||||
execute dump_memory_global;
|
||||
--horizontal_results
|
||||
execute dump_accounts;
|
||||
execute dump_users;
|
||||
execute dump_hosts;
|
||||
|
||||
--connection con1
|
||||
|
||||
set GLOBAL query_cache_size=1000*1024;
|
||||
select get_lock("marker_1", 10);
|
||||
select release_lock("marker_1");
|
||||
set @v1 = repeat("a", 1000);
|
||||
set @v2 = repeat("b", 2000);
|
||||
set @v3 = repeat("c", 4000);
|
||||
|
||||
echo "================== con1 marker ==================";
|
||||
|
||||
--connection default
|
||||
|
||||
# Wait for the payload to complete
|
||||
let $wait_condition=
|
||||
select count(*) = 1 from performance_schema.events_waits_current
|
||||
where EVENT_NAME= 'idle';
|
||||
--source include/wait_condition.inc
|
||||
|
||||
echo "================== Step 3 ==================";
|
||||
--vertical_results
|
||||
call dump_thread();
|
||||
execute dump_memory_account;
|
||||
execute dump_memory_user;
|
||||
execute dump_memory_host;
|
||||
execute dump_memory_global;
|
||||
--horizontal_results
|
||||
execute dump_accounts;
|
||||
execute dump_users;
|
||||
execute dump_hosts;
|
||||
|
||||
# Debugging helpers
|
||||
# select * from performance_schema.events_waits_history_long;
|
||||
# select PROCESSLIST_USER, PROCESSLIST_HOST, INSTRUMENTED from performance_schema.threads;
|
||||
|
||||
connect (con2, localhost, user2, , );
|
||||
|
||||
echo "================== con2 connected ==================";
|
||||
|
||||
--connection default
|
||||
|
||||
# Wait for the connect to complete
|
||||
let $wait_condition=
|
||||
select count(*) = 1 from performance_schema.threads
|
||||
where `TYPE`='FOREGROUND' and PROCESSLIST_USER= 'user2';
|
||||
--source include/wait_condition.inc
|
||||
|
||||
echo "================== Step 4 ==================";
|
||||
--vertical_results
|
||||
call dump_thread();
|
||||
execute dump_memory_account;
|
||||
execute dump_memory_user;
|
||||
execute dump_memory_host;
|
||||
execute dump_memory_global;
|
||||
--horizontal_results
|
||||
execute dump_accounts;
|
||||
execute dump_users;
|
||||
execute dump_hosts;
|
||||
|
||||
--connection con2
|
||||
|
||||
set GLOBAL query_cache_size=2000*1024;
|
||||
select get_lock("marker_2", 10);
|
||||
select release_lock("marker_2");
|
||||
set @v1 = repeat("a", 1000);
|
||||
set @v2 = repeat("b", 2000);
|
||||
set @v3 = repeat("c", 4000);
|
||||
|
||||
echo "================== con2 marker ==================";
|
||||
|
||||
--connection default
|
||||
|
||||
# Wait for the payload to complete
|
||||
let $wait_condition=
|
||||
select count(*) = 2 from performance_schema.events_waits_current
|
||||
where EVENT_NAME= 'idle';
|
||||
--source include/wait_condition.inc
|
||||
|
||||
echo "================== Step 5 ==================";
|
||||
--vertical_results
|
||||
call dump_thread();
|
||||
execute dump_memory_account;
|
||||
execute dump_memory_user;
|
||||
execute dump_memory_host;
|
||||
execute dump_memory_global;
|
||||
--horizontal_results
|
||||
execute dump_accounts;
|
||||
execute dump_users;
|
||||
execute dump_hosts;
|
||||
|
||||
truncate table performance_schema.memory_summary_by_thread_by_event_name;
|
||||
|
||||
echo "================== MEMORY_BY_THREAD truncated ==================";
|
||||
|
||||
echo "================== Step 5b ==================";
|
||||
--vertical_results
|
||||
call dump_thread();
|
||||
execute dump_memory_account;
|
||||
execute dump_memory_user;
|
||||
execute dump_memory_host;
|
||||
execute dump_memory_global;
|
||||
--horizontal_results
|
||||
execute dump_accounts;
|
||||
execute dump_users;
|
||||
execute dump_hosts;
|
||||
|
||||
connect (con3, localhost, user3, , );
|
||||
|
||||
echo "================== con3 connected ==================";
|
||||
|
||||
--connection default
|
||||
|
||||
# Wait for the connect to complete
|
||||
let $wait_condition=
|
||||
select count(*) = 1 from performance_schema.threads
|
||||
where `TYPE`='FOREGROUND' and PROCESSLIST_USER= 'user3';
|
||||
--source include/wait_condition.inc
|
||||
|
||||
echo "================== Step 6 ==================";
|
||||
--vertical_results
|
||||
call dump_thread();
|
||||
execute dump_memory_account;
|
||||
execute dump_memory_user;
|
||||
execute dump_memory_host;
|
||||
execute dump_memory_global;
|
||||
--horizontal_results
|
||||
execute dump_accounts;
|
||||
execute dump_users;
|
||||
execute dump_hosts;
|
||||
|
||||
--connection con3
|
||||
|
||||
set GLOBAL query_cache_size=500*1024;
|
||||
select get_lock("marker_3", 10);
|
||||
select release_lock("marker_3");
|
||||
set @v1 = repeat("a", 1000);
|
||||
set @v2 = repeat("b", 2000);
|
||||
set @v3 = repeat("c", 4000);
|
||||
|
||||
echo "================== con3 marker ==================";
|
||||
|
||||
--connection default
|
||||
|
||||
# Wait for the payload to complete
|
||||
let $wait_condition=
|
||||
select count(*) = 3 from performance_schema.events_waits_current
|
||||
where EVENT_NAME= 'idle';
|
||||
--source include/wait_condition.inc
|
||||
|
||||
echo "================== Step 7 ==================";
|
||||
--vertical_results
|
||||
call dump_thread();
|
||||
execute dump_memory_account;
|
||||
execute dump_memory_user;
|
||||
execute dump_memory_host;
|
||||
execute dump_memory_global;
|
||||
--horizontal_results
|
||||
execute dump_accounts;
|
||||
execute dump_users;
|
||||
execute dump_hosts;
|
||||
|
||||
connect (con4, localhost, user4, , );
|
||||
connect (con5, localhost, user4, , );
|
||||
|
||||
echo "================== con4/con5 (both user4) connected ==================";
|
||||
|
||||
--connection default
|
||||
|
||||
# Wait for the connects to complete
|
||||
let $wait_condition=
|
||||
select count(*) = 2 from performance_schema.threads
|
||||
where `TYPE`='FOREGROUND' and PROCESSLIST_USER= 'user4';
|
||||
--source include/wait_condition.inc
|
||||
|
||||
echo "================== Step 8 ==================";
|
||||
--vertical_results
|
||||
call dump_thread();
|
||||
execute dump_memory_account;
|
||||
execute dump_memory_user;
|
||||
execute dump_memory_host;
|
||||
execute dump_memory_global;
|
||||
--horizontal_results
|
||||
execute dump_accounts;
|
||||
execute dump_users;
|
||||
execute dump_hosts;
|
||||
|
||||
--connection con4
|
||||
|
||||
set GLOBAL query_cache_size=4000*1024;
|
||||
select get_lock("marker_4", 10);
|
||||
select release_lock("marker_4");
|
||||
set @v1 = repeat("a", 1000);
|
||||
set @v2 = repeat("b", 2000);
|
||||
set @v3 = repeat("c", 4000);
|
||||
|
||||
--connection con5
|
||||
select get_lock("marker_5", 10);
|
||||
select release_lock("marker_5");
|
||||
set @v1 = repeat("a", 1000);
|
||||
set @v2 = repeat("b", 2000);
|
||||
set @v3 = repeat("c", 4000);
|
||||
|
||||
echo "================== con4/con5 marker ==================";
|
||||
|
||||
--connection default
|
||||
|
||||
# Wait for the payload to complete
|
||||
let $wait_condition=
|
||||
select count(*) = 5 from performance_schema.events_waits_current
|
||||
where EVENT_NAME= 'idle';
|
||||
--source include/wait_condition.inc
|
||||
|
||||
echo "================== Step 9 ==================";
|
||||
--vertical_results
|
||||
call dump_thread();
|
||||
execute dump_memory_account;
|
||||
execute dump_memory_user;
|
||||
execute dump_memory_host;
|
||||
execute dump_memory_global;
|
||||
--horizontal_results
|
||||
execute dump_accounts;
|
||||
execute dump_users;
|
||||
execute dump_hosts;
|
||||
|
||||
--disconnect con1
|
||||
--disconnect con5
|
||||
|
||||
--connection default
|
||||
|
||||
# Wait for the disconnects to complete
|
||||
let $wait_condition=
|
||||
select count(*) = 0 from performance_schema.threads
|
||||
where `TYPE`='FOREGROUND' and PROCESSLIST_USER= 'user1';
|
||||
--source include/wait_condition.inc
|
||||
let $wait_condition=
|
||||
select count(*) = 1 from performance_schema.threads
|
||||
where `TYPE`='FOREGROUND' and PROCESSLIST_USER= 'user4';
|
||||
--source include/wait_condition.inc
|
||||
|
||||
echo "================== con1/con5 disconnected ==================";
|
||||
|
||||
echo "================== Step 10 ==================";
|
||||
--vertical_results
|
||||
call dump_thread();
|
||||
execute dump_memory_account;
|
||||
execute dump_memory_user;
|
||||
execute dump_memory_host;
|
||||
execute dump_memory_global;
|
||||
--horizontal_results
|
||||
execute dump_accounts;
|
||||
execute dump_users;
|
||||
execute dump_hosts;
|
||||
|
||||
--disconnect con2
|
||||
|
||||
--connection default
|
||||
|
||||
# Wait for the disconnect to complete
|
||||
let $wait_condition=
|
||||
select count(*) = 0 from performance_schema.threads
|
||||
where `TYPE`='FOREGROUND' and PROCESSLIST_USER= 'user2';
|
||||
--source include/wait_condition.inc
|
||||
|
||||
echo "================== con2 disconnected ==================";
|
||||
|
||||
echo "================== Step 11 ==================";
|
||||
--vertical_results
|
||||
call dump_thread();
|
||||
execute dump_memory_account;
|
||||
execute dump_memory_user;
|
||||
execute dump_memory_host;
|
||||
execute dump_memory_global;
|
||||
--horizontal_results
|
||||
execute dump_accounts;
|
||||
execute dump_users;
|
||||
execute dump_hosts;
|
||||
|
||||
--disconnect con3
|
||||
|
||||
--connection default
|
||||
|
||||
# Wait for the disconnect to complete
|
||||
let $wait_condition=
|
||||
select count(*) = 0 from performance_schema.threads
|
||||
where `TYPE`='FOREGROUND' and PROCESSLIST_USER= 'user3';
|
||||
--source include/wait_condition.inc
|
||||
|
||||
echo "================== con3 disconnected ==================";
|
||||
|
||||
echo "================== Step 12 ==================";
|
||||
--vertical_results
|
||||
call dump_thread();
|
||||
execute dump_memory_account;
|
||||
execute dump_memory_user;
|
||||
execute dump_memory_host;
|
||||
execute dump_memory_global;
|
||||
--horizontal_results
|
||||
execute dump_accounts;
|
||||
execute dump_users;
|
||||
execute dump_hosts;
|
||||
|
||||
--disconnect con4
|
||||
|
||||
--connection default
|
||||
|
||||
# Wait for the disconnect to complete
|
||||
let $wait_condition=
|
||||
select count(*) = 0 from performance_schema.threads
|
||||
where `TYPE`='FOREGROUND' and PROCESSLIST_USER= 'user4';
|
||||
--source include/wait_condition.inc
|
||||
|
||||
echo "================== con4 disconnected ==================";
|
||||
|
||||
echo "================== Step 13 ==================";
|
||||
--vertical_results
|
||||
call dump_thread();
|
||||
execute dump_memory_account;
|
||||
execute dump_memory_user;
|
||||
execute dump_memory_host;
|
||||
execute dump_memory_global;
|
||||
--horizontal_results
|
||||
execute dump_accounts;
|
||||
execute dump_users;
|
||||
execute dump_hosts;
|
||||
|
||||
--connection default
|
||||
|
||||
truncate performance_schema.memory_summary_by_thread_by_event_name;
|
||||
|
||||
echo "================== MEMORY_BY_THREAD truncated ==================";
|
||||
|
||||
echo "================== Step 14 ==================";
|
||||
--vertical_results
|
||||
call dump_thread();
|
||||
execute dump_memory_account;
|
||||
execute dump_memory_user;
|
||||
execute dump_memory_host;
|
||||
execute dump_memory_global;
|
||||
--horizontal_results
|
||||
execute dump_accounts;
|
||||
execute dump_users;
|
||||
execute dump_hosts;
|
||||
|
||||
truncate performance_schema.memory_summary_by_account_by_event_name;
|
||||
|
||||
echo "================== MEMORY_BY_ACCOUNT truncated ==================";
|
||||
|
||||
echo "================== Step 15 ==================";
|
||||
--vertical_results
|
||||
call dump_thread();
|
||||
execute dump_memory_account;
|
||||
execute dump_memory_user;
|
||||
execute dump_memory_host;
|
||||
execute dump_memory_global;
|
||||
--horizontal_results
|
||||
execute dump_accounts;
|
||||
execute dump_users;
|
||||
execute dump_hosts;
|
||||
|
||||
truncate performance_schema.memory_summary_by_user_by_event_name;
|
||||
|
||||
echo "================== MEMORY_BY_USER truncated ==================";
|
||||
|
||||
echo "================== Step 16 ==================";
|
||||
--vertical_results
|
||||
call dump_thread();
|
||||
execute dump_memory_account;
|
||||
execute dump_memory_user;
|
||||
execute dump_memory_host;
|
||||
execute dump_memory_global;
|
||||
--horizontal_results
|
||||
execute dump_accounts;
|
||||
execute dump_users;
|
||||
execute dump_hosts;
|
||||
|
||||
truncate performance_schema.memory_summary_by_host_by_event_name;
|
||||
|
||||
echo "================== MEMORY_BY_HOST truncated ==================";
|
||||
|
||||
echo "================== Step 17 ==================";
|
||||
--vertical_results
|
||||
call dump_thread();
|
||||
execute dump_memory_account;
|
||||
execute dump_memory_user;
|
||||
execute dump_memory_host;
|
||||
execute dump_memory_global;
|
||||
--horizontal_results
|
||||
execute dump_accounts;
|
||||
execute dump_users;
|
||||
execute dump_hosts;
|
||||
|
||||
truncate performance_schema.memory_summary_global_by_event_name;
|
||||
|
||||
echo "================== MEMORY_GLOBAL truncated ==================";
|
||||
|
||||
echo "================== Step 18 ==================";
|
||||
--vertical_results
|
||||
call dump_thread();
|
||||
execute dump_memory_account;
|
||||
execute dump_memory_user;
|
||||
execute dump_memory_host;
|
||||
execute dump_memory_global;
|
||||
--horizontal_results
|
||||
execute dump_accounts;
|
||||
execute dump_users;
|
||||
execute dump_hosts;
|
||||
|
||||
truncate performance_schema.accounts;
|
||||
|
||||
echo "================== ACCOUNTS truncated ==================";
|
||||
|
||||
echo "================== Step 19 ==================";
|
||||
--vertical_results
|
||||
call dump_thread();
|
||||
execute dump_memory_account;
|
||||
execute dump_memory_user;
|
||||
execute dump_memory_host;
|
||||
execute dump_memory_global;
|
||||
--horizontal_results
|
||||
execute dump_accounts;
|
||||
execute dump_users;
|
||||
execute dump_hosts;
|
||||
|
||||
truncate performance_schema.users;
|
||||
|
||||
echo "================== USERS truncated ==================";
|
||||
|
||||
echo "================== Step 20 ==================";
|
||||
--vertical_results
|
||||
call dump_thread();
|
||||
execute dump_memory_account;
|
||||
execute dump_memory_user;
|
||||
execute dump_memory_host;
|
||||
execute dump_memory_global;
|
||||
--horizontal_results
|
||||
execute dump_accounts;
|
||||
execute dump_users;
|
||||
execute dump_hosts;
|
||||
|
||||
truncate performance_schema.hosts;
|
||||
|
||||
echo "================== HOSTS truncated ==================";
|
||||
|
||||
echo "================== Step 21 ==================";
|
||||
--vertical_results
|
||||
call dump_thread();
|
||||
execute dump_memory_account;
|
||||
execute dump_memory_user;
|
||||
execute dump_memory_host;
|
||||
execute dump_memory_global;
|
||||
--horizontal_results
|
||||
execute dump_accounts;
|
||||
execute dump_users;
|
||||
execute dump_hosts;
|
||||
|
207
mysql-test/suite/perfschema/include/memory_aggregate_setup.inc
Normal file
207
mysql-test/suite/perfschema/include/memory_aggregate_setup.inc
Normal file
@ -0,0 +1,207 @@
|
||||
# Tests for the performance schema
|
||||
|
||||
# =============
|
||||
# DOCUMENTATION
|
||||
# =============
|
||||
|
||||
# Verify how memory stats are aggregated into various tables
|
||||
#
|
||||
# In the thread dimension:
|
||||
# - memory_summary_by_thread_by_event_name
|
||||
# - memory_summary_by_account_by_event_name
|
||||
# - memory_summary_by_user_by_event_name
|
||||
# - memory_summary_by_host_by_event_name
|
||||
#
|
||||
# Globally:
|
||||
# - memory_summary_global_by_event_name
|
||||
#
|
||||
# The tests are written with the following helpers:
|
||||
# - include/memory_aggregate_setup.inc
|
||||
# - include/memory_aggregate_load.inc
|
||||
# - include/memory_aggregate_cleanup.inc
|
||||
#
|
||||
# Helpers are intended to be used as follows.
|
||||
#
|
||||
# A Typical test t/memory_aggregate_xxx.test will consist of:
|
||||
# --source ../include/memory_aggregate_setup.inc
|
||||
# --source ../include/memory_aggregate_load.inc
|
||||
# --source ../include/memory_aggregate_cleanup.inc
|
||||
# and a t/memory_aggregate_xxx-master.opt file
|
||||
#
|
||||
# Naming conventions for t/memory_aggregate_xxx.test are as follows:
|
||||
# t/memory_aggregate_<account><user><host>
|
||||
#
|
||||
# <account> corresponds to different sizing settings for
|
||||
# the variable performance-schema-accounts-size
|
||||
# - (blank): accounts-size sufficient to represent all records
|
||||
# - no_a: accounts-size set to 0
|
||||
#
|
||||
# <user> corresponds to different sizing settings for
|
||||
# the variable performance-schema-users-size
|
||||
# - (blank): users-size sufficient to represent all records
|
||||
# - no_u: users-size set to 0
|
||||
#
|
||||
# <host> corresponds to different sizing settings for
|
||||
# the variable performance-schema-hosts-size
|
||||
# - (blank): hosts-size sufficient to represent all records
|
||||
# - no_h: hosts-size set to 0
|
||||
|
||||
# =========================================
|
||||
# HELPER include/memory_aggregate_setup.inc
|
||||
# =========================================
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
--source include/no_protocol.inc
|
||||
--source ../include/wait_for_pfs_thread_count.inc
|
||||
|
||||
--disable_query_log
|
||||
|
||||
set @orig_sql_mode= @@sql_mode;
|
||||
set sql_mode= (select replace(@@sql_mode,'NO_AUTO_CREATE_USER',''));
|
||||
grant ALL on *.* to user1@localhost;
|
||||
grant ALL on *.* to user2@localhost;
|
||||
grant ALL on *.* to user3@localhost;
|
||||
grant ALL on *.* to user4@localhost;
|
||||
set sql_mode= @orig_sql_mode;
|
||||
|
||||
flush privileges;
|
||||
|
||||
# Purge old users, hosts, user/host from previous tests
|
||||
truncate table performance_schema.accounts;
|
||||
truncate table performance_schema.users;
|
||||
truncate table performance_schema.hosts;
|
||||
|
||||
# Save the setup
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists test.setup_actors;
|
||||
--enable_warnings
|
||||
|
||||
create table test.setup_actors as
|
||||
select * from performance_schema.setup_actors;
|
||||
|
||||
# Only instrument the user connections
|
||||
truncate table performance_schema.setup_actors;
|
||||
insert into performance_schema.setup_actors
|
||||
set host= 'localhost', user= 'user1', role= '%';
|
||||
insert into performance_schema.setup_actors
|
||||
set host= 'localhost', user= 'user2', role= '%';
|
||||
insert into performance_schema.setup_actors
|
||||
set host= 'localhost', user= 'user3', role= '%';
|
||||
insert into performance_schema.setup_actors
|
||||
set host= 'localhost', user= 'user4', role= '%';
|
||||
|
||||
update performance_schema.threads set instrumented='NO';
|
||||
|
||||
# Only instrument a few events of each kind
|
||||
update performance_schema.setup_instruments set enabled='NO', timed='NO';
|
||||
|
||||
update performance_schema.setup_instruments set enabled='YES', timed='YES'
|
||||
where name in ('memory/sql/user_var_entry::value',
|
||||
'memory/sql/User_level_lock',
|
||||
'memory/sql/Query_cache',
|
||||
'idle');
|
||||
|
||||
# Start from a known clean state, to avoid noise from previous tests
|
||||
flush tables;
|
||||
flush status;
|
||||
truncate performance_schema.memory_summary_by_thread_by_event_name;
|
||||
truncate performance_schema.memory_summary_by_account_by_event_name;
|
||||
truncate performance_schema.memory_summary_by_user_by_event_name;
|
||||
truncate performance_schema.memory_summary_by_host_by_event_name;
|
||||
truncate performance_schema.memory_summary_global_by_event_name;
|
||||
|
||||
--disable_warnings
|
||||
drop procedure if exists dump_thread;
|
||||
drop procedure if exists dump_one_thread;
|
||||
--enable_warnings
|
||||
|
||||
delimiter $$;
|
||||
|
||||
create procedure dump_thread()
|
||||
begin
|
||||
call dump_one_thread('user1');
|
||||
call dump_one_thread('user2');
|
||||
call dump_one_thread('user3');
|
||||
call dump_one_thread('user4');
|
||||
end
|
||||
$$
|
||||
|
||||
create procedure dump_one_thread(in username varchar(64))
|
||||
begin
|
||||
declare my_thread_id int;
|
||||
|
||||
set my_thread_id = (select thread_id from performance_schema.threads
|
||||
where processlist_user=username LIMIT 1);
|
||||
|
||||
if (my_thread_id is not null) then
|
||||
select username,
|
||||
EVENT_NAME, COUNT_ALLOC, COUNT_FREE,
|
||||
SUM_NUMBER_OF_BYTES_ALLOC, SUM_NUMBER_OF_BYTES_FREE,
|
||||
LOW_COUNT_USED, CURRENT_COUNT_USED, HIGH_COUNT_USED,
|
||||
LOW_NUMBER_OF_BYTES_USED, CURRENT_NUMBER_OF_BYTES_USED, HIGH_NUMBER_OF_BYTES_USED
|
||||
from performance_schema.memory_summary_by_thread_by_event_name
|
||||
where event_name in ('memory/sql/user_var_entry::value',
|
||||
'memory/sql/User_level_lock',
|
||||
'memory/sql/Query_cache')
|
||||
and thread_id = my_thread_id
|
||||
order by event_name;
|
||||
else
|
||||
select username, "not found" as status;
|
||||
end if;
|
||||
end
|
||||
$$
|
||||
|
||||
delimiter ;$$
|
||||
|
||||
prepare dump_memory_account from
|
||||
"select *
|
||||
from performance_schema.memory_summary_by_account_by_event_name
|
||||
where user like \'user%\'
|
||||
and event_name in ('memory/sql/user_var_entry::value',
|
||||
'memory/sql/User_level_lock',
|
||||
'memory/sql/Query_cache')
|
||||
order by user, host, event_name;";
|
||||
|
||||
prepare dump_memory_user from
|
||||
"select *
|
||||
from performance_schema.memory_summary_by_user_by_event_name
|
||||
where user like \'user%\'
|
||||
and event_name in ('memory/sql/user_var_entry::value',
|
||||
'memory/sql/User_level_lock',
|
||||
'memory/sql/Query_cache')
|
||||
order by user, event_name;";
|
||||
|
||||
prepare dump_memory_host from
|
||||
"select *
|
||||
from performance_schema.memory_summary_by_host_by_event_name
|
||||
where host=\'localhost\'
|
||||
and event_name in ('memory/sql/user_var_entry::value',
|
||||
'memory/sql/User_level_lock',
|
||||
'memory/sql/Query_cache')
|
||||
order by host, event_name;";
|
||||
|
||||
prepare dump_memory_global from
|
||||
"select *
|
||||
from performance_schema.memory_summary_global_by_event_name
|
||||
where event_name in ('memory/sql/user_var_entry::value',
|
||||
'memory/sql/User_level_lock',
|
||||
'memory/sql/Query_cache')
|
||||
order by event_name;";
|
||||
|
||||
prepare dump_users from
|
||||
"select * from performance_schema.users where user is not null order by user;";
|
||||
|
||||
prepare dump_hosts from
|
||||
"select * from performance_schema.hosts where host is not null order by host;";
|
||||
|
||||
prepare dump_accounts from
|
||||
"select * from performance_schema.accounts where (user is not null) and (host is not null) order by user, host;";
|
||||
|
||||
--enable_query_log
|
||||
|
||||
# Make sure all the instrumentation is present
|
||||
show global status like "performance_schema_memory_classes_lost";
|
||||
|
||||
|
@ -0,0 +1,11 @@
|
||||
#
|
||||
# Deallocates all the prepared statements
|
||||
# created in prepares_stmts_setup.inc
|
||||
#
|
||||
|
||||
DEALLOCATE PREPARE st1;
|
||||
DEALLOCATE PREPARE st2;
|
||||
DEALLOCATE PREPARE st3;
|
||||
DEALLOCATE PREPARE st4;
|
||||
|
||||
DROP TABLE t1;
|
@ -0,0 +1,18 @@
|
||||
#
|
||||
# Execution of all the prepared statements created in
|
||||
# prepared_statements_setup.inc.
|
||||
#
|
||||
|
||||
SET @a = 3;
|
||||
SET @b = 4;
|
||||
EXECUTE st1 USING @a, @b;
|
||||
|
||||
#SET @table = 't1';
|
||||
EXECUTE st2;
|
||||
|
||||
SET @c=3;
|
||||
EXECUTE st3 using @c;
|
||||
|
||||
EXECUTE st4;
|
||||
|
||||
|
20
mysql-test/suite/perfschema/include/prepared_stmts_setup.inc
Normal file
20
mysql-test/suite/perfschema/include/prepared_stmts_setup.inc
Normal file
@ -0,0 +1,20 @@
|
||||
#
|
||||
# Creating various prepared statements.
|
||||
# HELPER include/prepared_stmts_setup.inc
|
||||
#
|
||||
|
||||
CREATE TABLE t1 (a INT NOT NULL);
|
||||
INSERT INTO t1 VALUES (4), (8), (11), (32), (80);
|
||||
|
||||
# Prepared statments
|
||||
|
||||
PREPARE st1 FROM 'SELECT SQRT(POW(?,2) + POW(?,2)) AS hypotenuse';
|
||||
|
||||
SET @table = 't1';
|
||||
SET @s = CONCAT('SELECT * FROM ', @table);
|
||||
PREPARE st2 FROM @s;
|
||||
|
||||
PREPARE st3 FROM 'INSERT INTO t1 SELECT * FROM t1 WHERE a<=?';
|
||||
|
||||
PREPARE st4 FROM
|
||||
'(SELECT a FROM t1) UNION (SELECT a+10 FROM t1) ORDER BY RAND()*0+a';
|
31
mysql-test/suite/perfschema/include/program_cleanup.inc
Normal file
31
mysql-test/suite/perfschema/include/program_cleanup.inc
Normal file
@ -0,0 +1,31 @@
|
||||
#
|
||||
# clean up of set-up created in
|
||||
# suite/perfschema/include/program_setup.inc
|
||||
#
|
||||
|
||||
--disable_warnings
|
||||
DROP PROCEDURE SampleProc1;
|
||||
DROP PROCEDURE SampleProc2;
|
||||
DROP PROCEDURE SampleProc3;
|
||||
DROP PROCEDURE SampleProc4;
|
||||
|
||||
DROP FUNCTION wt_avg;
|
||||
DROP FUNCTION fac;
|
||||
DROP FUNCTION append;
|
||||
|
||||
DROP TRIGGER trg1;
|
||||
DROP TRIGGER trg2;
|
||||
DROP TRIGGER trg3;
|
||||
DROP TRIGGER trg4;
|
||||
DROP TRIGGER trg5;
|
||||
|
||||
DROP EVENT IF EXISTS e1;
|
||||
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t2;
|
||||
DROP TABLE t3;
|
||||
DROP TABLE t4;
|
||||
DROP TABLE table_t;
|
||||
|
||||
DROP DATABASE stored_programs;
|
||||
--enable_warnings
|
54
mysql-test/suite/perfschema/include/program_execution.inc
Normal file
54
mysql-test/suite/perfschema/include/program_execution.inc
Normal file
@ -0,0 +1,54 @@
|
||||
#
|
||||
# Execute the stored programs created in
|
||||
# suite/perfschema/include/program_setup.inc
|
||||
#
|
||||
|
||||
--echo #####################
|
||||
--echo # Executing queries #
|
||||
--echo #####################
|
||||
INSERT INTO t1 VALUES (10,20);
|
||||
CALL SampleProc1(30,40,50);
|
||||
SET @a=1;
|
||||
SELECT @a;
|
||||
CALL SampleProc2("Jwalamukhi",34);
|
||||
SELECT @a;
|
||||
CALL SampleProc3();
|
||||
CALL SampleProc4();
|
||||
SET @change=1;
|
||||
SELECT @change;
|
||||
UPDATE t2 SET id=22 WHERE name="Jwalamukhi";
|
||||
SELECT @change;
|
||||
SET @del=1;
|
||||
SELECT @del;
|
||||
DELETE FROM t1 WHERE i=76;
|
||||
SELECT @del;
|
||||
SELECT wt_avg(1, 12, 1990, 1121990);
|
||||
SELECT fac(5);
|
||||
SELECT append("Bolly", "wood");
|
||||
|
||||
--echo # Event
|
||||
|
||||
SET GLOBAL event_scheduler=ON;
|
||||
|
||||
CREATE TABLE table_t(a INT);
|
||||
DELIMITER |;
|
||||
CREATE EVENT e1 ON SCHEDULE EVERY 2 SECOND DO
|
||||
BEGIN
|
||||
INSERT INTO table_t VALUES(1);
|
||||
END|
|
||||
DELIMITER ;|
|
||||
|
||||
# Let e1 insert 1 record into the table table_t
|
||||
|
||||
--let $wait_condition= select count(*) = 1 from table_t
|
||||
--source include/wait_condition.inc
|
||||
SELECT * FROM table_t;
|
||||
|
||||
# Wait till the above one execution of event is instrumented.
|
||||
|
||||
--let $wait_condition= select count(*) = 1 from performance_schema.events_statements_history_long where object_type='EVENT'
|
||||
--source include/wait_condition.inc
|
||||
|
||||
SET GLOBAL event_scheduler=OFF;
|
||||
--source include/no_running_event_scheduler.inc
|
||||
|
@ -0,0 +1,21 @@
|
||||
#
|
||||
# clean up if set-up created in
|
||||
# suite/perfschema/include/program_nested_setup.inc
|
||||
#
|
||||
|
||||
DROP PROCEDURE c4;
|
||||
DROP PROCEDURE c3;
|
||||
DROP PROCEDURE c2;
|
||||
DROP PROCEDURE c1;
|
||||
DROP PROCEDURE inc;
|
||||
DROP PROCEDURE inc2;
|
||||
DROP PROCEDURE iotest;
|
||||
DROP FUNCTION mul;
|
||||
DROP FUNCTION inc;
|
||||
DROP FUNCTION fac;
|
||||
DROP FUNCTION fun;
|
||||
DROP PROCEDURE ifac;
|
||||
DROP TRIGGER trg;
|
||||
DROP TABLE t1,t2;
|
||||
|
||||
DROP DATABASE nested_sp;
|
@ -0,0 +1,22 @@
|
||||
#
|
||||
# Execute the nested stored programs created in
|
||||
# suite/include/perfschema/program_nested_setup.inc
|
||||
#
|
||||
|
||||
--echo #####################
|
||||
--echo # Executing queries #
|
||||
--echo #####################
|
||||
|
||||
CALL c1(42);
|
||||
SELECT * FROM t1;
|
||||
DELETE FROM t1;
|
||||
|
||||
CALL iotest("io1", "io2", 1);
|
||||
SELECT * FROM t1 ORDER BY data DESC;
|
||||
DELETE FROM t1;
|
||||
|
||||
SELECT fun(6,10);
|
||||
|
||||
INSERT INTO t1 VALUES (20,13);
|
||||
|
||||
SELECT * FROM t2;
|
87
mysql-test/suite/perfschema/include/program_nested_setup.inc
Normal file
87
mysql-test/suite/perfschema/include/program_nested_setup.inc
Normal file
@ -0,0 +1,87 @@
|
||||
#
|
||||
# SET-UP - Creation of various nested stored programs
|
||||
#
|
||||
|
||||
--source include/no_protocol.inc
|
||||
|
||||
--echo # SET-UP
|
||||
CREATE DATABASE nested_sp;
|
||||
USE nested_sp;
|
||||
|
||||
CREATE TABLE t1(
|
||||
id CHAR(16) NOT NULL DEFAULT '',
|
||||
data INT NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE t2(
|
||||
n INT UNSIGNED NOT NULL,
|
||||
f BIGINT UNSIGNED
|
||||
);
|
||||
|
||||
--echo ############################
|
||||
--echo # Creating Stored Programs #
|
||||
--echo ############################
|
||||
DELIMITER |;
|
||||
|
||||
# Nested Stored Procedure - 1
|
||||
CREATE PROCEDURE c1(x INT)
|
||||
CALL c2("c", x)|
|
||||
CREATE PROCEDURE c2(s CHAR(16), x INT)
|
||||
CALL c3(x, s)|
|
||||
CREATE PROCEDURE c3(x INT, s CHAR(16))
|
||||
CALL c4("level", x, s)|
|
||||
CREATE PROCEDURE c4(l CHAR(8), x INT, s CHAR(16))
|
||||
INSERT INTO t1 VALUES (concat(l,s), x)|
|
||||
|
||||
# Nested Stored Procedure - 2
|
||||
CREATE PROCEDURE iotest(x1 CHAR(16), x2 CHAR(16), y INT)
|
||||
BEGIN
|
||||
CALL inc2(x2, y);
|
||||
INSERT INTO t1 VALUES (x1, y);
|
||||
END|
|
||||
CREATE PROCEDURE inc2(x CHAR(16), y INT)
|
||||
BEGIN
|
||||
CALL inc(y);
|
||||
INSERT INTO t1 VALUES (x, y);
|
||||
END|
|
||||
CREATE PROCEDURE inc(inout io INT)
|
||||
SET io = io + 1|
|
||||
|
||||
# Nested Stored Function
|
||||
CREATE FUNCTION mul(x INT, y INT) RETURNS INT
|
||||
RETURN x*y|
|
||||
CREATE FUNCTION inc(i INT) RETURNS INT
|
||||
RETURN i+1|
|
||||
CREATE FUNCTION fac(n INT UNSIGNED) RETURNS BIGINT UNSIGNED
|
||||
BEGIN
|
||||
DECLARE f BIGINT UNSIGNED DEFAULT 1;
|
||||
WHILE n > 1 DO
|
||||
SET f = f * n;
|
||||
SET n = n - 1;
|
||||
END WHILE;
|
||||
RETURN f;
|
||||
END|
|
||||
CREATE FUNCTION fun(i INT, u INT UNSIGNED) RETURNS DOUBLE
|
||||
RETURN mul(inc(i), fac(u))|
|
||||
#
|
||||
# A nested stored program
|
||||
#
|
||||
CREATE PROCEDURE ifac(n INT UNSIGNED)
|
||||
BEGIN
|
||||
DECLARE i BIGINT UNSIGNED DEFAULT 1;
|
||||
|
||||
IF n > 20 THEN
|
||||
SET n = 20; # bigint overflow otherwise
|
||||
END IF;
|
||||
WHILE i <= n DO
|
||||
BEGIN
|
||||
INSERT INTO t2 VALUES (i, fac(i));
|
||||
SET i = i + 1;
|
||||
END;
|
||||
END WHILE;
|
||||
END|
|
||||
CREATE TRIGGER trg AFTER INSERT ON t1 FOR EACH ROW
|
||||
CALL ifac(10)|
|
||||
|
||||
DELIMITER ;|
|
||||
|
135
mysql-test/suite/perfschema/include/program_setup.inc
Normal file
135
mysql-test/suite/perfschema/include/program_setup.inc
Normal file
@ -0,0 +1,135 @@
|
||||
#
|
||||
# SET-UP - Creation of various non-nested stored programs
|
||||
#
|
||||
|
||||
--source include/no_protocol.inc
|
||||
|
||||
--echo # SET-UP
|
||||
|
||||
CREATE DATABASE stored_programs;
|
||||
USE stored_programs;
|
||||
|
||||
CREATE TABLE t1(
|
||||
i INT NOT NULL,
|
||||
j INT
|
||||
);
|
||||
|
||||
CREATE TABLE t2(
|
||||
name CHAR(16) NOT NULL DEFAULT '',
|
||||
id INT NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE t3(
|
||||
d DATE,
|
||||
n INT,
|
||||
f DOUBLE,
|
||||
s VARCHAR(32)
|
||||
);
|
||||
|
||||
CREATE TABLE t4(
|
||||
`k` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`word` varchar(100) NOT NULL,
|
||||
`mean` varchar(300) NOT NULL,
|
||||
PRIMARY KEY (`k`)
|
||||
);
|
||||
|
||||
|
||||
--echo ############################
|
||||
--echo # Creating Stored Programs #
|
||||
--echo ############################
|
||||
|
||||
--echo # Stored Routine ( Procedure & Function )
|
||||
|
||||
DELIMITER |;
|
||||
CREATE PROCEDURE SampleProc1(x1 INT, x2 INT, y INT)
|
||||
BEGIN
|
||||
INSERT INTO t1 VALUES (x1, y);
|
||||
INSERT INTO t1 VALUES (x2, y);
|
||||
END|
|
||||
|
||||
CREATE PROCEDURE SampleProc2(x CHAR(16), y INT)
|
||||
BEGIN
|
||||
DECLARE z1, z2 INT;
|
||||
SET z1 = y;
|
||||
SET z2 = z1+2;
|
||||
INSERT INTO t2 VALUES (x, z2);
|
||||
END|
|
||||
|
||||
CREATE PROCEDURE SampleProc3()
|
||||
BEGIN
|
||||
DECLARE ld DATE;
|
||||
DECLARE li INT;
|
||||
DECLARE lf DOUBLE;
|
||||
DECLARE ls VARCHAR(32);
|
||||
|
||||
SET ld = NULL, li = NULL, lf = NULL, ls = NULL;
|
||||
INSERT INTO t3 VALUES (ld, li, lf, ls);
|
||||
|
||||
INSERT INTO t3 (n, f, s) VALUES ((ld IS NULL), 1, "ld is null"),
|
||||
((li IS NULL), 1, "li is null"),
|
||||
((li = 0), NULL, "li = 0"),
|
||||
((lf IS NULL), 1, "lf is null"),
|
||||
((lf = 0), NULL, "lf = 0"),
|
||||
((ls IS NULL), 1, "ls is null");
|
||||
END|
|
||||
|
||||
|
||||
CREATE PROCEDURE SampleProc4()
|
||||
BEGIN
|
||||
DECLARE x INT;
|
||||
SET x = 1;
|
||||
WHILE x <= 2 DO
|
||||
INSERT INTO t4(word, mean) VALUES('a','a mean');
|
||||
SET x = x + 1;
|
||||
END WHILE;
|
||||
END|
|
||||
|
||||
CREATE FUNCTION append(s1 CHAR(8), s2 CHAR(8)) RETURNS CHAR(16)
|
||||
RETURN concat(s1, s2)|
|
||||
|
||||
CREATE FUNCTION wt_avg(n1 INT, n2 INT, n3 INT, n4 INT)
|
||||
RETURNS INT
|
||||
DETERMINISTIC
|
||||
BEGIN
|
||||
DECLARE avg INT;
|
||||
SET avg = (n1+n2+n3*2+n4*4)/8;
|
||||
RETURN avg;
|
||||
END|
|
||||
|
||||
CREATE FUNCTION fac(n INT UNSIGNED) RETURNS BIGINT UNSIGNED
|
||||
BEGIN
|
||||
DECLARE f BIGINT UNSIGNED DEFAULT 1;
|
||||
WHILE n > 1 DO
|
||||
SET f = f * n;
|
||||
SET n = n - 1;
|
||||
END WHILE;
|
||||
RETURN f;
|
||||
END|
|
||||
|
||||
--echo # Triggers
|
||||
|
||||
# INSERT triggers
|
||||
CREATE TRIGGER trg1 BEFORE INSERT ON t1 FOR EACH ROW
|
||||
BEGIN
|
||||
if isnull(new.j) then
|
||||
SET new.j:= new.i * 10;
|
||||
END if;
|
||||
END|
|
||||
|
||||
CREATE TRIGGER trg2 AFTER INSERT ON t2 FOR EACH ROW
|
||||
BEGIN
|
||||
UPDATE t1 SET i=new.id+i ;
|
||||
END|
|
||||
|
||||
# UPDATE trigger
|
||||
CREATE TRIGGER trg3 AFTER UPDATE ON t2 FOR EACH ROW
|
||||
SET @change:= @change + new.id - old.id|
|
||||
|
||||
# DELETE triggers
|
||||
CREATE TRIGGER trg4 BEFORE DELETE ON t1 FOR EACH ROW
|
||||
SET @del:= @del + 1|
|
||||
|
||||
CREATE TRIGGER trg5 AFTER DELETE ON t1 FOR EACH ROW
|
||||
SET @del:= @del + 8 + old.j|
|
||||
|
||||
DELIMITER ;|
|
@ -0,0 +1,20 @@
|
||||
# ==== Purpose ====
|
||||
#
|
||||
# Auxiliary file used by transaction_gtid.test
|
||||
#
|
||||
# Invoked between transactions in order to reset the state:
|
||||
# - set GTID_NEXT to AUTOMATIC since this is required after
|
||||
# any transaction that has GTID_NEXT=UUID:NUMBER
|
||||
# - RESET MASTER in order to clear @@global.gtid_executed, so
|
||||
# that the same GTID can be executed again.
|
||||
# - truncate the performance_schema.events_transaction_* tables
|
||||
#
|
||||
# All this is done on the connection 'server_1'.
|
||||
|
||||
--disable_query_log
|
||||
--connection server_1
|
||||
RESET MASTER;
|
||||
TRUNCATE TABLE performance_schema.events_transactions_history;
|
||||
TRUNCATE TABLE performance_schema.events_transactions_current;
|
||||
--enable_query_log
|
||||
--connection default
|
@ -27,6 +27,14 @@ show create table events_statements_summary_by_thread_by_event_name;
|
||||
show create table events_statements_summary_by_user_by_event_name;
|
||||
show create table events_statements_summary_by_account_by_event_name;
|
||||
show create table events_statements_summary_global_by_event_name;
|
||||
show create table events_transactions_current;
|
||||
show create table events_transactions_history;
|
||||
show create table events_transactions_history_long;
|
||||
show create table events_transactions_summary_by_host_by_event_name;
|
||||
show create table events_transactions_summary_by_thread_by_event_name;
|
||||
show create table events_transactions_summary_by_user_by_event_name;
|
||||
show create table events_transactions_summary_by_account_by_event_name;
|
||||
show create table events_transactions_summary_global_by_event_name;
|
||||
show create table events_waits_current;
|
||||
show create table events_waits_history;
|
||||
show create table events_waits_history_long;
|
||||
@ -36,6 +44,12 @@ show create table events_waits_summary_by_thread_by_event_name;
|
||||
show create table events_waits_summary_by_user_by_event_name;
|
||||
show create table events_waits_summary_by_account_by_event_name;
|
||||
show create table events_waits_summary_global_by_event_name;
|
||||
show create table memory_summary_by_host_by_event_name;
|
||||
show create table memory_summary_by_thread_by_event_name;
|
||||
show create table memory_summary_by_user_by_event_name;
|
||||
show create table memory_summary_by_account_by_event_name;
|
||||
show create table memory_summary_global_by_event_name;
|
||||
show create table metadata_locks;
|
||||
show create table file_instances;
|
||||
show create table file_summary_by_event_name;
|
||||
show create table file_summary_by_instance;
|
||||
@ -53,6 +67,7 @@ show create table setup_timers;
|
||||
show create table socket_instances;
|
||||
show create table socket_summary_by_instance;
|
||||
show create table socket_summary_by_event_name;
|
||||
show create table table_handles;
|
||||
show create table table_io_waits_summary_by_index_usage;
|
||||
show create table table_io_waits_summary_by_table;
|
||||
show create table table_lock_waits_summary_by_table;
|
||||
|
125
mysql-test/suite/perfschema/include/show_aggregate.inc
Normal file
125
mysql-test/suite/perfschema/include/show_aggregate.inc
Normal file
@ -0,0 +1,125 @@
|
||||
############### suite/perfschema/include/show_aggregate.inc ####################
|
||||
# #
|
||||
# Gather status by thread, by user, by host, by account and global. #
|
||||
# #
|
||||
################################################################################
|
||||
|
||||
--echo #=================
|
||||
--echo # Global results
|
||||
--echo #=================
|
||||
USE test;
|
||||
UPDATE test.status_results sr, performance_schema.global_status sg
|
||||
SET sr.stop = sg.variable_value
|
||||
WHERE sr.variable_name = sg.variable_name
|
||||
AND sg.variable_name IN ('handler_delete', 'handler_rollback');
|
||||
--echo
|
||||
--echo # Global deltas: END - START.
|
||||
UPDATE test.status_results sr
|
||||
SET sr.delta = sr.stop - sr.start;
|
||||
|
||||
#--echo DEBUG
|
||||
#SELECT * FROM test.status_results;
|
||||
#SELECT * from performance_schema.global_status where variable_name in ('handler_delete', 'handler_rollback');
|
||||
|
||||
--echo #=================
|
||||
--echo # Status by thread
|
||||
--echo #=================
|
||||
--echo # Thread results from CON1.
|
||||
UPDATE test.status_results sr, performance_schema.status_by_thread sbt
|
||||
SET sr.t1 = sbt.variable_value
|
||||
WHERE sr.variable_name = sbt.variable_name
|
||||
AND sbt.variable_name IN ('handler_delete', 'handler_rollback')
|
||||
AND sbt.thread_id = @con1_id;
|
||||
--echo
|
||||
--echo # Thread results from CON2.
|
||||
UPDATE test.status_results sr, performance_schema.status_by_thread sbt
|
||||
SET sr.t2 = sbt.variable_value
|
||||
WHERE sr.variable_name = sbt.variable_name
|
||||
AND sbt.variable_name IN ('handler_delete', 'handler_rollback')
|
||||
AND sbt.thread_id = @con2_id;
|
||||
--echo
|
||||
--echo # Thread results from CON3.
|
||||
UPDATE test.status_results sr, performance_schema.status_by_thread sbt
|
||||
SET sr.t3 = sbt.variable_value
|
||||
WHERE sr.variable_name = sbt.variable_name
|
||||
AND sbt.variable_name IN ('handler_delete', 'handler_rollback')
|
||||
AND sbt.thread_id = @con3_id;
|
||||
--echo
|
||||
--echo # Thread totals for 3 connections.
|
||||
UPDATE test.status_results sr
|
||||
SET sr.thread = sr.t1 + sr.t2 + sr.t3;
|
||||
|
||||
--echo #=================
|
||||
--echo # Status by user
|
||||
--echo #=================
|
||||
--echo # User1
|
||||
UPDATE test.status_results sr, performance_schema.status_by_user sbu
|
||||
SET sr.u1 = sbu.variable_value
|
||||
WHERE sr.variable_name = sbu.variable_name
|
||||
AND sbu.variable_name IN ('handler_delete', 'handler_rollback')
|
||||
AND sbu.user IN ('user1');
|
||||
--echo
|
||||
--echo # User2
|
||||
UPDATE test.status_results sr, performance_schema.status_by_user sbu
|
||||
SET sr.u2 = sbu.variable_value
|
||||
WHERE sr.variable_name = sbu.variable_name
|
||||
AND sbu.variable_name IN ('handler_delete', 'handler_rollback')
|
||||
AND sbu.user IN ('user2');
|
||||
--echo
|
||||
--echo # User3
|
||||
UPDATE test.status_results sr, performance_schema.status_by_user sbu
|
||||
SET sr.u3 = sbu.variable_value
|
||||
WHERE sr.variable_name = sbu.variable_name
|
||||
AND sbu.variable_name IN ('handler_delete', 'handler_rollback')
|
||||
AND sbu.user IN ('user3');
|
||||
--echo
|
||||
--echo # Status totals for 3 users.
|
||||
UPDATE test.status_results sr
|
||||
SET sr.user = sr.u1 + sr.u2 + sr.u3;
|
||||
|
||||
--echo #===========================
|
||||
--echo # Status by host (localhost)
|
||||
--echo #===========================
|
||||
--echo
|
||||
--echo # host1 = localhost
|
||||
UPDATE test.status_results sr, performance_schema.status_by_host sbh
|
||||
SET sr.h1 = sbh.variable_value
|
||||
WHERE sr.variable_name = sbh.variable_name
|
||||
AND sbh.variable_name IN ('handler_delete', 'handler_rollback')
|
||||
AND sbh.host IN ('localhost');
|
||||
--echo
|
||||
--echo # Status totals for 'localhost' only.
|
||||
UPDATE test.status_results sr
|
||||
SET sr.host = sr.h1 + sr.h2 + sr.h3;
|
||||
|
||||
--echo #==================
|
||||
--echo # Status by account
|
||||
--echo #==================
|
||||
--echo # User1@localhost
|
||||
UPDATE test.status_results sr, performance_schema.status_by_account sba
|
||||
SET sr.a1 = sba.variable_value
|
||||
WHERE sr.variable_name = sba.variable_name
|
||||
AND sba.variable_name IN ('handler_delete', 'handler_rollback')
|
||||
AND sba.user IN ('user1');
|
||||
--echo
|
||||
--echo # User2@localhost
|
||||
UPDATE test.status_results sr, performance_schema.status_by_account sba
|
||||
SET sr.a2 = sba.variable_value
|
||||
WHERE sr.variable_name = sba.variable_name
|
||||
AND sba.variable_name IN ('handler_delete', 'handler_rollback')
|
||||
AND sba.user IN ('user2');
|
||||
--echo
|
||||
--echo # User3@localhost
|
||||
UPDATE test.status_results sr, performance_schema.status_by_account sba
|
||||
SET sr.a3 = sba.variable_value
|
||||
WHERE sr.variable_name = sba.variable_name
|
||||
AND sba.variable_name IN ('handler_delete', 'handler_rollback')
|
||||
AND sba.user IN ('user3');
|
||||
--echo
|
||||
--echo
|
||||
--echo # Status totals for 3 accounts.
|
||||
UPDATE test.status_results sr
|
||||
SET sr.acct = sr.a1 + sr.a2 + sr.a3;
|
||||
|
||||
#--echo DEBUG
|
||||
#SELECT * FROM test.status_results;
|
29
mysql-test/suite/perfschema/include/show_plugin_verifier.inc
Normal file
29
mysql-test/suite/perfschema/include/show_plugin_verifier.inc
Normal file
@ -0,0 +1,29 @@
|
||||
--disable_warnings
|
||||
|
||||
--echo
|
||||
SHOW GLOBAL STATUS LIKE "example_%";
|
||||
--echo
|
||||
SHOW SESSION STATUS LIKE "example_%";
|
||||
--echo
|
||||
SHOW GLOBAL VARIABLES LIKE "example_%";
|
||||
--echo
|
||||
SHOW SESSION VARIABLES LIKE "example_%";
|
||||
--echo
|
||||
SELECT variable_name, variable_value FROM performance_schema.global_status WHERE variable_name LIKE "example_%";
|
||||
--echo
|
||||
SELECT variable_name, variable_value FROM performance_schema.session_status WHERE variable_name LIKE "example_%";
|
||||
--echo
|
||||
SELECT variable_name, variable_value FROM performance_schema.global_variables WHERE variable_name LIKE "example_%";
|
||||
--echo
|
||||
SELECT variable_name, variable_value FROM performance_schema.session_variables WHERE variable_name LIKE "example_%";
|
||||
|
||||
#
|
||||
# Force sync of local and global system variables.
|
||||
#
|
||||
--disable_result_log
|
||||
--disable_query_log
|
||||
SELECT variable_name, variable_value FROM performance_schema.variables_by_thread WHERE variable_name LIKE "example_%";
|
||||
--enable_query_log
|
||||
--enable_result_log
|
||||
|
||||
--enable_warnings
|
@ -0,0 +1,29 @@
|
||||
--disable_warnings
|
||||
|
||||
--echo
|
||||
SHOW GLOBAL STATUS LIKE "example_%";
|
||||
--echo
|
||||
SHOW SESSION STATUS LIKE "example_%";
|
||||
--echo
|
||||
SHOW GLOBAL VARIABLES LIKE "example_%";
|
||||
--echo
|
||||
SHOW SESSION VARIABLES LIKE "example_%";
|
||||
--echo
|
||||
SELECT variable_name, variable_value FROM information_schema.global_status WHERE variable_name LIKE "example_%";
|
||||
--echo
|
||||
SELECT variable_name, variable_value FROM information_schema.session_status WHERE variable_name LIKE "example_%";
|
||||
--echo
|
||||
SELECT variable_name, variable_value FROM information_schema.global_variables WHERE variable_name LIKE "example_%";
|
||||
--echo
|
||||
SELECT variable_name, variable_value FROM information_schema.session_variables WHERE variable_name LIKE "example_%";
|
||||
|
||||
#
|
||||
# Force sync of local and global system variables.
|
||||
#
|
||||
--disable_result_log
|
||||
--disable_query_log
|
||||
SELECT variable_name, variable_value FROM performance_schema.variables_by_thread WHERE variable_name LIKE "example_%";
|
||||
--enable_query_log
|
||||
--enable_result_log
|
||||
|
||||
--enable_warnings
|
@ -0,0 +1,29 @@
|
||||
# ==== Purpose ====
|
||||
#
|
||||
# Auxiliary file used by transaction_gtid.test
|
||||
#
|
||||
# Invoked to check the contents of the
|
||||
# performance_schema.events_transaction_[current|history] tables and
|
||||
# write the result to the result log. This is executed on the
|
||||
# 'server_1' connection and shows only status of transactions on the
|
||||
# 'default' connection.
|
||||
|
||||
--connection server_1
|
||||
|
||||
--replace_result $server_uuid SERVER_UUID aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa A
|
||||
--let $history_result= `SELECT GTID FROM performance_schema.events_transactions_history WHERE THREAD_ID = $thread_id`
|
||||
if ($history_result == '')
|
||||
{
|
||||
--let $history_result= none
|
||||
}
|
||||
|
||||
--replace_result $server_uuid SERVER_UUID aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa A
|
||||
--let $current_result= `SELECT GTID FROM performance_schema.events_transactions_current WHERE THREAD_ID = $thread_id`
|
||||
if ($current_result == '')
|
||||
{
|
||||
--let $current_result= none
|
||||
}
|
||||
|
||||
--echo - history=$history_result current=$current_result
|
||||
|
||||
--connection default
|
@ -1,24 +0,0 @@
|
||||
|
||||
show variables like "table_definition_cache";
|
||||
show variables like "table_open_cache";
|
||||
show variables like "max_connections";
|
||||
# open_files_limit depends on OS configuration (ulimit -n)
|
||||
#show variables like "open_files_limit";
|
||||
show variables where
|
||||
`Variable_name` != "performance_schema_max_statement_classes" and
|
||||
`Variable_name` like "performance_schema%";
|
||||
show status like "%performance_schema%";
|
||||
|
||||
# Each test script should provide a different test.cnf file,
|
||||
# with different settings.
|
||||
# This output will show the sizes computed automatically.
|
||||
# Note that this output is very dependent on the platform.
|
||||
# The output of SHOW ENGINE PERFORMANCE_SCHEMA STATUS
|
||||
# is very dependent on the platform,
|
||||
# so it is not printed here to ensure stability of the .results files.
|
||||
# To troubleshoot the performance schema memory consumption at different
|
||||
# configuration settings, comment the following line.
|
||||
# Debug only:
|
||||
|
||||
# show engine performance_schema status;
|
||||
|
@ -28,10 +28,13 @@
|
||||
|
||||
--disable_query_log
|
||||
|
||||
set @orig_sql_mode= @@sql_mode;
|
||||
set sql_mode= (select replace(@@sql_mode,'NO_AUTO_CREATE_USER',''));
|
||||
grant ALL on *.* to user1@localhost;
|
||||
grant ALL on *.* to user2@localhost;
|
||||
grant ALL on *.* to user3@localhost;
|
||||
grant ALL on *.* to user4@localhost;
|
||||
set sql_mode= @orig_sql_mode;
|
||||
|
||||
flush privileges;
|
||||
|
||||
|
@ -7,7 +7,8 @@ select count(*) from performance_schema.setup_consumers;
|
||||
# wait/io/table/sql/handler is a native instrument
|
||||
# wait/lock/table/sql/handler is a native instrument
|
||||
# idle/io/socket is a native instrument
|
||||
select count(*) > 3 from performance_schema.setup_instruments;
|
||||
# wait/lock/metadata is a native instrument
|
||||
select count(*) > 4 from performance_schema.setup_instruments;
|
||||
select count(*) from performance_schema.setup_timers;
|
||||
|
||||
# Make sure we don't crash, no matter what the starting parameters are
|
||||
@ -32,6 +33,14 @@ select * from performance_schema.events_statements_summary_by_host_by_event_name
|
||||
select * from performance_schema.events_statements_summary_by_thread_by_event_name;
|
||||
select * from performance_schema.events_statements_summary_by_user_by_event_name;
|
||||
select * from performance_schema.events_statements_summary_global_by_event_name;
|
||||
select * from performance_schema.events_transactions_current;
|
||||
select * from performance_schema.events_transactions_history;
|
||||
select * from performance_schema.events_transactions_history_long;
|
||||
select * from performance_schema.events_transactions_summary_by_account_by_event_name;
|
||||
select * from performance_schema.events_transactions_summary_by_host_by_event_name;
|
||||
select * from performance_schema.events_transactions_summary_by_thread_by_event_name;
|
||||
select * from performance_schema.events_transactions_summary_by_user_by_event_name;
|
||||
select * from performance_schema.events_transactions_summary_global_by_event_name;
|
||||
select * from performance_schema.events_waits_current;
|
||||
select * from performance_schema.events_waits_history;
|
||||
select * from performance_schema.events_waits_history_long;
|
||||
@ -41,11 +50,22 @@ select * from performance_schema.events_waits_summary_by_instance;
|
||||
select * from performance_schema.events_waits_summary_by_thread_by_event_name;
|
||||
select * from performance_schema.events_waits_summary_by_user_by_event_name;
|
||||
select * from performance_schema.events_waits_summary_global_by_event_name;
|
||||
select * from performance_schema.memory_summary_by_account_by_event_name;
|
||||
select * from performance_schema.memory_summary_by_host_by_event_name;
|
||||
select * from performance_schema.memory_summary_by_thread_by_event_name;
|
||||
select * from performance_schema.memory_summary_by_user_by_event_name;
|
||||
select * from performance_schema.memory_summary_global_by_event_name;
|
||||
select * from performance_schema.file_instances;
|
||||
select * from performance_schema.file_summary_by_event_name;
|
||||
select * from performance_schema.file_summary_by_instance;
|
||||
select * from performance_schema.host_cache;
|
||||
select * from performance_schema.hosts;
|
||||
select * from performance_schema.memory_summary_by_account_by_event_name;
|
||||
select * from performance_schema.memory_summary_by_host_by_event_name;
|
||||
select * from performance_schema.memory_summary_by_thread_by_event_name;
|
||||
select * from performance_schema.memory_summary_by_user_by_event_name;
|
||||
select * from performance_schema.memory_summary_global_by_event_name;
|
||||
select * from performance_schema.metadata_locks;
|
||||
select * from performance_schema.mutex_instances;
|
||||
select * from performance_schema.objects_summary_global_by_type;
|
||||
select * from performance_schema.performance_timers;
|
||||
@ -60,17 +80,31 @@ select * from performance_schema.setup_timers;
|
||||
select * from performance_schema.socket_instances;
|
||||
select * from performance_schema.socket_summary_by_instance;
|
||||
select * from performance_schema.socket_summary_by_event_name;
|
||||
select * from performance_schema.table_handles;
|
||||
select * from performance_schema.table_io_waits_summary_by_index_usage;
|
||||
select * from performance_schema.table_io_waits_summary_by_table;
|
||||
select * from performance_schema.table_lock_waits_summary_by_table;
|
||||
select * from performance_schema.threads;
|
||||
select * from performance_schema.users;
|
||||
select * from performance_schema.replication_connection_configuration;
|
||||
select * from performance_schema.replication_connection_status;
|
||||
select * from performance_schema.replication_applier_configuration;
|
||||
select * from performance_schema.replication_applier_status;
|
||||
select * from performance_schema.replication_applier_status_by_coordinator;
|
||||
select * from performance_schema.replication_applier_status_by_worker;
|
||||
select * from performance_schema.global_status;
|
||||
select * from performance_schema.status_by_thread;
|
||||
select * from performance_schema.status_by_user;
|
||||
select * from performance_schema.status_by_host;
|
||||
select * from performance_schema.status_by_account;
|
||||
select * from performance_schema.session_status;
|
||||
select * from performance_schema.global_variables;
|
||||
select * from performance_schema.variables_by_thread;
|
||||
select * from performance_schema.session_variables;
|
||||
--enable_result_log
|
||||
|
||||
# This has a stable output, printing the result:
|
||||
show variables where
|
||||
`Variable_name` != "performance_schema_max_statement_classes" and
|
||||
`Variable_name` like "performance_schema%";
|
||||
show global variables like "performance_schema%";
|
||||
|
||||
# This has an unrepeatable output, it does depends too much on
|
||||
# - the platform hardware (sizeof structures, padding)
|
||||
@ -81,6 +115,6 @@ show variables where
|
||||
|
||||
--disable_result_log
|
||||
show engine PERFORMANCE_SCHEMA status;
|
||||
show status like "performance_schema%";
|
||||
show global status like "performance_schema%";
|
||||
--enable_result_log
|
||||
|
||||
|
@ -2,6 +2,19 @@
|
||||
#
|
||||
|
||||
# See comments in include/table_aggregate_setup.inc
|
||||
#
|
||||
# Notes about the optimizer and query plans:
|
||||
# The following statement
|
||||
# SELECT * from t1 where b=5;
|
||||
# can be executed either:
|
||||
# - by using the index "index_b" on column b
|
||||
# - by using a full table scan and the where clause.
|
||||
# Which plan is used can be unpredictable.
|
||||
# To ensure that the index is really used,
|
||||
# so that table io against the index is measured,
|
||||
# the payload in this test uses:
|
||||
# SELECT * from t1 force index(index_b) where b=5;
|
||||
#
|
||||
|
||||
# Display the current setup used
|
||||
|
||||
@ -29,10 +42,8 @@ truncate performance_schema.events_waits_summary_global_by_event_name;
|
||||
truncate performance_schema.events_waits_history_long;
|
||||
|
||||
# Check the configuration is ok
|
||||
show variables where
|
||||
`Variable_name` != "performance_schema_max_statement_classes" and
|
||||
`Variable_name` like "performance_schema%";
|
||||
show status like "performance_schema%";
|
||||
show global variables like "performance_schema%";
|
||||
show global status like "performance_schema%";
|
||||
|
||||
echo "================== Step 1 ==================";
|
||||
call dump_thread();
|
||||
@ -86,15 +97,36 @@ update test.t1 set d=d+1 where a=101;
|
||||
update test.t2 set d=d+1 where a=101;
|
||||
update test.t3 set d=d+1 where a=101;
|
||||
# select with index
|
||||
select * from test.t1 where b=5;
|
||||
select * from test.t2 where b=5;
|
||||
select * from test.t3 where b=5;
|
||||
select * from test.t1 force index(index_b) where b=5;
|
||||
select * from test.t2 force index(index_b) where b=5;
|
||||
select * from test.t3 force index(index_b) where b=5;
|
||||
|
||||
echo "================== con1 marker ==================";
|
||||
|
||||
--connection default
|
||||
|
||||
echo "================== Step 3 ==================";
|
||||
echo "================== Step 3-A ==================";
|
||||
call dump_thread();
|
||||
execute dump_waits_account;
|
||||
execute dump_waits_user;
|
||||
execute dump_waits_host;
|
||||
execute dump_waits_global;
|
||||
execute dump_waits_history;
|
||||
execute dump_waits_index_io;
|
||||
execute dump_waits_table_io;
|
||||
execute dump_waits_table_lock;
|
||||
execute dump_objects_summary;
|
||||
|
||||
--connection con1
|
||||
|
||||
# This cause aggregation, so that index names are finally recorded
|
||||
flush tables;
|
||||
|
||||
echo "================== con1 FLUSH ==================";
|
||||
|
||||
--connection default
|
||||
|
||||
echo "================== Step 3-B ==================";
|
||||
call dump_thread();
|
||||
execute dump_waits_account;
|
||||
execute dump_waits_user;
|
||||
@ -147,9 +179,9 @@ update test.t1 set d=d+1 where a=201;
|
||||
update test.t2 set d=d+1 where a=201;
|
||||
update test.t3 set d=d+1 where a=201;
|
||||
# select with index
|
||||
select * from test.t1 where b=5;
|
||||
select * from test.t2 where b=5;
|
||||
select * from test.t3 where b=5;
|
||||
select * from test.t1 force index(index_b) where b=5;
|
||||
select * from test.t2 force index(index_b) where b=5;
|
||||
select * from test.t3 force index(index_b) where b=5;
|
||||
|
||||
echo "================== con2 marker ==================";
|
||||
|
||||
@ -204,9 +236,9 @@ update test.t1 set d=d+1 where a=301;
|
||||
update test.t2 set d=d+1 where a=301;
|
||||
update test.t3 set d=d+1 where a=301;
|
||||
# select with index
|
||||
select * from test.t1 where b=5;
|
||||
select * from test.t2 where b=5;
|
||||
select * from test.t3 where b=5;
|
||||
select * from test.t1 force index(index_b) where b=5;
|
||||
select * from test.t2 force index(index_b) where b=5;
|
||||
select * from test.t3 force index(index_b) where b=5;
|
||||
|
||||
echo "================== con3 marker ==================";
|
||||
|
||||
@ -261,9 +293,9 @@ update test.t1 set d=d+1 where a=401;
|
||||
update test.t2 set d=d+1 where a=401;
|
||||
update test.t3 set d=d+1 where a=401;
|
||||
# select with index
|
||||
select * from test.t1 where b=5;
|
||||
select * from test.t2 where b=5;
|
||||
select * from test.t3 where b=5;
|
||||
select * from test.t1 force index(index_b) where b=5;
|
||||
select * from test.t2 force index(index_b) where b=5;
|
||||
select * from test.t3 force index(index_b) where b=5;
|
||||
|
||||
echo "================== con4 marker ==================";
|
||||
|
||||
@ -510,5 +542,5 @@ execute dump_waits_table_lock;
|
||||
execute dump_objects_summary;
|
||||
|
||||
# On test failures, may help to track the root cause
|
||||
show status like "performance_schema%";
|
||||
show global status like "performance_schema%";
|
||||
|
||||
|
@ -71,10 +71,13 @@
|
||||
--source ../include/wait_for_pfs_thread_count.inc
|
||||
|
||||
--disable_query_log
|
||||
set @orig_sql_mode= @@sql_mode;
|
||||
set sql_mode= (select replace(@@sql_mode,'NO_AUTO_CREATE_USER',''));
|
||||
grant ALL on *.* to user1@localhost;
|
||||
grant ALL on *.* to user2@localhost;
|
||||
grant ALL on *.* to user3@localhost;
|
||||
grant ALL on *.* to user4@localhost;
|
||||
set sql_mode= @orig_sql_mode;
|
||||
|
||||
flush privileges;
|
||||
|
||||
@ -218,7 +221,9 @@ prepare dump_waits_global from
|
||||
order by event_name;";
|
||||
|
||||
prepare dump_waits_history from
|
||||
"select event_name, count(event_name), object_type, object_schema, object_name
|
||||
"select event_name,
|
||||
sum(if(number_of_bytes is null, 1, number_of_bytes)) as 'count(event_name)',
|
||||
object_type, object_schema, object_name
|
||||
from performance_schema.events_waits_history_long
|
||||
where event_name in
|
||||
(\'wait/io/table/sql/handler\',
|
||||
@ -250,7 +255,7 @@ prepare dump_waits_table_lock from
|
||||
count_read_normal, count_read_with_shared_locks,
|
||||
count_read_high_priority, count_read_no_insert,
|
||||
count_read_external,
|
||||
count_write_delayed, count_write_low_priority,
|
||||
count_write_low_priority,
|
||||
count_write_external
|
||||
from performance_schema.table_lock_waits_summary_by_table
|
||||
where object_type='TABLE' and object_schema='test'
|
||||
|
@ -14,7 +14,7 @@ eval select event_name,
|
||||
order by thread_id, event_id;
|
||||
|
||||
# In case of failures, this will tell if table io are lost.
|
||||
show status like 'performance_schema_%';
|
||||
show global status like 'performance_schema_%';
|
||||
|
||||
# Cleanup
|
||||
truncate performance_schema.events_waits_history_long;
|
||||
|
12
mysql-test/suite/perfschema/include/transaction_cleanup.inc
Normal file
12
mysql-test/suite/perfschema/include/transaction_cleanup.inc
Normal file
@ -0,0 +1,12 @@
|
||||
# Tests for the performance schema
|
||||
|
||||
# ==========================================
|
||||
# HELPER include/transaction_cleanup.inc
|
||||
# ==========================================
|
||||
|
||||
DROP PROCEDURE clear_transaction_tables;
|
||||
DROP PROCEDURE clear_transaction_history;
|
||||
DROP PROCEDURE clear_statement_history;
|
||||
DROP PROCEDURE clear_history;
|
||||
DROP PROCEDURE transaction_verifier;
|
||||
|
@ -0,0 +1,146 @@
|
||||
# Tests for the performance schema
|
||||
|
||||
# =====================================================
|
||||
# HELPER include/transaction_nested_events_verifier.inc
|
||||
# =====================================================
|
||||
|
||||
--connection default
|
||||
--disable_query_log
|
||||
|
||||
# Poll till the activity of the actor connection con1 caused by the last
|
||||
# statement issued has finished.
|
||||
let $wait_timeout= 10;
|
||||
let $wait_condition=
|
||||
SELECT COUNT(*) > 0 FROM performance_schema.threads
|
||||
WHERE THREAD_ID = @con1_thread_id
|
||||
AND (PROCESSLIST_STATE = 'Sleep' OR PROCESSLIST_STATE IS NULL)
|
||||
AND PROCESSLIST_INFO IS NULL;
|
||||
--source include/wait_condition.inc
|
||||
if(!$success)
|
||||
{
|
||||
--echo The activity of connection con1 did not finish.
|
||||
SELECT thread_id , PROCESSLIST_id, PROCESSLIST_STATE, PROCESSLIST_INFO
|
||||
FROM performance_schema.threads
|
||||
WHERE thread_id = @con1_thread_id;
|
||||
--echo Abort.
|
||||
exit;
|
||||
}
|
||||
|
||||
--echo #========================================================================
|
||||
--echo # Verify
|
||||
--echo #========================================================================
|
||||
|
||||
SELECT event_id from performance_schema.events_transactions_history_long
|
||||
where (THREAD_ID = @con1_thread_id)
|
||||
order by event_id limit 1
|
||||
into @base_tx_event_id;
|
||||
|
||||
SELECT event_id from performance_schema.events_statements_history_long
|
||||
where (THREAD_ID = @con1_thread_id)
|
||||
order by event_id limit 1
|
||||
into @base_stmt_event_id;
|
||||
|
||||
select if(@base_tx_event_id < @base_stmt_event_id,
|
||||
@base_tx_event_id - 1,
|
||||
@base_stmt_event_id - 1)
|
||||
into @base_event_id;
|
||||
|
||||
# Debug helpers
|
||||
# set @base_event_id = 0;
|
||||
# select @base_tx_event_id, @base_stmt_event_id, @base_event_id;
|
||||
|
||||
--echo EVENTS_TRANSACTIONS_CURRENT
|
||||
--echo
|
||||
|
||||
--replace_column 1 thread_id
|
||||
|
||||
SELECT THREAD_ID,
|
||||
LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
|
||||
LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
|
||||
RPAD(EVENT_NAME, 11, ' ') 'EVENT_NAME ',
|
||||
RPAD(STATE, 11, ' ') 'STATE ',
|
||||
RPAD(ACCESS_MODE, 11, ' ') ACCESS_MODE,
|
||||
RPAD(ISOLATION_LEVEL, 16, ' ') 'ISOLATION_LEVEL ',
|
||||
RPAD(AUTOCOMMIT, 4, ' ') AUTO,
|
||||
LPAD(NESTING_EVENT_ID - @base_event_id, 19, ' ') as R_NESTING_EVENT_ID,
|
||||
RPAD(IFNULL(NESTING_EVENT_TYPE, 'NULL'), 18, ' ') NESTING_EVENT_TYPE
|
||||
FROM performance_schema.events_transactions_current
|
||||
WHERE ((THREAD_ID = @con1_thread_id) OR (@all_threads = 1))
|
||||
ORDER BY thread_id, event_id;
|
||||
|
||||
--echo
|
||||
--echo EVENTS_TRANSACTIONS_HISTORY_LONG
|
||||
--echo
|
||||
|
||||
--replace_column 1 thread_id
|
||||
|
||||
SELECT THREAD_ID,
|
||||
LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
|
||||
LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
|
||||
RPAD(EVENT_NAME, 11, ' ') 'EVENT_NAME ',
|
||||
RPAD(STATE, 11, ' ') 'STATE ',
|
||||
RPAD(ACCESS_MODE, 11, ' ') ACCESS_MODE,
|
||||
RPAD(ISOLATION_LEVEL, 16, ' ') 'ISOLATION_LEVEL ',
|
||||
RPAD(AUTOCOMMIT, 4, ' ') AUTO,
|
||||
LPAD(NESTING_EVENT_ID - @base_event_id, 19, ' ') as R_NESTING_EVENT_ID,
|
||||
RPAD(IFNULL(NESTING_EVENT_TYPE, 'NULL'), 18, ' ') NESTING_EVENT_TYPE
|
||||
FROM performance_schema.events_transactions_history_long
|
||||
WHERE ((THREAD_ID = @con1_thread_id) OR (@all_threads = 1))
|
||||
ORDER BY thread_id, event_id;
|
||||
|
||||
--echo
|
||||
--echo EVENTS_STATEMENTS_HISTORY_LONG
|
||||
--echo
|
||||
|
||||
--replace_column 1 thread_id
|
||||
|
||||
SELECT THREAD_ID,
|
||||
LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
|
||||
LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
|
||||
RPAD(EVENT_NAME, 30, ' ') 'EVENT_NAME ',
|
||||
RPAD(IFNULL(object_name, 'NULL'), 12, ' ') 'OBJECT_NAME ',
|
||||
LPAD(IFNULL(NESTING_EVENT_ID - @base_event_id, 'NULL'), 19, ' ') as R_NESTING_EVENT_ID,
|
||||
RPAD(IFNULL(NESTING_EVENT_TYPE, 'NULL'), 18, ' ') NESTING_EVENT_TYPE,
|
||||
LPAD(NESTING_EVENT_LEVEL, 5, ' ') LEVEL,
|
||||
SQL_TEXT
|
||||
FROM performance_schema.events_statements_history_long
|
||||
WHERE ((THREAD_ID = @con1_thread_id) OR (@all_threads = 1))
|
||||
ORDER BY thread_id, event_id;
|
||||
|
||||
--echo
|
||||
--echo ## Combined statement and transaction event history ordered by event id
|
||||
--echo
|
||||
--echo EVENTS_STATEMENTS_HISTORY_LONG + EVENTS_TRANSACTIONS_HISTORY_LONG
|
||||
--echo
|
||||
|
||||
--replace_column 1 thread_id
|
||||
|
||||
SELECT THREAD_ID,
|
||||
LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
|
||||
LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
|
||||
RPAD(EVENT_NAME, 25, ' ') 'EVENT_NAME ',
|
||||
LPAD(NESTING_EVENT_ID - @base_event_id, 19, ' ') as R_NESTING_EVENT_ID,
|
||||
RPAD(IFNULL(NESTING_EVENT_TYPE, 'NULL'), 18, ' ') NESTING_EVENT_TYPE,
|
||||
'<transaction started>' AS SQL_TXT
|
||||
FROM performance_schema.events_transactions_history_long t
|
||||
WHERE (t.thread_id = @con1_thread_id)
|
||||
UNION
|
||||
SELECT THREAD_ID,
|
||||
LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
|
||||
LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
|
||||
RPAD(EVENT_NAME, 25, ' ') 'EVENT_NAME ',
|
||||
LPAD(IFNULL(NESTING_EVENT_ID - @base_event_id, 'NULL'), 19, ' ') as R_NESTING_EVENT_ID,
|
||||
RPAD(IFNULL(NESTING_EVENT_TYPE, 'NULL'), 18, ' ') NESTING_EVENT_TYPE,
|
||||
SQL_TEXT
|
||||
FROM performance_schema.events_statements_history_long s
|
||||
WHERE ((s.thread_id = @con1_thread_id) OR (@all_threads = 1))
|
||||
ORDER BY thread_id, r_event_id;
|
||||
|
||||
--echo
|
||||
--echo ## Clear statement and transaction history
|
||||
--echo CALL test.clear_history();
|
||||
CALL test.clear_history();
|
||||
--enable_query_log
|
||||
--echo ## Reset db.t1
|
||||
DELETE FROM db.t1;
|
||||
--echo
|
231
mysql-test/suite/perfschema/include/transaction_setup.inc
Normal file
231
mysql-test/suite/perfschema/include/transaction_setup.inc
Normal file
@ -0,0 +1,231 @@
|
||||
# Tests for the performance schema
|
||||
|
||||
# ==========================================
|
||||
# HELPER include/transaction_setup.inc
|
||||
# ==========================================
|
||||
|
||||
#
|
||||
# UTILITY QUERIES
|
||||
#
|
||||
let $get_thread_id=
|
||||
SELECT thread_id INTO @my_thread_id
|
||||
FROM performance_schema.threads
|
||||
WHERE processlist_id = connection_id();
|
||||
|
||||
let $disable_instruments=
|
||||
UPDATE performance_schema.setup_instruments
|
||||
SET enabled='no', timed='no'
|
||||
WHERE name IN ('transaction');
|
||||
|
||||
let $enable_instruments=
|
||||
UPDATE performance_schema.setup_instruments
|
||||
SET enabled='yes', timed='yes'
|
||||
WHERE name IN ('transaction');
|
||||
|
||||
let $def_count = -1;
|
||||
|
||||
--disable_warnings
|
||||
DROP PROCEDURE IF EXISTS clear_transaction_tables;
|
||||
--enable_warnings
|
||||
|
||||
--disable_result_log
|
||||
|
||||
DELIMITER $$;
|
||||
CREATE PROCEDURE clear_transaction_tables()
|
||||
BEGIN
|
||||
truncate table performance_schema.events_transactions_current;
|
||||
truncate table performance_schema.events_transactions_history;
|
||||
truncate table performance_schema.events_transactions_history_long;
|
||||
truncate table performance_schema.events_transactions_summary_by_thread_by_event_name;
|
||||
truncate table performance_schema.events_transactions_summary_by_account_by_event_name;
|
||||
truncate table performance_schema.events_transactions_summary_by_host_by_event_name;
|
||||
truncate table performance_schema.events_transactions_summary_by_user_by_event_name;
|
||||
truncate table performance_schema.events_transactions_summary_global_by_event_name;
|
||||
END$$
|
||||
|
||||
CREATE PROCEDURE clear_transaction_history()
|
||||
BEGIN
|
||||
truncate table performance_schema.events_transactions_current;
|
||||
truncate table performance_schema.events_transactions_history;
|
||||
truncate table performance_schema.events_transactions_history_long;
|
||||
END$$
|
||||
|
||||
CREATE PROCEDURE clear_statement_history()
|
||||
BEGIN
|
||||
truncate table performance_schema.events_statements_current;
|
||||
truncate table performance_schema.events_statements_history;
|
||||
truncate table performance_schema.events_statements_history_long;
|
||||
END$$
|
||||
|
||||
CREATE PROCEDURE clear_history()
|
||||
BEGIN
|
||||
truncate table performance_schema.events_statements_current;
|
||||
truncate table performance_schema.events_statements_history;
|
||||
truncate table performance_schema.events_statements_history_long;
|
||||
truncate table performance_schema.events_transactions_current;
|
||||
truncate table performance_schema.events_transactions_history;
|
||||
truncate table performance_schema.events_transactions_history_long;
|
||||
END$$
|
||||
|
||||
CREATE PROCEDURE transaction_verifier(IN i_table INT,
|
||||
IN i_thread_id INT,
|
||||
IN i_event_name VARCHAR(64),
|
||||
IN i_state VARCHAR(32),
|
||||
IN i_xid_format_id INT,
|
||||
IN i_xid_gtrid VARCHAR(130),
|
||||
IN i_xid_bqual VARCHAR(130),
|
||||
IN i_xa_state VARCHAR(64),
|
||||
IN i_gtid VARCHAR(64),
|
||||
IN i_access_mode VARCHAR(32),
|
||||
IN i_isolation_level VARCHAR(64),
|
||||
IN i_autocommit VARCHAR(16),
|
||||
IN i_savepoints INT,
|
||||
IN i_rb_savepoint INT,
|
||||
IN i_rel_savepoint INT,
|
||||
IN i_expected INT)
|
||||
BEGIN
|
||||
DECLARE table_name VARCHAR(64);
|
||||
SET @thread_id = i_thread_id;
|
||||
SET @event_id = 0;
|
||||
SET @event_name = i_event_name;
|
||||
SET @state = i_state;
|
||||
SET @xid_format_id = i_xid_format_id;
|
||||
SET @xid_gtrid = i_xid_gtrid;
|
||||
SET @xid_bqual = i_xid_bqual;
|
||||
SET @xa_state = i_xa_state;
|
||||
SET @gtid = i_gtid;
|
||||
SET @access_mode = i_access_mode;
|
||||
SET @isolation_level = i_isolation_level;
|
||||
SET @autocommit = i_autocommit;
|
||||
SET @savepoints = i_savepoints;
|
||||
SET @rb_savepoint = i_rb_savepoint;
|
||||
SET @rel_savepoint = i_rel_savepoint;
|
||||
SET @expected = i_expected;
|
||||
|
||||
#
|
||||
# Build verification query based upon input parameters
|
||||
#
|
||||
|
||||
IF i_table = 0 THEN
|
||||
SET table_name = 'performance_schema.events_transactions_current';
|
||||
ELSEIF i_table = 1 THEN
|
||||
SET table_name = 'performance_schema.events_transactions_history';
|
||||
ELSEIF i_table = 2 THEN
|
||||
SET table_name = 'performance_schema.events_transactions_history_long';
|
||||
ELSE
|
||||
SET table_name = 'performance_schema.events_transactions_history';
|
||||
END IF;
|
||||
|
||||
SET @query = CONCAT('SELECT COUNT(*) INTO @actual FROM ', table_name, ' WHERE');
|
||||
|
||||
IF i_thread_id != 0 THEN
|
||||
SET @query = CONCAT(@query, ' (thread_id = @thread_id)');
|
||||
END IF;
|
||||
IF i_event_name != '' THEN
|
||||
SET @query = CONCAT(@query, ' AND (event_name = @event_name)');
|
||||
END IF;
|
||||
IF i_state != '' THEN
|
||||
SET @query = CONCAT(@query, ' AND (state = @state)');
|
||||
END IF;
|
||||
IF i_xid_format_id != '' THEN
|
||||
SET @query = CONCAT(@query, ' AND (xid_format_id = @xid_format_id)');
|
||||
END IF;
|
||||
IF i_xid_gtrid != '' THEN
|
||||
SET @query = CONCAT(@query, ' AND (xid_gtrid = @xid_gtrid)');
|
||||
END IF;
|
||||
IF i_xid_bqual != '' THEN
|
||||
SET @query = CONCAT(@query, ' AND (xid_bqual = @xid_bqual)');
|
||||
END IF;
|
||||
IF i_xa_state != '' THEN
|
||||
SET @query = CONCAT(@query, ' AND (xa_state = @xa_state)');
|
||||
END IF;
|
||||
IF i_gtid = 'NULL' THEN
|
||||
SET @query = CONCAT(@query, ' AND (gtid IS NULL)');
|
||||
ELSEIF i_gtid != '' THEN
|
||||
SET @query = CONCAT(@query, ' AND (gtid = @gtid)');
|
||||
END IF;
|
||||
IF i_access_mode != '' THEN
|
||||
SET @query = CONCAT(@query, ' AND (access_mode = @access_mode)');
|
||||
END IF;
|
||||
IF i_isolation_level != '' THEN
|
||||
SET @query = CONCAT(@query, ' AND (isolation_level = @isolation_level)');
|
||||
END IF;
|
||||
IF i_autocommit != '' THEN
|
||||
SET @query = CONCAT(@query, ' AND (autocommit = @autocommit)');
|
||||
END IF;
|
||||
IF i_savepoints != 0 THEN
|
||||
SET @query = CONCAT(@query, ' AND (number_of_savepoints = @savepoints)');
|
||||
END IF;
|
||||
IF i_rb_savepoint != 0 THEN
|
||||
SET @query = CONCAT(@query, ' AND (number_of_rollback_to_savepoint = @rb_savepoint)');
|
||||
END IF;
|
||||
IF i_rel_savepoint != 0 THEN
|
||||
SET @query = CONCAT(@query, ' AND (number_of_release_savepoint = @rel_savepoint)');
|
||||
END IF;
|
||||
|
||||
SET @query = CONCAT(@query, ' ORDER BY event_id;');
|
||||
|
||||
## DEBUG ## SELECT * FROM performance_schema.events_transactions_history ORDER BY event_id;
|
||||
## SELECT @query AS "QUERY";
|
||||
PREPARE stmt1 FROM @query;
|
||||
EXECUTE stmt1;
|
||||
DEALLOCATE PREPARE stmt1;
|
||||
|
||||
SELECT LPAD(@actual, 6, ' ') AS "ACTUAL", LPAD(@expected, 8, ' ') AS "EXPECTED";
|
||||
|
||||
IF @actual != @expected THEN
|
||||
SELECT "" AS "ERROR: Row count mismatch";
|
||||
SELECT @query AS "VERIFIER QUERY:";
|
||||
SELECT "";
|
||||
|
||||
SET @columns = ' LPAD(@thread_id, 9, " ") AS thread_id,';
|
||||
SET @columns = CONCAT(@columns, ' LPAD(@event_id, 10, " ") AS "..event_id",');
|
||||
SET @columns = CONCAT(@columns, ' RPAD(@event_name, 11, " ") AS "event_name ",');
|
||||
SET @columns = CONCAT(@columns, ' RPAD(@state, 11, " ") AS "state ",');
|
||||
SET @columns = CONCAT(@columns, ' RPAD(@xid_format_id, 15, " ") AS "xid_format_id ",');
|
||||
SET @columns = CONCAT(@columns, ' RPAD(@xid_gtrid, 15, " ") AS "xid_gtrid ",');
|
||||
SET @columns = CONCAT(@columns, ' RPAD(@xid_bqual, 15, " ") AS "xid_bqual ",');
|
||||
SET @columns = CONCAT(@columns, ' RPAD(@xa_state, 12, " ") AS "xa_state ",');
|
||||
SET @columns = CONCAT(@columns, ' RPAD(@gtid, 38, " ") AS "gtid ",');
|
||||
SET @columns = CONCAT(@columns, ' RPAD(@access_mode, 11, " ") AS access_mode,');
|
||||
SET @columns = CONCAT(@columns, ' RPAD(@isolation_level, 16, " ") AS "isolation_level ",');
|
||||
SET @columns = CONCAT(@columns, ' RPAD(@autocommit, 10, " ") AS autocommit,');
|
||||
SET @columns = CONCAT(@columns, ' LPAD(@savepoints, 10, " ") AS savepoints,');
|
||||
SET @columns = CONCAT(@columns, ' LPAD(@rb_savepoint, 21, " ") AS rollback_to_savepoint,');
|
||||
SET @columns = CONCAT(@columns, ' LPAD(@rel_savepoint, 17, " ") AS release_savepoint');
|
||||
SET @query2 = CONCAT('SELECT', ' LPAD(@expected, 13, " ") AS ROWS_EXPECTED, ', @columns, ';');
|
||||
# SET @query2 = CONCAT('SELECT " " AS EXPECTED, ', @columns, ';');
|
||||
PREPARE stmt2 FROM @query2;
|
||||
EXECUTE stmt2;
|
||||
DEALLOCATE PREPARE stmt2;
|
||||
|
||||
SET @columns = ' LPAD(thread_id, 9, " ") AS thread_id,';
|
||||
SET @columns = CONCAT(@columns, ' LPAD(event_id, 10, " ") AS "..event_id",');
|
||||
SET @columns = CONCAT(@columns, ' RPAD(event_name, 11, " ") AS "event_name ",');
|
||||
SET @columns = CONCAT(@columns, ' RPAD(state, 11, " ") AS "state ",');
|
||||
SET @columns = CONCAT(@columns, ' RPAD(IFNULL(xid_format_id, "NULL"), 15, " ") AS "xid_format_id ",');
|
||||
SET @columns = CONCAT(@columns, ' RPAD(IFNULL(xid_gtrid, "NULL"), 15, " ") AS "xid_gtrid ",');
|
||||
SET @columns = CONCAT(@columns, ' RPAD(IFNULL(xid_bqual, "NULL"), 15, " ") AS "xid_bqual ",');
|
||||
SET @columns = CONCAT(@columns, ' RPAD(IFNULL(xa_state, "NULL"), 12, " ") AS "xa_state ",');
|
||||
SET @columns = CONCAT(@columns, ' RPAD(IFNULL(gtid, "NULL"), 38, " ") AS "gtid ",');
|
||||
SET @columns = CONCAT(@columns, ' RPAD(access_mode, 11, " ") AS access_mode,');
|
||||
SET @columns = CONCAT(@columns, ' RPAD(isolation_level, 16, " ") AS "isolation_level ",');
|
||||
SET @columns = CONCAT(@columns, ' RPAD(autocommit, 10, " ") AS autocommit,');
|
||||
SET @columns = CONCAT(@columns, ' LPAD(number_of_savepoints, 10, " ") AS savepoints,');
|
||||
SET @columns = CONCAT(@columns, ' LPAD(number_of_rollback_to_savepoint, 21, " ") AS rollback_to_savepoint,');
|
||||
SET @columns = CONCAT(@columns, ' LPAD(number_of_release_savepoint, 17, " ") AS release_savepoint');
|
||||
# SET @query3 = CONCAT('SELECT " " AS "ACTUAL ", ', @columns, ' FROM ', table_name, ' ORDER BY event_id;');
|
||||
SET @query3 = CONCAT('SELECT', ' LPAD(@actual, 13, " ") AS "ROWS_ACTUAL ",', @columns, ' FROM ', table_name, ' ORDER BY event_id;');
|
||||
PREPARE stmt3 FROM @query3;
|
||||
EXECUTE stmt3;
|
||||
DEALLOCATE PREPARE stmt3;
|
||||
|
||||
END IF;
|
||||
END$$
|
||||
|
||||
DELIMITER ;$$
|
||||
|
||||
--enable_result_log
|
||||
|
||||
|
||||
|
@ -3,7 +3,6 @@
|
||||
#
|
||||
|
||||
--source include/count_sessions.inc
|
||||
--error 1
|
||||
--exec $MYSQL_UPGRADE --skip-verbose --force > $out_file 2> $err_file
|
||||
--source include/wait_until_count_sessions.inc
|
||||
|
||||
@ -14,3 +13,4 @@
|
||||
--error 0,1
|
||||
--remove_file $err_file
|
||||
|
||||
--source include/mysql_upgrade_cleanup.inc
|
@ -14,7 +14,7 @@ let $wait_condition=
|
||||
# Because instrumentation is optional, we use "<=" here.
|
||||
|
||||
let $wait_condition=
|
||||
select count(*) <= 1 from performance_schema.threads
|
||||
select count(*) <= 2 from performance_schema.threads
|
||||
where `TYPE`='FOREGROUND';
|
||||
--source include/wait_condition.inc
|
||||
|
||||
|
@ -10,10 +10,13 @@ where table_schema='performance_schema';
|
||||
update t2 set test_name= replace(test_name, "events_waits_summary_", "ews_");
|
||||
update t2 set test_name= replace(test_name, "events_stages_summary_", "esgs_");
|
||||
update t2 set test_name= replace(test_name, "events_statements_summary_", "esms_");
|
||||
update t2 set test_name= replace(test_name, "events_transactions_summary_", "ets_");
|
||||
update t2 set test_name= replace(test_name, "file_summary_", "fs_");
|
||||
update t2 set test_name= replace(test_name, "objects_summary_", "os_");
|
||||
update t2 set test_name= replace(test_name, "table_io_waits_summary_", "tiws_");
|
||||
update t2 set test_name= replace(test_name, "table_lock_waits_summary_", "tlws_");
|
||||
update t2 set test_name= replace(test_name, "memory_summary_", "mems_");
|
||||
update t2 set test_name= replace(test_name, "user_variables_", "uvar_");
|
||||
delete from t2 where t2.test_name in (select t1.test_name from t1);
|
||||
select test_name as `MISSING DDL/DML TESTS` from t2;
|
||||
MISSING DDL/DML TESTS
|
||||
|
79
mysql-test/suite/perfschema/r/alter_table_progress.result
Normal file
79
mysql-test/suite/perfschema/r/alter_table_progress.result
Normal file
@ -0,0 +1,79 @@
|
||||
drop table if exists t1;
|
||||
create table t1(a int) engine = myisam;
|
||||
insert into t1 values (1), (2), (3), (4), (5);
|
||||
update performance_schema.threads
|
||||
set instrumented = 'NO'
|
||||
where processlist_id = connection_id();
|
||||
truncate table performance_schema.events_statements_history_long;
|
||||
truncate table performance_schema.events_stages_history_long;
|
||||
SET DEBUG_SYNC='RESET';
|
||||
SET DEBUG_SYNC='copy_data_between_tables_before SIGNAL found_row WAIT_FOR wait_row EXECUTE 5';
|
||||
ALTER TABLE t1 engine = innodb;;
|
||||
SET DEBUG_SYNC='now WAIT_FOR found_row';
|
||||
select event_id from performance_schema.events_statements_current
|
||||
where thread_id = @con1_thread_id into @con1_stmt_id;
|
||||
select EVENT_NAME, WORK_COMPLETED, WORK_ESTIMATED
|
||||
from performance_schema.events_stages_current
|
||||
where (thread_id = @con1_thread_id);
|
||||
EVENT_NAME WORK_COMPLETED WORK_ESTIMATED
|
||||
stage/sql/copy to tmp table 0 5
|
||||
SET DEBUG_SYNC='now SIGNAL wait_row';
|
||||
SET DEBUG_SYNC='now WAIT_FOR found_row';
|
||||
select EVENT_NAME, WORK_COMPLETED, WORK_ESTIMATED
|
||||
from performance_schema.events_stages_current
|
||||
where (thread_id = @con1_thread_id);
|
||||
EVENT_NAME WORK_COMPLETED WORK_ESTIMATED
|
||||
stage/sql/copy to tmp table 1 5
|
||||
SET DEBUG_SYNC='now SIGNAL wait_row';
|
||||
SET DEBUG_SYNC='now WAIT_FOR found_row';
|
||||
select EVENT_NAME, WORK_COMPLETED, WORK_ESTIMATED
|
||||
from performance_schema.events_stages_current
|
||||
where (thread_id = @con1_thread_id);
|
||||
EVENT_NAME WORK_COMPLETED WORK_ESTIMATED
|
||||
stage/sql/copy to tmp table 2 5
|
||||
SET DEBUG_SYNC='now SIGNAL wait_row';
|
||||
SET DEBUG_SYNC='now WAIT_FOR found_row';
|
||||
select EVENT_NAME, WORK_COMPLETED, WORK_ESTIMATED
|
||||
from performance_schema.events_stages_current
|
||||
where (thread_id = @con1_thread_id);
|
||||
EVENT_NAME WORK_COMPLETED WORK_ESTIMATED
|
||||
stage/sql/copy to tmp table 3 5
|
||||
SET DEBUG_SYNC='now SIGNAL wait_row';
|
||||
SET DEBUG_SYNC='now WAIT_FOR found_row';
|
||||
select EVENT_NAME, WORK_COMPLETED, WORK_ESTIMATED
|
||||
from performance_schema.events_stages_current
|
||||
where (thread_id = @con1_thread_id);
|
||||
EVENT_NAME WORK_COMPLETED WORK_ESTIMATED
|
||||
stage/sql/copy to tmp table 4 5
|
||||
SET DEBUG_SYNC='now SIGNAL wait_row';
|
||||
select "After payload";
|
||||
After payload
|
||||
After payload
|
||||
Dumping ALTER TABLE stages
|
||||
select EVENT_NAME, WORK_COMPLETED, WORK_ESTIMATED
|
||||
from performance_schema.events_stages_history_long
|
||||
where (thread_id = @con1_thread_id)
|
||||
and (nesting_event_id = @con1_stmt_id)
|
||||
order by thread_id, event_id;
|
||||
EVENT_NAME WORK_COMPLETED WORK_ESTIMATED
|
||||
stage/sql/starting NULL NULL
|
||||
stage/sql/checking permissions NULL NULL
|
||||
stage/sql/checking permissions NULL NULL
|
||||
stage/sql/init NULL NULL
|
||||
stage/sql/Opening tables NULL NULL
|
||||
stage/sql/setup NULL NULL
|
||||
stage/sql/creating table NULL NULL
|
||||
stage/sql/After create NULL NULL
|
||||
stage/sql/System lock NULL NULL
|
||||
stage/sql/copy to tmp table 5 5
|
||||
stage/sql/rename result table NULL NULL
|
||||
stage/sql/end NULL NULL
|
||||
stage/sql/query end NULL NULL
|
||||
stage/sql/closing tables NULL NULL
|
||||
stage/sql/freeing items NULL NULL
|
||||
stage/sql/cleaning up NULL NULL
|
||||
SET DEBUG_SYNC='RESET';
|
||||
drop table t1;
|
||||
update performance_schema.threads
|
||||
set instrumented = 'YES'
|
||||
where processlist_id = connection_id();
|
4
mysql-test/suite/perfschema/r/bad_option.result
Normal file
4
mysql-test/suite/perfschema/r/bad_option.result
Normal file
@ -0,0 +1,4 @@
|
||||
# Server start with invalid startup option value 'performance-schema-enabled=maybe' : pass
|
||||
# Server start with ambigous startup option 'performance-schema-max_=12' : pass
|
||||
# Server start with invalid startup option '--performance-schema-unknown_99' : pass
|
||||
# Server start with invalid startup option value '--datadir=bad_option_h_param' : pass
|
@ -1,2 +0,0 @@
|
||||
Found: unknown variable 'performance-schema-enabled=maybe'
|
||||
Found: Aborting
|
@ -1 +0,0 @@
|
||||
Found: ambiguous option '--performance-schema-max_=12'
|
@ -1,2 +0,0 @@
|
||||
Found: unknown option '-x'
|
||||
Found: Aborting
|
@ -1,2 +0,0 @@
|
||||
Found: Can't change dir to.*bad_option_h_param
|
||||
Found: Aborting
|
@ -1,2 +0,0 @@
|
||||
Found: unknown option '-X'
|
||||
Found: Aborting
|
186
mysql-test/suite/perfschema/r/batch_table_io_func.result
Normal file
186
mysql-test/suite/perfschema/r/batch_table_io_func.result
Normal file
@ -0,0 +1,186 @@
|
||||
UPDATE performance_schema.setup_instruments SET enabled = 'NO', timed = 'YES';
|
||||
UPDATE performance_schema.setup_instruments SET enabled = 'YES'
|
||||
WHERE name in ('wait/io/table/sql/handler',
|
||||
'wait/lock/table/sql/handler');
|
||||
drop procedure if exists before_payload;
|
||||
drop procedure if exists after_payload;
|
||||
create procedure before_payload()
|
||||
begin
|
||||
TRUNCATE TABLE performance_schema.table_io_waits_summary_by_index_usage;
|
||||
TRUNCATE TABLE performance_schema.table_io_waits_summary_by_table;
|
||||
TRUNCATE TABLE performance_schema.events_waits_history_long;
|
||||
TRUNCATE TABLE performance_schema.events_waits_history;
|
||||
TRUNCATE TABLE performance_schema.events_waits_current;
|
||||
end
|
||||
$$
|
||||
create procedure after_payload()
|
||||
begin
|
||||
select count(1) as number_seen,
|
||||
OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME, INDEX_NAME,
|
||||
OPERATION, NUMBER_OF_BYTES
|
||||
from performance_schema.events_waits_history_long
|
||||
where OBJECT_SCHEMA = "test"
|
||||
group by OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME, INDEX_NAME, OPERATION, NUMBER_OF_BYTES;
|
||||
select OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME, INDEX_NAME,
|
||||
COUNT_STAR, COUNT_READ, COUNT_WRITE
|
||||
from performance_schema.table_io_waits_summary_by_index_usage
|
||||
where OBJECT_SCHEMA = "test"
|
||||
order by OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME, INDEX_NAME;
|
||||
select OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME,
|
||||
COUNT_STAR, COUNT_READ, COUNT_WRITE
|
||||
from performance_schema.table_io_waits_summary_by_table
|
||||
where OBJECT_SCHEMA = "test"
|
||||
order by OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME;
|
||||
end
|
||||
$$
|
||||
drop table if exists t1;
|
||||
drop table if exists t2;
|
||||
drop table if exists t3;
|
||||
create table t0(v int);
|
||||
create table t1(id1 int, a int);
|
||||
create table t2(id1 int, id2 int, b int);
|
||||
create table t3(id2 int, id3 int, c int);
|
||||
insert into t0 values
|
||||
(0), (1), (2), (3), (4),
|
||||
(5), (6), (7), (8), (9);
|
||||
insert into t1(id1, a)
|
||||
select v, 100*v from t0;
|
||||
insert into t2(id1, id2, b)
|
||||
select X.v, 10*X.v + Y.v, 100*X.v + 10*Y.v
|
||||
from t0 X, t0 Y;
|
||||
insert into t3(id2, id3, c)
|
||||
select 10*X.v + Y.v, 100*X.v + 10*Y.v + Z.v, 100*X.v + 10*Y.v + Z.v
|
||||
from t0 X, t0 Y, t0 Z;
|
||||
analyze table t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze status OK
|
||||
analyze table t2;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t2 analyze status OK
|
||||
analyze table t3;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t3 analyze status OK
|
||||
select * from t1 order by a;
|
||||
id1 a
|
||||
0 0
|
||||
1 100
|
||||
2 200
|
||||
3 300
|
||||
4 400
|
||||
5 500
|
||||
6 600
|
||||
7 700
|
||||
8 800
|
||||
9 900
|
||||
select * from t2
|
||||
where (b >= 180) and (b <= 220)
|
||||
order by b;
|
||||
id1 id2 b
|
||||
1 18 180
|
||||
1 19 190
|
||||
2 20 200
|
||||
2 21 210
|
||||
2 22 220
|
||||
select * from t3
|
||||
where (c >= 587) and (c <= 612)
|
||||
order by c;
|
||||
id2 id3 c
|
||||
58 587 587
|
||||
58 588 588
|
||||
58 589 589
|
||||
59 590 590
|
||||
59 591 591
|
||||
59 592 592
|
||||
59 593 593
|
||||
59 594 594
|
||||
59 595 595
|
||||
59 596 596
|
||||
59 597 597
|
||||
59 598 598
|
||||
59 599 599
|
||||
60 600 600
|
||||
60 601 601
|
||||
60 602 602
|
||||
60 603 603
|
||||
60 604 604
|
||||
60 605 605
|
||||
60 606 606
|
||||
60 607 607
|
||||
60 608 608
|
||||
60 609 609
|
||||
61 610 610
|
||||
61 611 611
|
||||
61 612 612
|
||||
explain select t1.*, t2.*, t3.*
|
||||
from t1 join t2 using (id1) join t3 using (id2);
|
||||
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 10 100.00 NULL
|
||||
1 SIMPLE t2 NULL ALL NULL NULL NULL NULL 100 10.00 Using where; Using join buffer (Block Nested Loop)
|
||||
1 SIMPLE t3 NULL ALL NULL NULL NULL NULL 1000 10.00 Using where; Using join buffer (Block Nested Loop)
|
||||
Warnings:
|
||||
Note 1003 /* select#1 */ select `test`.`t1`.`id1` AS `id1`,`test`.`t1`.`a` AS `a`,`test`.`t2`.`id1` AS `id1`,`test`.`t2`.`id2` AS `id2`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`id2` AS `id2`,`test`.`t3`.`id3` AS `id3`,`test`.`t3`.`c` AS `c` from `test`.`t1` join `test`.`t2` join `test`.`t3` where ((`test`.`t2`.`id1` = `test`.`t1`.`id1`) and (`test`.`t3`.`id2` = `test`.`t2`.`id2`))
|
||||
call before_payload();
|
||||
select t1.*, t2.*, t3.*
|
||||
from t1 join t2 using (id1) join t3 using (id2);
|
||||
call after_payload();
|
||||
number_seen OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME INDEX_NAME OPERATION NUMBER_OF_BYTES
|
||||
11 TABLE test t1 NULL fetch 1
|
||||
1 TABLE test t1 NULL read external NULL
|
||||
101 TABLE test t2 NULL fetch 1
|
||||
1 TABLE test t2 NULL read external NULL
|
||||
1 TABLE test t3 NULL fetch 1000
|
||||
1 TABLE test t3 NULL read external NULL
|
||||
OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME INDEX_NAME COUNT_STAR COUNT_READ COUNT_WRITE
|
||||
TABLE test t0 NULL 0 0 0
|
||||
TABLE test t1 NULL 11 11 0
|
||||
TABLE test t2 NULL 101 101 0
|
||||
TABLE test t3 NULL 1000 1000 0
|
||||
OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME COUNT_STAR COUNT_READ COUNT_WRITE
|
||||
TABLE test t0 0 0 0
|
||||
TABLE test t1 11 11 0
|
||||
TABLE test t2 101 101 0
|
||||
TABLE test t3 1000 1000 0
|
||||
alter table t1 add unique index(id1);
|
||||
alter table t2 add unique index(id2);
|
||||
alter table t2 add index(id1);
|
||||
alter table t3 add unique index(id3);
|
||||
alter table t3 add index(id2);
|
||||
explain select t1.*, t2.*, t3.*
|
||||
from t1 join t2 using (id1) join t3 using (id2);
|
||||
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE t1 NULL ALL id1 NULL NULL NULL 10 100.00 Using where
|
||||
1 SIMPLE t2 NULL ref id2,id1 id1 5 test.t1.id1 10 100.00 Using where
|
||||
1 SIMPLE t3 NULL ref id2 id2 5 test.t2.id2 10 100.00 NULL
|
||||
Warnings:
|
||||
Note 1003 /* select#1 */ select `test`.`t1`.`id1` AS `id1`,`test`.`t1`.`a` AS `a`,`test`.`t2`.`id1` AS `id1`,`test`.`t2`.`id2` AS `id2`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`id2` AS `id2`,`test`.`t3`.`id3` AS `id3`,`test`.`t3`.`c` AS `c` from `test`.`t1` join `test`.`t2` join `test`.`t3` where ((`test`.`t2`.`id1` = `test`.`t1`.`id1`) and (`test`.`t3`.`id2` = `test`.`t2`.`id2`))
|
||||
call before_payload();
|
||||
select t1.*, t2.*, t3.*
|
||||
from t1 join t2 using (id1) join t3 using (id2);
|
||||
call after_payload();
|
||||
number_seen OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME INDEX_NAME OPERATION NUMBER_OF_BYTES
|
||||
11 TABLE test t1 NULL fetch 1
|
||||
1 TABLE test t1 id1 read external NULL
|
||||
110 TABLE test t2 id1 fetch 1
|
||||
1 TABLE test t2 id2 read external NULL
|
||||
100 TABLE test t3 id2 fetch 10
|
||||
1 TABLE test t3 id3 read external NULL
|
||||
OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME INDEX_NAME COUNT_STAR COUNT_READ COUNT_WRITE
|
||||
TABLE test t0 NULL 0 0 0
|
||||
TABLE test t1 NULL 11 11 0
|
||||
TABLE test t1 id1 0 0 0
|
||||
TABLE test t2 id1 110 110 0
|
||||
TABLE test t2 id2 0 0 0
|
||||
TABLE test t3 id2 1000 1000 0
|
||||
TABLE test t3 id3 0 0 0
|
||||
OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME COUNT_STAR COUNT_READ COUNT_WRITE
|
||||
TABLE test t0 0 0 0
|
||||
TABLE test t1 11 11 0
|
||||
TABLE test t2 110 110 0
|
||||
TABLE test t3 1000 1000 0
|
||||
drop table t0;
|
||||
drop table t1;
|
||||
drop table t2;
|
||||
drop table t3;
|
||||
drop procedure before_payload;
|
||||
drop procedure after_payload;
|
||||
UPDATE performance_schema.setup_instruments SET enabled = 'YES', timed = 'YES';
|
@ -84,19 +84,19 @@ Warnings:
|
||||
Note 1051 Unknown table 'test.marker_multi_delete'
|
||||
use my_replicated_db;
|
||||
insert into performance_schema.setup_actors
|
||||
values ('FOO', 'FOO', 'FOO');
|
||||
values ('FOO', 'FOO', 'FOO', 'YES', 'YES');
|
||||
delete my_tx_table.*, performance_schema.setup_actors.*
|
||||
from my_tx_table, performance_schema.setup_actors
|
||||
where my_tx_table.a != 1000
|
||||
or performance_schema.setup_actors.role='FOO';
|
||||
insert into performance_schema.setup_actors
|
||||
values ('BAR', 'BAR', 'BAR');
|
||||
values ('BAR', 'BAR', 'BAR', 'YES', 'YES');
|
||||
delete my_non_tx_table.*, performance_schema.setup_actors.*
|
||||
from my_non_tx_table, performance_schema.setup_actors
|
||||
where my_non_tx_table.a != 1000
|
||||
or performance_schema.setup_actors.role='BAR';
|
||||
insert into performance_schema.setup_actors
|
||||
values ('BAZ', 'BAZ', 'BAZ');
|
||||
values ('BAZ', 'BAZ', 'BAZ', 'YES', 'YES');
|
||||
delete my_bh_table.*, performance_schema.setup_actors.*
|
||||
from my_bh_table, performance_schema.setup_actors
|
||||
where my_bh_table.a != 1000
|
||||
@ -175,4 +175,4 @@ master-bin.000001 # Query # # COMMIT
|
||||
master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `marker_end` /* generated by server */
|
||||
master-bin.000001 # Query # # drop database my_replicated_db
|
||||
truncate table performance_schema.setup_actors;
|
||||
insert into performance_schema.setup_actors values ('%', '%', '%');
|
||||
insert into performance_schema.setup_actors values ('%', '%', '%', 'YES', 'YES');
|
||||
|
@ -86,19 +86,19 @@ Warnings:
|
||||
Note 1051 Unknown table 'test.marker_multi_delete'
|
||||
use my_replicated_db;
|
||||
insert into performance_schema.setup_actors
|
||||
values ('FOO', 'FOO', 'FOO');
|
||||
values ('FOO', 'FOO', 'FOO', 'YES', 'YES');
|
||||
delete my_tx_table.*, performance_schema.setup_actors.*
|
||||
from my_tx_table, performance_schema.setup_actors
|
||||
where my_tx_table.a != 1000
|
||||
or performance_schema.setup_actors.role='FOO';
|
||||
insert into performance_schema.setup_actors
|
||||
values ('BAR', 'BAR', 'BAR');
|
||||
values ('BAR', 'BAR', 'BAR', 'YES', 'YES');
|
||||
delete my_non_tx_table.*, performance_schema.setup_actors.*
|
||||
from my_non_tx_table, performance_schema.setup_actors
|
||||
where my_non_tx_table.a != 1000
|
||||
or performance_schema.setup_actors.role='BAR';
|
||||
insert into performance_schema.setup_actors
|
||||
values ('BAZ', 'BAZ', 'BAZ');
|
||||
values ('BAZ', 'BAZ', 'BAZ', 'YES', 'YES');
|
||||
delete my_bh_table.*, performance_schema.setup_actors.*
|
||||
from my_bh_table, performance_schema.setup_actors
|
||||
where my_bh_table.a != 1000
|
||||
@ -180,4 +180,4 @@ master-bin.000001 # Query # # COMMIT
|
||||
master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `marker_end` /* generated by server */
|
||||
master-bin.000001 # Query # # drop database my_replicated_db
|
||||
truncate table performance_schema.setup_actors;
|
||||
insert into performance_schema.setup_actors values ('%', '%', '%');
|
||||
insert into performance_schema.setup_actors values ('%', '%', '%', 'YES', 'YES');
|
||||
|
@ -120,19 +120,19 @@ Warnings:
|
||||
Note 1051 Unknown table 'test.marker_multi_delete'
|
||||
use my_replicated_db;
|
||||
insert into performance_schema.setup_actors
|
||||
values ('FOO', 'FOO', 'FOO');
|
||||
values ('FOO', 'FOO', 'FOO', 'YES', 'YES');
|
||||
delete my_tx_table.*, performance_schema.setup_actors.*
|
||||
from my_tx_table, performance_schema.setup_actors
|
||||
where my_tx_table.a != 1000
|
||||
or performance_schema.setup_actors.role='FOO';
|
||||
insert into performance_schema.setup_actors
|
||||
values ('BAR', 'BAR', 'BAR');
|
||||
values ('BAR', 'BAR', 'BAR', 'YES', 'YES');
|
||||
delete my_non_tx_table.*, performance_schema.setup_actors.*
|
||||
from my_non_tx_table, performance_schema.setup_actors
|
||||
where my_non_tx_table.a != 1000
|
||||
or performance_schema.setup_actors.role='BAR';
|
||||
insert into performance_schema.setup_actors
|
||||
values ('BAZ', 'BAZ', 'BAZ');
|
||||
values ('BAZ', 'BAZ', 'BAZ', 'YES', 'YES');
|
||||
delete my_bh_table.*, performance_schema.setup_actors.*
|
||||
from my_bh_table, performance_schema.setup_actors
|
||||
where my_bh_table.a != 1000
|
||||
@ -255,4 +255,4 @@ master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `marker_multi_del
|
||||
master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `marker_end` /* generated by server */
|
||||
master-bin.000001 # Query # # drop database my_replicated_db
|
||||
truncate table performance_schema.setup_actors;
|
||||
insert into performance_schema.setup_actors values ('%', '%', '%');
|
||||
insert into performance_schema.setup_actors values ('%', '%', '%', 'YES', 'YES');
|
||||
|
@ -43,10 +43,10 @@ values ('XXX', 'XXX', 'XXX'),
|
||||
('ZZZ', 'ZZZ', 'ZZZ');
|
||||
select * from performance_schema.setup_actors
|
||||
where user in ('XXX', 'YYY', 'ZZZ') order by user;
|
||||
HOST USER ROLE
|
||||
XXX XXX XXX
|
||||
YYY YYY YYY
|
||||
ZZZ ZZZ ZZZ
|
||||
HOST USER ROLE ENABLED HISTORY
|
||||
XXX XXX XXX YES YES
|
||||
YYY YYY YYY YES YES
|
||||
ZZZ ZZZ ZZZ YES YES
|
||||
insert into performance_schema.setup_objects
|
||||
(object_type, object_schema, object_name, enabled, timed)
|
||||
values ('TABLE', 'DB1', 'AAA', 'YES', 'YES'),
|
||||
|
@ -43,10 +43,10 @@ values ('XXX', 'XXX', 'XXX'),
|
||||
('ZZZ', 'ZZZ', 'ZZZ');
|
||||
select * from performance_schema.setup_actors
|
||||
where user in ('XXX', 'YYY', 'ZZZ') order by user;
|
||||
HOST USER ROLE
|
||||
XXX XXX XXX
|
||||
YYY YYY YYY
|
||||
ZZZ ZZZ ZZZ
|
||||
HOST USER ROLE ENABLED HISTORY
|
||||
XXX XXX XXX YES YES
|
||||
YYY YYY YYY YES YES
|
||||
ZZZ ZZZ ZZZ YES YES
|
||||
insert into performance_schema.setup_objects
|
||||
(object_type, object_schema, object_name, enabled, timed)
|
||||
values ('TABLE', 'DB1', 'AAA', 'YES', 'YES'),
|
||||
|
@ -43,10 +43,10 @@ values ('XXX', 'XXX', 'XXX'),
|
||||
('ZZZ', 'ZZZ', 'ZZZ');
|
||||
select * from performance_schema.setup_actors
|
||||
where user in ('XXX', 'YYY', 'ZZZ') order by user;
|
||||
HOST USER ROLE
|
||||
XXX XXX XXX
|
||||
YYY YYY YYY
|
||||
ZZZ ZZZ ZZZ
|
||||
HOST USER ROLE ENABLED HISTORY
|
||||
XXX XXX XXX YES YES
|
||||
YYY YYY YYY YES YES
|
||||
ZZZ ZZZ ZZZ YES YES
|
||||
insert into performance_schema.setup_objects
|
||||
(object_type, object_schema, object_name, enabled, timed)
|
||||
values ('TABLE', 'DB1', 'AAA', 'YES', 'YES'),
|
||||
|
@ -16,6 +16,14 @@ checksum table performance_schema.events_statements_summary_by_host_by_event_nam
|
||||
checksum table performance_schema.events_statements_summary_by_thread_by_event_name;
|
||||
checksum table performance_schema.events_statements_summary_by_user_by_event_name;
|
||||
checksum table performance_schema.events_statements_summary_global_by_event_name;
|
||||
checksum table performance_schema.events_transactions_current;
|
||||
checksum table performance_schema.events_transactions_history;
|
||||
checksum table performance_schema.events_transactions_history_long;
|
||||
checksum table performance_schema.events_transactions_summary_by_account_by_event_name;
|
||||
checksum table performance_schema.events_transactions_summary_by_host_by_event_name;
|
||||
checksum table performance_schema.events_transactions_summary_by_thread_by_event_name;
|
||||
checksum table performance_schema.events_transactions_summary_by_user_by_event_name;
|
||||
checksum table performance_schema.events_transactions_summary_global_by_event_name;
|
||||
checksum table performance_schema.events_waits_current;
|
||||
checksum table performance_schema.events_waits_history;
|
||||
checksum table performance_schema.events_waits_history_long;
|
||||
@ -61,6 +69,14 @@ checksum table performance_schema.events_statements_summary_by_host_by_event_nam
|
||||
checksum table performance_schema.events_statements_summary_by_thread_by_event_name extended;
|
||||
checksum table performance_schema.events_statements_summary_by_user_by_event_name extended;
|
||||
checksum table performance_schema.events_statements_summary_global_by_event_name extended;
|
||||
checksum table performance_schema.events_transactions_current extended;
|
||||
checksum table performance_schema.events_transactions_history extended;
|
||||
checksum table performance_schema.events_transactions_history_long extended;
|
||||
checksum table performance_schema.events_transactions_summary_by_account_by_event_name extended;
|
||||
checksum table performance_schema.events_transactions_summary_by_host_by_event_name extended;
|
||||
checksum table performance_schema.events_transactions_summary_by_thread_by_event_name extended;
|
||||
checksum table performance_schema.events_transactions_summary_by_user_by_event_name extended;
|
||||
checksum table performance_schema.events_transactions_summary_global_by_event_name extended;
|
||||
checksum table performance_schema.events_waits_current extended;
|
||||
checksum table performance_schema.events_waits_history extended;
|
||||
checksum table performance_schema.events_waits_history_long extended;
|
||||
|
@ -1,6 +1,6 @@
|
||||
show variables like 'performance_schema_max_thread_classes';
|
||||
show global variables like 'performance_schema_max_thread_classes';
|
||||
Variable_name Value
|
||||
performance_schema_max_thread_classes 12
|
||||
show variables like 'performance_schema_max_thread_instances';
|
||||
show global variables like 'performance_schema_max_thread_instances';
|
||||
Variable_name Value
|
||||
performance_schema_max_thread_instances 318
|
||||
|
@ -2,7 +2,16 @@ show grants;
|
||||
Grants for root@localhost
|
||||
GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION
|
||||
GRANT PROXY ON ''@'' TO 'root'@'localhost' WITH GRANT OPTION
|
||||
set @orig_sql_mode= @@sql_mode;
|
||||
set sql_mode= (select replace(@@sql_mode,'NO_AUTO_CREATE_USER',''));
|
||||
Warnings:
|
||||
Warning 3090 Changing sql mode 'NO_AUTO_CREATE_USER' is deprecated. It will be removed in a future release.
|
||||
grant usage on *.* to 'pfs_user_5'@localhost with GRANT OPTION;
|
||||
Warnings:
|
||||
Warning 1287 Using GRANT for creating new user is deprecated and will be removed in future release. Create new user with CREATE USER statement.
|
||||
set sql_mode= @orig_sql_mode;
|
||||
Warnings:
|
||||
Warning 3090 Changing sql mode 'NO_AUTO_CREATE_USER' is deprecated. It will be removed in a future release.
|
||||
grant SELECT(thread_id, event_id) on performance_schema.events_waits_current
|
||||
to 'pfs_user_5'@localhost;
|
||||
grant UPDATE(enabled) on performance_schema.setup_instruments
|
||||
|
@ -35,9 +35,11 @@ SELECT COUNT(DISTINCT PROCESSLIST_ID)
|
||||
FROM performance_schema.session_connect_attrs;
|
||||
COUNT(DISTINCT PROCESSLIST_ID)
|
||||
2
|
||||
# must return 1
|
||||
SELECT COUNT(DISTINCT PROCESSLIST_ID)
|
||||
FROM performance_schema.session_account_connect_attrs;
|
||||
ERROR 42000: SELECT command denied to user 'wl5924'@'localhost' for table 'session_account_connect_attrs'
|
||||
COUNT(DISTINCT PROCESSLIST_ID)
|
||||
1
|
||||
SELECT COUNT(DISTINCT PROCESSLIST_ID)
|
||||
FROM performance_schema.session_connect_attrs;
|
||||
ERROR 42000: SELECT command denied to user 'wl5924'@'localhost' for table 'session_connect_attrs'
|
||||
|
@ -1,3 +1,17 @@
|
||||
Warnings:
|
||||
Warning 3090 Changing sql mode 'NO_AUTO_CREATE_USER' is deprecated. It will be removed in a future release.
|
||||
Warnings:
|
||||
Warning 1287 Using GRANT for creating new user is deprecated and will be removed in future release. Create new user with CREATE USER statement.
|
||||
Warnings:
|
||||
Warning 1287 Using GRANT for creating new user is deprecated and will be removed in future release. Create new user with CREATE USER statement.
|
||||
Warnings:
|
||||
Warning 1287 Using GRANT for creating new user is deprecated and will be removed in future release. Create new user with CREATE USER statement.
|
||||
Warnings:
|
||||
Warning 1287 Using GRANT for creating new user is deprecated and will be removed in future release. Create new user with CREATE USER statement.
|
||||
Warnings:
|
||||
Warning 1287 Using GRANT for creating new user is deprecated and will be removed in future release. Create new user with CREATE USER statement.
|
||||
Warnings:
|
||||
Warning 3090 Changing sql mode 'NO_AUTO_CREATE_USER' is deprecated. It will be removed in a future release.
|
||||
call dump_all();
|
||||
processlist_user processlist_host
|
||||
root localhost
|
||||
@ -11,6 +25,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "user1 in con1a" as status;
|
||||
status
|
||||
user1 in con1a
|
||||
@ -30,6 +46,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "user1 in con1b" as status;
|
||||
status
|
||||
user1 in con1b
|
||||
@ -50,6 +68,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "user1 in con1c" as status;
|
||||
status
|
||||
user1 in con1c
|
||||
@ -71,6 +91,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "user2 in con2a" as status;
|
||||
status
|
||||
user2 in con2a
|
||||
@ -95,6 +117,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "user2 in con2b" as status;
|
||||
status
|
||||
user2 in con2b
|
||||
@ -120,6 +144,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "user2 in con2c" as status;
|
||||
status
|
||||
user2 in con2c
|
||||
@ -146,6 +172,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "user3 in con3a" as status;
|
||||
status
|
||||
user3 in con3a
|
||||
@ -175,6 +203,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "user3 in con3b" as status;
|
||||
status
|
||||
user3 in con3b
|
||||
@ -205,6 +235,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "user3 in con3c" as status;
|
||||
status
|
||||
user3 in con3c
|
||||
@ -236,6 +268,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "con1a disconnected" as status;
|
||||
status
|
||||
con1a disconnected
|
||||
@ -266,6 +300,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "con2a disconnected" as status;
|
||||
status
|
||||
con2a disconnected
|
||||
@ -295,6 +331,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "con3a disconnected" as status;
|
||||
status
|
||||
con3a disconnected
|
||||
@ -323,6 +361,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
truncate table performance_schema.accounts;
|
||||
call dump_all();
|
||||
processlist_user processlist_host
|
||||
@ -349,6 +389,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
truncate table performance_schema.users;
|
||||
call dump_all();
|
||||
processlist_user processlist_host
|
||||
@ -375,6 +417,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
truncate table performance_schema.hosts;
|
||||
call dump_all();
|
||||
processlist_user processlist_host
|
||||
@ -401,6 +445,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "user4 in con4a" as status;
|
||||
status
|
||||
user4 in con4a
|
||||
@ -432,6 +478,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "user4 in con4b" as status;
|
||||
status
|
||||
user4 in con4b
|
||||
@ -464,6 +512,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "user4 in con4c" as status;
|
||||
status
|
||||
user4 in con4c
|
||||
@ -497,6 +547,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "con1b disconnected" as status;
|
||||
status
|
||||
con1b disconnected
|
||||
@ -529,6 +581,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "con2b disconnected" as status;
|
||||
status
|
||||
con2b disconnected
|
||||
@ -560,6 +614,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "con3b disconnected" as status;
|
||||
status
|
||||
con3b disconnected
|
||||
@ -590,6 +646,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "con1c disconnected" as status;
|
||||
status
|
||||
con1c disconnected
|
||||
@ -619,6 +677,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "con2c disconnected" as status;
|
||||
status
|
||||
con2c disconnected
|
||||
@ -647,6 +707,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "con3c disconnected" as status;
|
||||
status
|
||||
con3c disconnected
|
||||
@ -674,6 +736,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
truncate table performance_schema.accounts;
|
||||
call dump_all();
|
||||
processlist_user processlist_host
|
||||
@ -696,6 +760,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
truncate table performance_schema.users;
|
||||
call dump_all();
|
||||
processlist_user processlist_host
|
||||
@ -715,6 +781,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
truncate table performance_schema.hosts;
|
||||
call dump_all();
|
||||
processlist_user processlist_host
|
||||
@ -734,6 +802,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "user5 in con5a" as status;
|
||||
status
|
||||
user5 in con5a
|
||||
@ -758,6 +828,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "user5 in con5b" as status;
|
||||
status
|
||||
user5 in con5b
|
||||
@ -783,6 +855,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "user5 in con5c" as status;
|
||||
status
|
||||
user5 in con5c
|
||||
@ -809,6 +883,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "con 5a, 5b, 5c, 6a, 6b, 6c disconnected" as status;
|
||||
status
|
||||
con 5a, 5b, 5c, 6a, 6b, 6c disconnected
|
||||
@ -829,6 +905,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
truncate table performance_schema.hosts;
|
||||
call dump_all();
|
||||
processlist_user processlist_host
|
||||
@ -845,6 +923,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
truncate table performance_schema.users;
|
||||
call dump_all();
|
||||
processlist_user processlist_host
|
||||
@ -859,6 +939,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
truncate table performance_schema.accounts;
|
||||
call dump_all();
|
||||
processlist_user processlist_host
|
||||
@ -873,3 +955,5 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
|
@ -1,3 +1,17 @@
|
||||
Warnings:
|
||||
Warning 3090 Changing sql mode 'NO_AUTO_CREATE_USER' is deprecated. It will be removed in a future release.
|
||||
Warnings:
|
||||
Warning 1287 Using GRANT for creating new user is deprecated and will be removed in future release. Create new user with CREATE USER statement.
|
||||
Warnings:
|
||||
Warning 1287 Using GRANT for creating new user is deprecated and will be removed in future release. Create new user with CREATE USER statement.
|
||||
Warnings:
|
||||
Warning 1287 Using GRANT for creating new user is deprecated and will be removed in future release. Create new user with CREATE USER statement.
|
||||
Warnings:
|
||||
Warning 1287 Using GRANT for creating new user is deprecated and will be removed in future release. Create new user with CREATE USER statement.
|
||||
Warnings:
|
||||
Warning 1287 Using GRANT for creating new user is deprecated and will be removed in future release. Create new user with CREATE USER statement.
|
||||
Warnings:
|
||||
Warning 3090 Changing sql mode 'NO_AUTO_CREATE_USER' is deprecated. It will be removed in a future release.
|
||||
call dump_all();
|
||||
processlist_user processlist_host
|
||||
root localhost
|
||||
@ -11,6 +25,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "user1 in con1a" as status;
|
||||
status
|
||||
user1 in con1a
|
||||
@ -30,6 +46,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "user1 in con1b" as status;
|
||||
status
|
||||
user1 in con1b
|
||||
@ -50,6 +68,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "user1 in con1c" as status;
|
||||
status
|
||||
user1 in con1c
|
||||
@ -71,6 +91,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "user2 in con2a" as status;
|
||||
status
|
||||
user2 in con2a
|
||||
@ -94,6 +116,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 1
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "user2 in con2b" as status;
|
||||
status
|
||||
user2 in con2b
|
||||
@ -118,6 +142,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 2
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "user2 in con2c" as status;
|
||||
status
|
||||
user2 in con2c
|
||||
@ -143,6 +169,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 3
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "user3 in con3a" as status;
|
||||
status
|
||||
user3 in con3a
|
||||
@ -170,6 +198,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 4
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "user3 in con3b" as status;
|
||||
status
|
||||
user3 in con3b
|
||||
@ -198,6 +228,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 5
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "user3 in con3c" as status;
|
||||
status
|
||||
user3 in con3c
|
||||
@ -227,6 +259,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 6
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "con1a disconnected" as status;
|
||||
status
|
||||
con1a disconnected
|
||||
@ -255,6 +289,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 6
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "con2a disconnected" as status;
|
||||
status
|
||||
con2a disconnected
|
||||
@ -282,6 +318,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 6
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "con3a disconnected" as status;
|
||||
status
|
||||
con3a disconnected
|
||||
@ -308,6 +346,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 6
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
truncate table performance_schema.accounts;
|
||||
call dump_all();
|
||||
processlist_user processlist_host
|
||||
@ -332,6 +372,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 6
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
truncate table performance_schema.users;
|
||||
call dump_all();
|
||||
processlist_user processlist_host
|
||||
@ -356,6 +398,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 6
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
truncate table performance_schema.hosts;
|
||||
call dump_all();
|
||||
processlist_user processlist_host
|
||||
@ -380,6 +424,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 6
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "user4 in con4a" as status;
|
||||
status
|
||||
user4 in con4a
|
||||
@ -408,6 +454,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 7
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "user4 in con4b" as status;
|
||||
status
|
||||
user4 in con4b
|
||||
@ -437,6 +485,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 8
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "user4 in con4c" as status;
|
||||
status
|
||||
user4 in con4c
|
||||
@ -467,6 +517,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "con1b disconnected" as status;
|
||||
status
|
||||
con1b disconnected
|
||||
@ -496,6 +548,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "con2b disconnected" as status;
|
||||
status
|
||||
con2b disconnected
|
||||
@ -524,6 +578,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "con3b disconnected" as status;
|
||||
status
|
||||
con3b disconnected
|
||||
@ -551,6 +607,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "con1c disconnected" as status;
|
||||
status
|
||||
con1c disconnected
|
||||
@ -577,6 +635,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "con2c disconnected" as status;
|
||||
status
|
||||
con2c disconnected
|
||||
@ -602,6 +662,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "con3c disconnected" as status;
|
||||
status
|
||||
con3c disconnected
|
||||
@ -626,6 +688,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
truncate table performance_schema.accounts;
|
||||
call dump_all();
|
||||
processlist_user processlist_host
|
||||
@ -647,6 +711,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
truncate table performance_schema.users;
|
||||
call dump_all();
|
||||
processlist_user processlist_host
|
||||
@ -665,6 +731,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
truncate table performance_schema.hosts;
|
||||
call dump_all();
|
||||
processlist_user processlist_host
|
||||
@ -683,6 +751,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "user5 in con5a" as status;
|
||||
status
|
||||
user5 in con5a
|
||||
@ -706,6 +776,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "user5 in con5b" as status;
|
||||
status
|
||||
user5 in con5b
|
||||
@ -730,6 +802,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "user5 in con5c" as status;
|
||||
status
|
||||
user5 in con5c
|
||||
@ -755,6 +829,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "con 5a, 5b, 5c, 6a, 6b, 6c disconnected" as status;
|
||||
status
|
||||
con 5a, 5b, 5c, 6a, 6b, 6c disconnected
|
||||
@ -774,6 +850,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
truncate table performance_schema.hosts;
|
||||
call dump_all();
|
||||
processlist_user processlist_host
|
||||
@ -790,6 +868,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
truncate table performance_schema.users;
|
||||
call dump_all();
|
||||
processlist_user processlist_host
|
||||
@ -804,6 +884,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
truncate table performance_schema.accounts;
|
||||
call dump_all();
|
||||
processlist_user processlist_host
|
||||
@ -818,3 +900,5 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
|
@ -1,3 +1,17 @@
|
||||
Warnings:
|
||||
Warning 3090 Changing sql mode 'NO_AUTO_CREATE_USER' is deprecated. It will be removed in a future release.
|
||||
Warnings:
|
||||
Warning 1287 Using GRANT for creating new user is deprecated and will be removed in future release. Create new user with CREATE USER statement.
|
||||
Warnings:
|
||||
Warning 1287 Using GRANT for creating new user is deprecated and will be removed in future release. Create new user with CREATE USER statement.
|
||||
Warnings:
|
||||
Warning 1287 Using GRANT for creating new user is deprecated and will be removed in future release. Create new user with CREATE USER statement.
|
||||
Warnings:
|
||||
Warning 1287 Using GRANT for creating new user is deprecated and will be removed in future release. Create new user with CREATE USER statement.
|
||||
Warnings:
|
||||
Warning 1287 Using GRANT for creating new user is deprecated and will be removed in future release. Create new user with CREATE USER statement.
|
||||
Warnings:
|
||||
Warning 3090 Changing sql mode 'NO_AUTO_CREATE_USER' is deprecated. It will be removed in a future release.
|
||||
call dump_all();
|
||||
processlist_user processlist_host
|
||||
root localhost
|
||||
@ -11,6 +25,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "user1 in con1a" as status;
|
||||
status
|
||||
user1 in con1a
|
||||
@ -30,6 +46,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "user1 in con1b" as status;
|
||||
status
|
||||
user1 in con1b
|
||||
@ -50,6 +68,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "user1 in con1c" as status;
|
||||
status
|
||||
user1 in con1c
|
||||
@ -71,6 +91,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "user2 in con2a" as status;
|
||||
status
|
||||
user2 in con2a
|
||||
@ -93,6 +115,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 1
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 1
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "user2 in con2b" as status;
|
||||
status
|
||||
user2 in con2b
|
||||
@ -116,6 +140,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 2
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 2
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "user2 in con2c" as status;
|
||||
status
|
||||
user2 in con2c
|
||||
@ -140,6 +166,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 3
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 3
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "user3 in con3a" as status;
|
||||
status
|
||||
user3 in con3a
|
||||
@ -165,6 +193,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 4
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 4
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "user3 in con3b" as status;
|
||||
status
|
||||
user3 in con3b
|
||||
@ -191,6 +221,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 5
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 5
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "user3 in con3c" as status;
|
||||
status
|
||||
user3 in con3c
|
||||
@ -218,6 +250,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 6
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 6
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "con1a disconnected" as status;
|
||||
status
|
||||
con1a disconnected
|
||||
@ -244,6 +278,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 6
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 6
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "con2a disconnected" as status;
|
||||
status
|
||||
con2a disconnected
|
||||
@ -269,6 +305,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 6
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 6
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "con3a disconnected" as status;
|
||||
status
|
||||
con3a disconnected
|
||||
@ -293,6 +331,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 6
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 6
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
truncate table performance_schema.accounts;
|
||||
call dump_all();
|
||||
processlist_user processlist_host
|
||||
@ -315,6 +355,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 6
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 6
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
truncate table performance_schema.users;
|
||||
call dump_all();
|
||||
processlist_user processlist_host
|
||||
@ -337,6 +379,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 6
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 6
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
truncate table performance_schema.hosts;
|
||||
call dump_all();
|
||||
processlist_user processlist_host
|
||||
@ -359,6 +403,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 6
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 6
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "user4 in con4a" as status;
|
||||
status
|
||||
user4 in con4a
|
||||
@ -384,6 +430,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 7
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 7
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "user4 in con4b" as status;
|
||||
status
|
||||
user4 in con4b
|
||||
@ -410,6 +458,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 8
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 8
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "user4 in con4c" as status;
|
||||
status
|
||||
user4 in con4c
|
||||
@ -437,6 +487,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 9
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "con1b disconnected" as status;
|
||||
status
|
||||
con1b disconnected
|
||||
@ -463,6 +515,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 9
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "con2b disconnected" as status;
|
||||
status
|
||||
con2b disconnected
|
||||
@ -488,6 +542,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 9
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "con3b disconnected" as status;
|
||||
status
|
||||
con3b disconnected
|
||||
@ -512,6 +568,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 9
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "con1c disconnected" as status;
|
||||
status
|
||||
con1c disconnected
|
||||
@ -535,6 +593,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 9
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "con2c disconnected" as status;
|
||||
status
|
||||
con2c disconnected
|
||||
@ -557,6 +617,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 9
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "con3c disconnected" as status;
|
||||
status
|
||||
con3c disconnected
|
||||
@ -578,6 +640,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 9
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
truncate table performance_schema.accounts;
|
||||
call dump_all();
|
||||
processlist_user processlist_host
|
||||
@ -596,6 +660,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 9
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
truncate table performance_schema.users;
|
||||
call dump_all();
|
||||
processlist_user processlist_host
|
||||
@ -613,6 +679,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 9
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
truncate table performance_schema.hosts;
|
||||
call dump_all();
|
||||
processlist_user processlist_host
|
||||
@ -630,6 +698,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 9
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "user5 in con5a" as status;
|
||||
status
|
||||
user5 in con5a
|
||||
@ -652,6 +722,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 9
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "user5 in con5b" as status;
|
||||
status
|
||||
user5 in con5b
|
||||
@ -675,6 +747,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 9
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "user5 in con5c" as status;
|
||||
status
|
||||
user5 in con5c
|
||||
@ -699,6 +773,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 9
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "con 5a, 5b, 5c, 6a, 6b, 6c disconnected" as status;
|
||||
status
|
||||
con 5a, 5b, 5c, 6a, 6b, 6c disconnected
|
||||
@ -717,6 +793,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 9
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
truncate table performance_schema.hosts;
|
||||
call dump_all();
|
||||
processlist_user processlist_host
|
||||
@ -732,6 +810,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 9
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
truncate table performance_schema.users;
|
||||
call dump_all();
|
||||
processlist_user processlist_host
|
||||
@ -746,6 +826,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 9
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
truncate table performance_schema.accounts;
|
||||
call dump_all();
|
||||
processlist_user processlist_host
|
||||
@ -760,3 +842,5 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 9
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
|
@ -1,3 +1,17 @@
|
||||
Warnings:
|
||||
Warning 3090 Changing sql mode 'NO_AUTO_CREATE_USER' is deprecated. It will be removed in a future release.
|
||||
Warnings:
|
||||
Warning 1287 Using GRANT for creating new user is deprecated and will be removed in future release. Create new user with CREATE USER statement.
|
||||
Warnings:
|
||||
Warning 1287 Using GRANT for creating new user is deprecated and will be removed in future release. Create new user with CREATE USER statement.
|
||||
Warnings:
|
||||
Warning 1287 Using GRANT for creating new user is deprecated and will be removed in future release. Create new user with CREATE USER statement.
|
||||
Warnings:
|
||||
Warning 1287 Using GRANT for creating new user is deprecated and will be removed in future release. Create new user with CREATE USER statement.
|
||||
Warnings:
|
||||
Warning 1287 Using GRANT for creating new user is deprecated and will be removed in future release. Create new user with CREATE USER statement.
|
||||
Warnings:
|
||||
Warning 3090 Changing sql mode 'NO_AUTO_CREATE_USER' is deprecated. It will be removed in a future release.
|
||||
call dump_all();
|
||||
processlist_user processlist_host
|
||||
root localhost
|
||||
@ -11,6 +25,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "user1 in con1a" as status;
|
||||
status
|
||||
user1 in con1a
|
||||
@ -30,6 +46,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "user1 in con1b" as status;
|
||||
status
|
||||
user1 in con1b
|
||||
@ -50,6 +68,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "user1 in con1c" as status;
|
||||
status
|
||||
user1 in con1c
|
||||
@ -71,6 +91,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "user2 in con2a" as status;
|
||||
status
|
||||
user2 in con2a
|
||||
@ -94,6 +116,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 1
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "user2 in con2b" as status;
|
||||
status
|
||||
user2 in con2b
|
||||
@ -118,6 +142,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 1
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "user2 in con2c" as status;
|
||||
status
|
||||
user2 in con2c
|
||||
@ -143,6 +169,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 1
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "user3 in con3a" as status;
|
||||
status
|
||||
user3 in con3a
|
||||
@ -170,6 +198,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 2
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "user3 in con3b" as status;
|
||||
status
|
||||
user3 in con3b
|
||||
@ -198,6 +228,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 2
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "user3 in con3c" as status;
|
||||
status
|
||||
user3 in con3c
|
||||
@ -227,6 +259,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 2
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "con1a disconnected" as status;
|
||||
status
|
||||
con1a disconnected
|
||||
@ -255,6 +289,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 2
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "con2a disconnected" as status;
|
||||
status
|
||||
con2a disconnected
|
||||
@ -282,6 +318,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 2
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "con3a disconnected" as status;
|
||||
status
|
||||
con3a disconnected
|
||||
@ -308,6 +346,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 2
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
truncate table performance_schema.accounts;
|
||||
call dump_all();
|
||||
processlist_user processlist_host
|
||||
@ -332,6 +372,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 2
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
truncate table performance_schema.users;
|
||||
call dump_all();
|
||||
processlist_user processlist_host
|
||||
@ -356,6 +398,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 2
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
truncate table performance_schema.hosts;
|
||||
call dump_all();
|
||||
processlist_user processlist_host
|
||||
@ -380,6 +424,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 2
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "user4 in con4a" as status;
|
||||
status
|
||||
user4 in con4a
|
||||
@ -408,6 +454,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 3
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "user4 in con4b" as status;
|
||||
status
|
||||
user4 in con4b
|
||||
@ -437,6 +485,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 3
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "user4 in con4c" as status;
|
||||
status
|
||||
user4 in con4c
|
||||
@ -467,6 +517,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 3
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "con1b disconnected" as status;
|
||||
status
|
||||
con1b disconnected
|
||||
@ -496,6 +548,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 3
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "con2b disconnected" as status;
|
||||
status
|
||||
con2b disconnected
|
||||
@ -524,6 +578,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 3
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "con3b disconnected" as status;
|
||||
status
|
||||
con3b disconnected
|
||||
@ -551,6 +607,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 3
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "con1c disconnected" as status;
|
||||
status
|
||||
con1c disconnected
|
||||
@ -577,6 +635,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 3
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "con2c disconnected" as status;
|
||||
status
|
||||
con2c disconnected
|
||||
@ -602,6 +662,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 3
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "con3c disconnected" as status;
|
||||
status
|
||||
con3c disconnected
|
||||
@ -626,6 +688,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 3
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
truncate table performance_schema.accounts;
|
||||
call dump_all();
|
||||
processlist_user processlist_host
|
||||
@ -645,6 +709,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 3
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
truncate table performance_schema.users;
|
||||
call dump_all();
|
||||
processlist_user processlist_host
|
||||
@ -663,6 +729,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 3
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
truncate table performance_schema.hosts;
|
||||
call dump_all();
|
||||
processlist_user processlist_host
|
||||
@ -681,6 +749,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 3
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "user5 in con5a" as status;
|
||||
status
|
||||
user5 in con5a
|
||||
@ -704,6 +774,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 3
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "user5 in con5b" as status;
|
||||
status
|
||||
user5 in con5b
|
||||
@ -728,6 +800,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 3
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "user5 in con5c" as status;
|
||||
status
|
||||
user5 in con5c
|
||||
@ -753,6 +827,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 3
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
select "con 5a, 5b, 5c, 6a, 6b, 6c disconnected" as status;
|
||||
status
|
||||
con 5a, 5b, 5c, 6a, 6b, 6c disconnected
|
||||
@ -772,6 +848,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 3
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
truncate table performance_schema.hosts;
|
||||
call dump_all();
|
||||
processlist_user processlist_host
|
||||
@ -787,6 +865,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 3
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
truncate table performance_schema.users;
|
||||
call dump_all();
|
||||
processlist_user processlist_host
|
||||
@ -801,6 +881,8 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 3
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
truncate table performance_schema.accounts;
|
||||
call dump_all();
|
||||
processlist_user processlist_host
|
||||
@ -815,3 +897,5 @@ variable_name variable_value
|
||||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 3
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
|
74
mysql-test/suite/perfschema/r/connection_type_notwin.result
Normal file
74
mysql-test/suite/perfschema/r/connection_type_notwin.result
Normal file
@ -0,0 +1,74 @@
|
||||
"Default connection"
|
||||
select NAME, PROCESSLIST_USER, PROCESSLIST_HOST, CONNECTION_TYPE
|
||||
from performance_schema.threads
|
||||
where PROCESSLIST_ID = connection_id();
|
||||
NAME thread/sql/one_connection
|
||||
PROCESSLIST_USER root
|
||||
PROCESSLIST_HOST localhost
|
||||
CONNECTION_TYPE Socket
|
||||
create user 'root'@'santa.claus.ipv4.example.com';
|
||||
grant select on *.* to 'root'@'santa.claus.ipv4.example.com';
|
||||
create user 'rootssl'@'santa.claus.ipv4.example.com'
|
||||
require SSL;
|
||||
grant select on *.* to 'rootssl'@'santa.claus.ipv4.example.com';
|
||||
set global debug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4";
|
||||
TRUNCATE TABLE mysql.general_log;
|
||||
SET @old_log_output= @@global.log_output;
|
||||
SET @old_general_log= @@global.general_log;
|
||||
SET @old_general_log_file= @@global.general_log_file;
|
||||
SET GLOBAL general_log_file = '.../log/rewrite_general_con.log';
|
||||
SET GLOBAL log_output = 'FILE,TABLE';
|
||||
SET GLOBAL general_log= 'ON';
|
||||
"Connection con1"
|
||||
select NAME, PROCESSLIST_USER, PROCESSLIST_HOST, CONNECTION_TYPE
|
||||
from performance_schema.threads
|
||||
where PROCESSLIST_ID = connection_id();
|
||||
NAME thread/sql/one_connection
|
||||
PROCESSLIST_USER root
|
||||
PROCESSLIST_HOST localhost
|
||||
CONNECTION_TYPE Socket
|
||||
"Connection con2"
|
||||
select NAME, PROCESSLIST_USER, PROCESSLIST_HOST, CONNECTION_TYPE
|
||||
from performance_schema.threads
|
||||
where PROCESSLIST_ID = connection_id();
|
||||
NAME thread/sql/one_connection
|
||||
PROCESSLIST_USER root
|
||||
PROCESSLIST_HOST santa.claus.ipv4.example.com
|
||||
CONNECTION_TYPE TCP/IP
|
||||
"Connection con3"
|
||||
select NAME, PROCESSLIST_USER, PROCESSLIST_HOST, CONNECTION_TYPE
|
||||
from performance_schema.threads
|
||||
where PROCESSLIST_ID = connection_id();
|
||||
NAME thread/sql/one_connection
|
||||
PROCESSLIST_USER rootssl
|
||||
PROCESSLIST_HOST santa.claus.ipv4.example.com
|
||||
CONNECTION_TYPE SSL/TLS
|
||||
SET GLOBAL general_log= 'OFF';
|
||||
CREATE TABLE test_log (argument TEXT);
|
||||
LOAD DATA LOCAL INFILE '.../log/rewrite_general_con.log'
|
||||
INTO TABLE test_log FIELDS TERMINATED BY '\n' LINES TERMINATED BY '\n';
|
||||
select user_host, command_type, argument from mysql.general_log
|
||||
where command_type = "Connect";
|
||||
user_host [root] @ localhost []
|
||||
command_type Connect
|
||||
argument root@localhost on test using Socket
|
||||
user_host [root] @ santa.claus.ipv4.example.com [192.0.2.4]
|
||||
command_type Connect
|
||||
argument root@santa.claus.ipv4.example.com on test using TCP/IP
|
||||
user_host [rootssl] @ santa.claus.ipv4.example.com [192.0.2.4]
|
||||
command_type Connect
|
||||
argument rootssl@santa.claus.ipv4.example.com on test using SSL/TLS
|
||||
select substring(argument, locate("Connect", argument)) from test_log
|
||||
where argument like "%Connect%on test%";
|
||||
substring(argument, locate("Connect", argument)) Connect root@localhost on test using Socket
|
||||
substring(argument, locate("Connect", argument)) Connect root@santa.claus.ipv4.example.com on test using TCP/IP
|
||||
substring(argument, locate("Connect", argument)) Connect rootssl@santa.claus.ipv4.example.com on test using SSL/TLS
|
||||
DROP TABLE test_log;
|
||||
SET GLOBAL general_log_file= @old_general_log_file;
|
||||
SET GLOBAL general_log= @old_general_log;
|
||||
SET GLOBAL log_output= @old_log_output;
|
||||
set global debug= default;
|
||||
revoke select on *.* from 'root'@'santa.claus.ipv4.example.com';
|
||||
drop user 'root'@'santa.claus.ipv4.example.com';
|
||||
revoke select on *.* from 'rootssl'@'santa.claus.ipv4.example.com';
|
||||
drop user 'rootssl'@'santa.claus.ipv4.example.com';
|
74
mysql-test/suite/perfschema/r/connection_type_win.result
Normal file
74
mysql-test/suite/perfschema/r/connection_type_win.result
Normal file
@ -0,0 +1,74 @@
|
||||
"Default connection"
|
||||
select NAME, PROCESSLIST_USER, PROCESSLIST_HOST, CONNECTION_TYPE
|
||||
from performance_schema.threads
|
||||
where PROCESSLIST_ID = connection_id();
|
||||
NAME thread/sql/one_connection
|
||||
PROCESSLIST_USER root
|
||||
PROCESSLIST_HOST localhost
|
||||
CONNECTION_TYPE TCP/IP
|
||||
create user 'root'@'santa.claus.ipv4.example.com';
|
||||
grant select on *.* to 'root'@'santa.claus.ipv4.example.com';
|
||||
create user 'rootssl'@'santa.claus.ipv4.example.com'
|
||||
require SSL;
|
||||
grant select on *.* to 'rootssl'@'santa.claus.ipv4.example.com';
|
||||
set global debug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4";
|
||||
TRUNCATE TABLE mysql.general_log;
|
||||
SET @old_log_output= @@global.log_output;
|
||||
SET @old_general_log= @@global.general_log;
|
||||
SET @old_general_log_file= @@global.general_log_file;
|
||||
SET GLOBAL general_log_file = '.../log/rewrite_general_con.log';
|
||||
SET GLOBAL log_output = 'FILE,TABLE';
|
||||
SET GLOBAL general_log= 'ON';
|
||||
"Connection con1"
|
||||
select NAME, PROCESSLIST_USER, PROCESSLIST_HOST, CONNECTION_TYPE
|
||||
from performance_schema.threads
|
||||
where PROCESSLIST_ID = connection_id();
|
||||
NAME thread/sql/one_connection
|
||||
PROCESSLIST_USER root
|
||||
PROCESSLIST_HOST santa.claus.ipv4.example.com
|
||||
CONNECTION_TYPE TCP/IP
|
||||
"Connection con2"
|
||||
select NAME, PROCESSLIST_USER, PROCESSLIST_HOST, CONNECTION_TYPE
|
||||
from performance_schema.threads
|
||||
where PROCESSLIST_ID = connection_id();
|
||||
NAME thread/sql/one_connection
|
||||
PROCESSLIST_USER root
|
||||
PROCESSLIST_HOST santa.claus.ipv4.example.com
|
||||
CONNECTION_TYPE TCP/IP
|
||||
"Connection con3"
|
||||
select NAME, PROCESSLIST_USER, PROCESSLIST_HOST, CONNECTION_TYPE
|
||||
from performance_schema.threads
|
||||
where PROCESSLIST_ID = connection_id();
|
||||
NAME thread/sql/one_connection
|
||||
PROCESSLIST_USER rootssl
|
||||
PROCESSLIST_HOST santa.claus.ipv4.example.com
|
||||
CONNECTION_TYPE SSL/TLS
|
||||
SET GLOBAL general_log= 'OFF';
|
||||
CREATE TABLE test_log (argument TEXT);
|
||||
LOAD DATA LOCAL INFILE '.../log/rewrite_general_con.log'
|
||||
INTO TABLE test_log FIELDS TERMINATED BY '\n' LINES TERMINATED BY '\n';
|
||||
select user_host, command_type, argument from mysql.general_log
|
||||
where command_type = "Connect";
|
||||
user_host [root] @ santa.claus.ipv4.example.com [192.0.2.4]
|
||||
command_type Connect
|
||||
argument root@santa.claus.ipv4.example.com on test using TCP/IP
|
||||
user_host [root] @ santa.claus.ipv4.example.com [192.0.2.4]
|
||||
command_type Connect
|
||||
argument root@santa.claus.ipv4.example.com on test using TCP/IP
|
||||
user_host [rootssl] @ santa.claus.ipv4.example.com [192.0.2.4]
|
||||
command_type Connect
|
||||
argument rootssl@santa.claus.ipv4.example.com on test using SSL/TLS
|
||||
select substring(argument, locate("Connect", argument)) from test_log
|
||||
where argument like "%Connect%on test%";
|
||||
substring(argument, locate("Connect", argument)) Connect root@santa.claus.ipv4.example.com on test using TCP/IP
|
||||
substring(argument, locate("Connect", argument)) Connect root@santa.claus.ipv4.example.com on test using TCP/IP
|
||||
substring(argument, locate("Connect", argument)) Connect rootssl@santa.claus.ipv4.example.com on test using SSL/TLS
|
||||
DROP TABLE test_log;
|
||||
SET GLOBAL general_log_file= @old_general_log_file;
|
||||
SET GLOBAL general_log= @old_general_log;
|
||||
SET GLOBAL log_output= @old_log_output;
|
||||
set global debug= default;
|
||||
revoke select on *.* from 'root'@'santa.claus.ipv4.example.com';
|
||||
drop user 'root'@'santa.claus.ipv4.example.com';
|
||||
revoke select on *.* from 'rootssl'@'santa.claus.ipv4.example.com';
|
||||
drop user 'rootssl'@'santa.claus.ipv4.example.com';
|
@ -70,48 +70,40 @@ where event_name like 'wait/io/table/%'
|
||||
and object_schema in ("test")
|
||||
order by thread_id, event_id;
|
||||
event_name short_source object_type object_schema pretty_name operation number_of_bytes
|
||||
wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
|
||||
wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
|
||||
wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
|
||||
wait/io/table/sql/handler handler.cc: TABLE test no_index_tab insert NULL
|
||||
wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
|
||||
wait/io/table/sql/handler handler.cc: TABLE test no_index_tab insert NULL
|
||||
wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
|
||||
wait/io/table/sql/handler handler.cc: TABLE test no_index_tab insert NULL
|
||||
wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
|
||||
wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
|
||||
wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
|
||||
wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
|
||||
wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
|
||||
wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
|
||||
wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
|
||||
wait/io/table/sql/handler handler.cc: TABLE test no_index_tab update NULL
|
||||
wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
|
||||
wait/io/table/sql/handler handler.cc: TABLE test no_index_tab update NULL
|
||||
wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
|
||||
wait/io/table/sql/handler handler.cc: TABLE test no_index_tab update NULL
|
||||
wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
|
||||
wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
|
||||
wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
|
||||
wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
|
||||
wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
|
||||
wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
|
||||
wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
|
||||
wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
|
||||
wait/io/table/sql/handler handler.cc: TABLE test no_index_tab delete NULL
|
||||
wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
|
||||
wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
|
||||
wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
|
||||
wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
|
||||
wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
|
||||
wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
|
||||
wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
|
||||
wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
|
||||
wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
|
||||
wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
|
||||
wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
|
||||
wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
|
||||
show status like 'performance_schema_%';
|
||||
wait/io/table/sql/handler handler.cc: TABLE test marker insert 1
|
||||
wait/io/table/sql/handler handler.cc: TABLE test marker insert 1
|
||||
wait/io/table/sql/handler handler.cc: TABLE test marker insert 1
|
||||
wait/io/table/sql/handler handler.cc: TABLE test no_index_tab insert 1
|
||||
wait/io/table/sql/handler handler.cc: TABLE test marker insert 1
|
||||
wait/io/table/sql/handler handler.cc: TABLE test no_index_tab insert 1
|
||||
wait/io/table/sql/handler handler.cc: TABLE test marker insert 1
|
||||
wait/io/table/sql/handler handler.cc: TABLE test no_index_tab insert 1
|
||||
wait/io/table/sql/handler handler.cc: TABLE test marker insert 1
|
||||
wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 3
|
||||
wait/io/table/sql/handler handler.cc: TABLE test marker insert 1
|
||||
wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 1
|
||||
wait/io/table/sql/handler handler.cc: TABLE test no_index_tab update 1
|
||||
wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 1
|
||||
wait/io/table/sql/handler handler.cc: TABLE test no_index_tab update 1
|
||||
wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 1
|
||||
wait/io/table/sql/handler handler.cc: TABLE test no_index_tab update 1
|
||||
wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 1
|
||||
wait/io/table/sql/handler handler.cc: TABLE test marker insert 1
|
||||
wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 2
|
||||
wait/io/table/sql/handler handler.cc: TABLE test marker insert 1
|
||||
wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 1
|
||||
wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 1
|
||||
wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 1
|
||||
wait/io/table/sql/handler handler.cc: TABLE test no_index_tab delete 1
|
||||
wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 1
|
||||
wait/io/table/sql/handler handler.cc: TABLE test marker insert 1
|
||||
wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 2
|
||||
wait/io/table/sql/handler handler.cc: TABLE test marker insert 1
|
||||
wait/io/table/sql/handler handler.cc: TABLE test marker insert 1
|
||||
wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 2
|
||||
wait/io/table/sql/handler handler.cc: TABLE test marker insert 1
|
||||
wait/io/table/sql/handler handler.cc: TABLE test marker insert 1
|
||||
show global status like 'performance_schema_%';
|
||||
Variable_name Value
|
||||
Performance_schema_accounts_lost 0
|
||||
Performance_schema_cond_classes_lost 0
|
||||
@ -121,9 +113,15 @@ Performance_schema_file_classes_lost 0
|
||||
Performance_schema_file_handles_lost 0
|
||||
Performance_schema_file_instances_lost 0
|
||||
Performance_schema_hosts_lost 0
|
||||
Performance_schema_index_stat_lost 0
|
||||
Performance_schema_locker_lost 0
|
||||
Performance_schema_memory_classes_lost 0
|
||||
Performance_schema_metadata_lock_lost 0
|
||||
Performance_schema_mutex_classes_lost 0
|
||||
Performance_schema_mutex_instances_lost 0
|
||||
Performance_schema_nested_statement_lost 0
|
||||
Performance_schema_prepared_statements_lost 0
|
||||
Performance_schema_program_lost 0
|
||||
Performance_schema_rwlock_classes_lost 0
|
||||
Performance_schema_rwlock_instances_lost 0
|
||||
Performance_schema_session_connect_attrs_lost 0
|
||||
@ -133,6 +131,7 @@ Performance_schema_stage_classes_lost 0
|
||||
Performance_schema_statement_classes_lost 0
|
||||
Performance_schema_table_handles_lost 0
|
||||
Performance_schema_table_instances_lost 0
|
||||
Performance_schema_table_lock_stat_lost 0
|
||||
Performance_schema_thread_classes_lost 0
|
||||
Performance_schema_thread_instances_lost 0
|
||||
Performance_schema_users_lost 0
|
||||
|
9
mysql-test/suite/perfschema/r/ddl_esms_by_program.result
Normal file
9
mysql-test/suite/perfschema/r/ddl_esms_by_program.result
Normal file
@ -0,0 +1,9 @@
|
||||
alter table performance_schema.events_statements_summary_by_program
|
||||
add column foo integer;
|
||||
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
|
||||
truncate table performance_schema.events_statements_summary_by_program;
|
||||
ALTER TABLE performance_schema.events_statements_summary_by_program ADD INDEX test_index(OBJECT_NAME);
|
||||
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
|
||||
CREATE UNIQUE INDEX test_index
|
||||
ON performance_schema.events_statements_summary_by_program(OBJECT_NAME);
|
||||
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
|
@ -0,0 +1,10 @@
|
||||
alter table performance_schema.events_transactions_summary_by_account_by_event_name
|
||||
add column foo integer;
|
||||
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
|
||||
truncate table performance_schema.events_transactions_summary_by_account_by_event_name;
|
||||
ALTER TABLE performance_schema.events_transactions_summary_by_account_by_event_name
|
||||
ADD INDEX test_index(USERNAME);
|
||||
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
|
||||
CREATE UNIQUE INDEX test_index
|
||||
ON performance_schema.events_transactions_summary_by_account_by_event_name(USERNAME);
|
||||
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
|
@ -0,0 +1,10 @@
|
||||
alter table performance_schema.events_transactions_summary_by_host_by_event_name
|
||||
add column foo integer;
|
||||
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
|
||||
truncate table performance_schema.events_transactions_summary_by_host_by_event_name;
|
||||
ALTER TABLE performance_schema.events_transactions_summary_by_host_by_event_name
|
||||
ADD INDEX test_index(HOSTNAME);
|
||||
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
|
||||
CREATE UNIQUE INDEX test_index
|
||||
ON performance_schema.events_transactions_summary_by_host_by_event_name(HOSTNAME);
|
||||
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
|
@ -0,0 +1,9 @@
|
||||
alter table performance_schema.events_transactions_summary_by_thread_by_event_name
|
||||
add column foo integer;
|
||||
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
|
||||
truncate table performance_schema.events_transactions_summary_by_thread_by_event_name;
|
||||
ALTER TABLE performance_schema.events_transactions_summary_by_thread_by_event_name ADD INDEX test_index(THREAD_ID);
|
||||
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
|
||||
CREATE UNIQUE INDEX test_index
|
||||
ON performance_schema.events_transactions_summary_by_thread_by_event_name(THREAD_ID);
|
||||
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
|
@ -0,0 +1,10 @@
|
||||
alter table performance_schema.events_transactions_summary_by_user_by_event_name
|
||||
add column foo integer;
|
||||
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
|
||||
truncate table performance_schema.events_transactions_summary_by_user_by_event_name;
|
||||
ALTER TABLE performance_schema.events_transactions_summary_by_user_by_event_name
|
||||
ADD INDEX test_index(USERNAME);
|
||||
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
|
||||
CREATE UNIQUE INDEX test_index
|
||||
ON performance_schema.events_transactions_summary_by_user_by_event_name(USERNAME);
|
||||
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
|
@ -0,0 +1,10 @@
|
||||
alter table performance_schema.events_transactions_summary_global_by_event_name
|
||||
add column foo integer;
|
||||
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
|
||||
truncate table performance_schema.events_transactions_summary_global_by_event_name;
|
||||
ALTER TABLE performance_schema.events_transactions_summary_global_by_event_name
|
||||
ADD INDEX test_index(EVENT_NAME);
|
||||
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
|
||||
CREATE UNIQUE INDEX test_index
|
||||
ON performance_schema.events_transactions_summary_global_by_event_name(EVENT_NAME);
|
||||
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
|
@ -5,3 +5,6 @@ ALTER TABLE performance_schema.events_stages_current ADD INDEX test_index(EVENT_
|
||||
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
|
||||
CREATE UNIQUE INDEX test_index ON performance_schema.events_stages_current(EVENT_ID);
|
||||
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
|
||||
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT GENERATION_EXPRESSION
|
||||
def performance_schema events_stages_current WORK_COMPLETED 9 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
|
||||
def performance_schema events_stages_current WORK_ESTIMATED 10 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
|
||||
|
@ -5,3 +5,6 @@ ALTER TABLE performance_schema.events_stages_history ADD INDEX test_index(EVENT_
|
||||
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
|
||||
CREATE UNIQUE INDEX test_index ON performance_schema.events_stages_history(EVENT_ID);
|
||||
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
|
||||
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT GENERATION_EXPRESSION
|
||||
def performance_schema events_stages_history WORK_COMPLETED 9 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
|
||||
def performance_schema events_stages_history WORK_ESTIMATED 10 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
|
||||
|
@ -5,3 +5,6 @@ ALTER TABLE performance_schema.events_stages_history_long ADD INDEX test_index(E
|
||||
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
|
||||
CREATE UNIQUE INDEX test_index ON performance_schema.events_stages_history_long(EVENT_ID);
|
||||
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
|
||||
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT GENERATION_EXPRESSION
|
||||
def performance_schema events_stages_history_long WORK_COMPLETED 9 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
|
||||
def performance_schema events_stages_history_long WORK_ESTIMATED 10 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
|
||||
|
@ -0,0 +1,7 @@
|
||||
alter table performance_schema.events_transactions_current add column foo integer;
|
||||
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
|
||||
truncate table performance_schema.events_transactions_current;
|
||||
ALTER TABLE performance_schema.events_transactions_current ADD INDEX test_index(EVENT_ID);
|
||||
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
|
||||
CREATE UNIQUE INDEX test_index ON performance_schema.events_transactions_current(EVENT_ID);
|
||||
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
|
@ -0,0 +1,7 @@
|
||||
alter table performance_schema.events_transactions_history add column foo integer;
|
||||
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
|
||||
truncate table performance_schema.events_transactions_history;
|
||||
ALTER TABLE performance_schema.events_transactions_history ADD INDEX test_index(EVENT_ID);
|
||||
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
|
||||
CREATE UNIQUE INDEX test_index ON performance_schema.events_transactions_history(EVENT_ID);
|
||||
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
|
@ -0,0 +1,7 @@
|
||||
alter table performance_schema.events_transactions_history_long add column foo integer;
|
||||
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
|
||||
truncate table performance_schema.events_transactions_history_long;
|
||||
ALTER TABLE performance_schema.events_transactions_history_long ADD INDEX test_index(EVENT_ID);
|
||||
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
|
||||
CREATE UNIQUE INDEX test_index ON performance_schema.events_transactions_history_long(EVENT_ID);
|
||||
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
|
10
mysql-test/suite/perfschema/r/ddl_global_status.result
Normal file
10
mysql-test/suite/perfschema/r/ddl_global_status.result
Normal file
@ -0,0 +1,10 @@
|
||||
alter table performance_schema.global_status
|
||||
add column foo integer;
|
||||
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
|
||||
truncate table performance_schema.global_status;
|
||||
ALTER TABLE performance_schema.global_status
|
||||
ADD INDEX test_index(VARIABLE_NAME);
|
||||
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
|
||||
CREATE UNIQUE INDEX test_index
|
||||
ON performance_schema.global_status(VARIABLE_NAME);
|
||||
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
|
11
mysql-test/suite/perfschema/r/ddl_global_variables.result
Normal file
11
mysql-test/suite/perfschema/r/ddl_global_variables.result
Normal file
@ -0,0 +1,11 @@
|
||||
alter table performance_schema.global_variables
|
||||
add column foo integer;
|
||||
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
|
||||
truncate table performance_schema.global_variables;
|
||||
ERROR HY000: Invalid performance_schema usage.
|
||||
ALTER TABLE performance_schema.global_variables
|
||||
ADD INDEX test_index(VARIABLE_NAME);
|
||||
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
|
||||
CREATE UNIQUE INDEX test_index
|
||||
ON performance_schema.global_variables(VARIABLE_NAME);
|
||||
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
|
@ -0,0 +1,10 @@
|
||||
alter table performance_schema.memory_summary_by_account_by_event_name
|
||||
add column foo integer;
|
||||
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
|
||||
truncate table performance_schema.memory_summary_by_account_by_event_name;
|
||||
ALTER TABLE performance_schema.memory_summary_by_account_by_event_name
|
||||
ADD INDEX test_index(USERNAME);
|
||||
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
|
||||
CREATE UNIQUE INDEX test_index
|
||||
ON performance_schema.memory_summary_by_account_by_event_name(USERNAME);
|
||||
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
|
@ -0,0 +1,10 @@
|
||||
alter table performance_schema.memory_summary_by_host_by_event_name
|
||||
add column foo integer;
|
||||
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
|
||||
truncate table performance_schema.memory_summary_by_host_by_event_name;
|
||||
ALTER TABLE performance_schema.memory_summary_by_host_by_event_name
|
||||
ADD INDEX test_index(USERNAME);
|
||||
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
|
||||
CREATE UNIQUE INDEX test_index
|
||||
ON performance_schema.memory_summary_by_host_by_event_name(USERNAME);
|
||||
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
|
@ -0,0 +1,10 @@
|
||||
alter table performance_schema.memory_summary_by_thread_by_event_name
|
||||
add column foo integer;
|
||||
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
|
||||
truncate table performance_schema.memory_summary_by_thread_by_event_name;
|
||||
ALTER TABLE performance_schema.memory_summary_by_thread_by_event_name
|
||||
ADD INDEX test_index(USERNAME);
|
||||
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
|
||||
CREATE UNIQUE INDEX test_index
|
||||
ON performance_schema.memory_summary_by_thread_by_event_name(USERNAME);
|
||||
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
|
@ -0,0 +1,10 @@
|
||||
alter table performance_schema.memory_summary_by_user_by_event_name
|
||||
add column foo integer;
|
||||
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
|
||||
truncate table performance_schema.memory_summary_by_user_by_event_name;
|
||||
ALTER TABLE performance_schema.memory_summary_by_user_by_event_name
|
||||
ADD INDEX test_index(USERNAME);
|
||||
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
|
||||
CREATE UNIQUE INDEX test_index
|
||||
ON performance_schema.memory_summary_by_user_by_event_name(USERNAME);
|
||||
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
|
@ -0,0 +1,10 @@
|
||||
alter table performance_schema.memory_summary_global_by_event_name
|
||||
add column foo integer;
|
||||
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
|
||||
truncate table performance_schema.memory_summary_global_by_event_name;
|
||||
ALTER TABLE performance_schema.memory_summary_global_by_event_name
|
||||
ADD INDEX test_index(USERNAME);
|
||||
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
|
||||
CREATE UNIQUE INDEX test_index
|
||||
ON performance_schema.memory_summary_global_by_event_name(USERNAME);
|
||||
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user