mirror of
https://github.com/MariaDB/server.git
synced 2025-01-24 15:54:37 +01:00
P_S 5.7.28
This commit is contained in:
parent
dfe6e914e5
commit
0ea717f51a
942 changed files with 174739 additions and 20780 deletions
include
mysql/psi
mysql_file.hmysql_idle.hmysql_mdl.hmysql_memory.hmysql_ps.hmysql_socket.hmysql_sp.hmysql_stage.hmysql_statement.hmysql_table.hmysql_thread.hmysql_transaction.hpsi.hpsi_abi_v0.hpsi_abi_v0.h.pppsi_abi_v1.h.pppsi_abi_v2.hpsi_abi_v2.h.pppsi_base.hpsi_memory.h
pfs_file_provider.hpfs_idle_provider.hpfs_memory_provider.hpfs_metadata_provider.hpfs_socket_provider.hpfs_stage_provider.hpfs_statement_provider.hpfs_table_provider.hpfs_thread_provider.hpfs_transaction_provider.hmysql-test/suite/perfschema
include
binlog_edge_common.incevent_aggregate_cleanup.incevent_aggregate_load.incevent_aggregate_setup.incmemory_aggregate_cleanup.incmemory_aggregate_load.incmemory_aggregate_setup.incprepared_stmts_deallocation.incprepared_stmts_execution.incprepared_stmts_setup.incprogram_cleanup.incprogram_execution.incprogram_nested_cleanup.incprogram_nested_execution.incprogram_nested_setup.incprogram_setup.increset_transaction_gtid.incschema.incshow_aggregate.incshow_plugin_verifier.incshow_plugin_verifier_56.incshow_transaction_gtid.incsizing_auto.incstart_server_common.inctable_aggregate_load.inctable_aggregate_setup.inctransaction_cleanup.inctransaction_nested_events_verifier.inctransaction_setup.incupgrade_check.incwait_for_pfs_thread_count.inc
r
all_tests.resultalter_table_progress.resultbad_option.resultbad_option_1.resultbad_option_2.resultbad_option_3.resultbad_option_4.resultbad_option_5.resultbatch_table_io_func.resultbinlog_edge_mix.resultbinlog_edge_row.resultbinlog_edge_stmt.resultbinlog_ok_mix.resultbinlog_ok_row.resultbinlog_ok_stmt.resultchecksum.resultcnf_option.resultconnect_attrs.resultconnection.resultconnection_3a.resultconnection_3a_3u.resultconnection_3u.resultconnection_type_notwin.resultconnection_type_win.resultcsv_table_io.resultddl_esms_by_program.resultddl_ets_by_account_by_event_name.resultddl_ets_by_host_by_event_name.resultddl_ets_by_thread_by_event_name.resultddl_ets_by_user_by_event_name.resultddl_ets_global_by_event_name.resultddl_events_stages_current.resultddl_events_stages_history.resultddl_events_stages_history_long.resultddl_events_transactions_current.resultddl_events_transactions_history.resultddl_events_transactions_history_long.resultddl_global_status.resultddl_global_variables.result
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
/* Copyright (c) 2008, 2017, 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, version 2.0,
|
||||
|
@ -48,6 +48,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
|
||||
|
@ -295,7 +299,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)
|
||||
|
@ -828,7 +832,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
|
||||
|
@ -1052,20 +1057,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;
|
||||
}
|
||||
|
||||
|
@ -1355,12 +1367,13 @@ inline_mysql_file_rename(
|
|||
{
|
||||
struct PSI_file_locker *locker;
|
||||
PSI_file_locker_state state;
|
||||
locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_RENAME, to, &locker);
|
||||
locker= PSI_FILE_CALL(get_thread_file_name_locker)
|
||||
(&state, key, PSI_FILE_RENAME, from, &locker);
|
||||
if (likely(locker != NULL))
|
||||
{
|
||||
PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line);
|
||||
result= my_rename(from, to, flags);
|
||||
PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0);
|
||||
PSI_FILE_CALL(end_file_rename_wait)(locker, from, to, result);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
@ -1449,12 +1462,13 @@ inline_mysql_file_rename_with_symlink(
|
|||
{
|
||||
struct PSI_file_locker *locker;
|
||||
PSI_file_locker_state state;
|
||||
locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_RENAME, to, &locker);
|
||||
locker= PSI_FILE_CALL(get_thread_file_name_locker)
|
||||
(&state, key, PSI_FILE_RENAME, from, &locker);
|
||||
if (likely(locker != NULL))
|
||||
{
|
||||
PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line);
|
||||
result= my_rename_with_symlink(from, to, flags);
|
||||
PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0);
|
||||
PSI_FILE_CALL(end_file_rename_wait)(locker, from, to, result);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
Copyright (c) 2017, MariaDB Corporation.
|
||||
Copyright (c) 2017, 2019, MariaDB Corporation.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License, version 2.0,
|
||||
|
@ -31,6 +31,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
|
||||
|
|
128
include/mysql/psi/mysql_mdl.h
Normal file
128
include/mysql/psi/mysql_mdl.h
Normal file
|
@ -0,0 +1,128 @@
|
|||
/* 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, version 2.0,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is also distributed with certain software (including
|
||||
but not limited to OpenSSL) that is licensed under separate terms,
|
||||
as designated in a particular file or component or in included license
|
||||
documentation. The authors of MySQL hereby grant you an additional
|
||||
permission to link the program and your derivative works with the
|
||||
separately licensed software that they have included with MySQL.
|
||||
|
||||
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, version 2.0, 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
|
||||
|
69
include/mysql/psi/mysql_memory.h
Normal file
69
include/mysql/psi/mysql_memory.h
Normal file
|
@ -0,0 +1,69 @@
|
|||
/* 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, version 2.0,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is also distributed with certain software (including
|
||||
but not limited to OpenSSL) that is licensed under separate terms,
|
||||
as designated in a particular file or component or in included license
|
||||
documentation. The authors of MySQL hereby grant you an additional
|
||||
permission to link the program and your derivative works with the
|
||||
separately licensed software that they have included with MySQL.
|
||||
|
||||
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, version 2.0, 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 __attribute__((unused)),
|
||||
void *info __attribute__((unused)),
|
||||
int count __attribute__((unused)))
|
||||
#endif
|
||||
{
|
||||
#ifdef HAVE_PSI_MEMORY_INTERFACE
|
||||
PSI_MEMORY_CALL(register_memory)(category, info, count);
|
||||
#endif
|
||||
}
|
||||
|
||||
/** @} (end of group Memory_instrumentation) */
|
||||
|
||||
#endif
|
||||
|
110
include/mysql/psi/mysql_ps.h
Normal file
110
include/mysql/psi/mysql_ps.h
Normal file
|
@ -0,0 +1,110 @@
|
|||
/* Copyright (c) 2014, 2017, 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, version 2.0,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is also distributed with certain software (including
|
||||
but not limited to OpenSSL) that is licensed under separate terms,
|
||||
as designated in a particular file or component or in included license
|
||||
documentation. The authors of MySQL hereby grant you an additional
|
||||
permission to link the program and your derivative works with the
|
||||
separately licensed software that they have included with MySQL.
|
||||
|
||||
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, version 2.0, 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)
|
||||
#define MYSQL_SET_PS_TEXT(PREPARED_STMT, SQLTEXT, SQLTEXT_LENGTH) \
|
||||
inline_mysql_set_prepared_stmt_text(PREPARED_STMT, SQLTEXT, SQLTEXT_LENGTH)
|
||||
#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)
|
||||
#define MYSQL_SET_PS_TEXT(PREPARED_STMT, SQLTEXT, SQLTEXT_LENGTH) \
|
||||
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);
|
||||
}
|
||||
|
||||
static inline void
|
||||
inline_mysql_set_prepared_stmt_text(PSI_prepared_stmt *prepared_stmt,
|
||||
const char *text,
|
||||
uint text_len)
|
||||
{
|
||||
if (prepared_stmt != NULL)
|
||||
{
|
||||
PSI_PS_CALL(set_prepared_stmt_text)(prepared_stmt, text, text_len);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
|
@ -31,7 +31,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>
|
||||
|
@ -47,6 +47,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
|
||||
|
@ -65,6 +69,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. */
|
||||
|
@ -107,9 +112,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 address
|
||||
@param addr_len length of socket address
|
||||
*/
|
||||
|
||||
static inline void
|
||||
|
@ -134,7 +138,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(
|
||||
|
@ -201,7 +204,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.
|
||||
*/
|
||||
|
@ -230,6 +232,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)
|
||||
|
@ -325,8 +334,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) \
|
||||
|
@ -430,7 +439,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) \
|
||||
|
@ -476,6 +485,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.
|
||||
|
@ -972,6 +994,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
|
||||
|
@ -1136,7 +1230,7 @@ inline_mysql_socket_shutdown
|
|||
{
|
||||
int result;
|
||||
|
||||
#ifdef __WIN__
|
||||
#ifdef _WIN32
|
||||
static LPFN_DISCONNECTEX DisconnectEx = NULL;
|
||||
if (DisconnectEx == NULL)
|
||||
{
|
||||
|
@ -1159,7 +1253,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;
|
||||
|
@ -1176,7 +1270,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;
|
||||
|
|
104
include/mysql/psi/mysql_sp.h
Normal file
104
include/mysql/psi/mysql_sp.h
Normal file
|
@ -0,0 +1,104 @@
|
|||
/* 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, version 2.0,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is also distributed with certain software (including
|
||||
but not limited to OpenSSL) that is licensed under separate terms,
|
||||
as designated in a particular file or component or in included license
|
||||
documentation. The authors of MySQL hereby grant you an additional
|
||||
permission to link the program and your derivative works with the
|
||||
separately licensed software that they have included with MySQL.
|
||||
|
||||
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, version 2.0, 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, version 2.0,
|
||||
|
@ -30,6 +30,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
|
||||
|
@ -48,12 +52,48 @@
|
|||
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) \
|
||||
do {} while (0)
|
||||
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
|
||||
|
||||
#ifdef HAVE_PSI_STAGE_INTERFACE
|
||||
|
@ -65,11 +105,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
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
Copyright (c) 2017, MariaDB Corporation.
|
||||
Copyright (c) 2017, 2019, MariaDB Corporation.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License, version 2.0,
|
||||
|
@ -31,6 +31,17 @@
|
|||
|
||||
#include "mysql/psi/psi.h"
|
||||
|
||||
class Diagnostics_area;
|
||||
typedef const 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
|
||||
|
@ -66,10 +77,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
|
||||
|
||||
|
@ -153,11 +164,13 @@ static inline struct PSI_statement_locker *
|
|||
inline_mysql_start_statement(PSI_statement_locker_state *state,
|
||||
PSI_statement_key key,
|
||||
const char *db, size_t db_len,
|
||||
const CHARSET_INFO *charset,
|
||||
CHARSET_INFO *charset,
|
||||
PSI_sp_share *sp_share,
|
||||
const char *src_file, uint 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 (psi_likely(locker != NULL))
|
||||
PSI_STATEMENT_CALL(start_statement)(locker, db, (uint)db_len, src_file, src_line);
|
||||
return locker;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
Copyright (c) 2017, MariaDB Corporation.
|
||||
/* Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
Copyright (c) 2017, 2019, MariaDB Corporation.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License, version 2.0,
|
||||
|
@ -31,6 +31,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
|
||||
|
@ -54,7 +58,7 @@
|
|||
|
||||
#define PSI_CALL_unbind_table(A1) do { } while(0)
|
||||
#define PSI_CALL_rebind_table(A1,A2,A3) NULL
|
||||
#define PSI_CALL_close_table(A1) do { } while(0)
|
||||
#define PSI_CALL_close_table(A1,A2) do { } while(0)
|
||||
#define PSI_CALL_open_table(A1,A2) NULL
|
||||
#define PSI_CALL_get_table_share(A1,A2) NULL
|
||||
#define PSI_CALL_release_table_share(A1) do { } while(0)
|
||||
|
@ -81,72 +85,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_likely(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_likely(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.
|
||||
|
@ -182,6 +120,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.
|
||||
|
@ -213,6 +159,13 @@ inline_mysql_end_table_lock_wait(struct PSI_table_locker *locker)
|
|||
if (psi_likely(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) */
|
||||
|
|
|
@ -62,6 +62,27 @@
|
|||
*/
|
||||
|
||||
#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
|
||||
|
@ -80,7 +101,7 @@
|
|||
#define PSI_CALL_set_thread_id PSI_THREAD_CALL(set_thread_id)
|
||||
#define PSI_CALL_set_thread_info PSI_THREAD_CALL(set_thread_info)
|
||||
#define PSI_CALL_set_thread_start_time PSI_THREAD_CALL(set_thread_start_time)
|
||||
#define PSI_CALL_set_thread_user_host PSI_THREAD_CALL(set_thread_user_host)
|
||||
#define PSI_CALL_set_thread_account PSI_THREAD_CALL(set_thread_account)
|
||||
#define PSI_CALL_spawn_thread PSI_THREAD_CALL(spawn_thread)
|
||||
#else
|
||||
#define PSI_CALL_delete_current_thread() do { } while(0)
|
||||
|
@ -93,7 +114,7 @@
|
|||
#define PSI_CALL_set_thread_id(A1,A2) do { } while(0)
|
||||
#define PSI_CALL_set_thread_info(A1, A2) do { } while(0)
|
||||
#define PSI_CALL_set_thread_start_time(A1) do { } while(0)
|
||||
#define PSI_CALL_set_thread_user_host(A1, A2, A3, A4) do { } while(0)
|
||||
#define PSI_CALL_set_thread_account(A1, A2, A3, A4) do { } while(0)
|
||||
#define PSI_CALL_spawn_thread(A1, A2, A3, A4, A5) 0
|
||||
#endif
|
||||
|
||||
|
@ -256,11 +277,19 @@ typedef struct st_mysql_cond mysql_cond_t;
|
|||
#define mysql_mutex_setflags(M, F) \
|
||||
safe_mutex_setflags(&(M)->m_mutex, (F))
|
||||
|
||||
/** Wrappers for instrumented prlock objects. */
|
||||
|
||||
/**
|
||||
@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)
|
||||
|
||||
|
@ -538,7 +567,7 @@ typedef struct st_mysql_cond mysql_cond_t;
|
|||
Instrumented cond_wait.
|
||||
@c mysql_cond_wait is a drop-in replacement for @c pthread_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
|
||||
|
@ -552,7 +581,7 @@ typedef struct st_mysql_cond mysql_cond_t;
|
|||
@c mysql_cond_timedwait is a drop-in replacement
|
||||
for @c pthread_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
|
||||
|
@ -618,6 +647,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,
|
||||
|
@ -1154,7 +1194,7 @@ static inline int inline_mysql_cond_destroy(
|
|||
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
|
||||
)
|
||||
|
@ -1191,7 +1231,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
|
||||
)
|
||||
|
@ -1281,6 +1321,16 @@ 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 */
|
||||
|
|
220
include/mysql/psi/mysql_transaction.h
Normal file
220
include/mysql/psi/mysql_transaction.h
Normal file
|
@ -0,0 +1,220 @@
|
|||
/* 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, version 2.0,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is also distributed with certain software (including
|
||||
but not limited to OpenSSL) that is licensed under separate terms,
|
||||
as designated in a particular file or component or in included license
|
||||
documentation. The authors of MySQL hereby grant you an additional
|
||||
permission to link the program and your derivative works with the
|
||||
separately licensed software that they have included with MySQL.
|
||||
|
||||
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, version 2.0, 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, version 2.0,
|
||||
|
|
|
@ -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,6 +1,37 @@
|
|||
extern "C" {
|
||||
}
|
||||
extern "C" {
|
||||
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;
|
||||
class THD;
|
||||
struct PSI_mutex;
|
||||
typedef struct PSI_mutex PSI_mutex;
|
||||
struct PSI_rwlock;
|
||||
|
@ -17,14 +48,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);
|
||||
|
@ -40,6 +108,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,
|
||||
|
@ -51,7 +121,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
|
||||
|
@ -81,14 +157,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,
|
||||
|
@ -134,48 +202,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;
|
||||
|
@ -184,6 +260,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;
|
||||
|
@ -194,6 +271,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;
|
||||
|
@ -204,6 +282,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;
|
||||
|
@ -215,6 +294,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;
|
||||
|
@ -228,21 +308,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;
|
||||
|
@ -269,7 +349,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;
|
||||
|
@ -283,6 +382,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)
|
||||
|
@ -324,7 +433,8 @@ 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,
|
||||
|
@ -333,14 +443,18 @@ typedef int (*spawn_thread_v1_t)(PSI_thread_key key,
|
|||
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,
|
||||
const char *host, int host_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);
|
||||
|
@ -399,25 +513,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);
|
||||
|
@ -427,12 +546,16 @@ 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 void (*end_file_rename_wait_v1_t)
|
||||
(struct PSI_file_locker *locker, const char *old_name,
|
||||
const char *new_name, int rc);
|
||||
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);
|
||||
|
@ -477,6 +600,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,
|
||||
|
@ -492,10 +643,53 @@ 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 void (*set_prepared_stmt_text_v1_t)(PSI_prepared_stmt *prepared_stmt,
|
||||
const char *text,
|
||||
uint text_len);
|
||||
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
|
||||
|
@ -527,11 +721,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;
|
||||
|
@ -563,11 +760,15 @@ 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;
|
||||
end_file_rename_wait_v1_t end_file_rename_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;
|
||||
|
@ -590,14 +791,45 @@ 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;
|
||||
set_prepared_stmt_text_v1_t set_prepared_stmt_text;
|
||||
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;
|
||||
|
@ -607,15 +839,18 @@ 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 my_bool pfs_enabled;
|
||||
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, version 2.0,
|
||||
|
|
|
@ -1,6 +1,24 @@
|
|||
extern "C" {
|
||||
}
|
||||
extern "C" {
|
||||
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;
|
||||
class THD;
|
||||
struct PSI_mutex;
|
||||
typedef struct PSI_mutex PSI_mutex;
|
||||
struct PSI_rwlock;
|
||||
|
@ -17,14 +35,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);
|
||||
|
@ -40,6 +95,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,
|
||||
|
@ -51,7 +108,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
|
||||
|
@ -81,14 +144,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,
|
||||
|
@ -160,6 +215,10 @@ struct PSI_statement_info_v2
|
|||
{
|
||||
int placeholder;
|
||||
};
|
||||
struct PSI_transaction_info_v2
|
||||
{
|
||||
int placeholder;
|
||||
};
|
||||
struct PSI_idle_locker_state_v2
|
||||
{
|
||||
int placeholder;
|
||||
|
@ -180,18 +239,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;
|
||||
|
@ -200,15 +263,18 @@ 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 my_bool pfs_enabled;
|
||||
extern MYSQL_PLUGIN_IMPORT PSI *PSI_server;
|
||||
C_MODE_END
|
||||
|
|
|
@ -1,13 +1,25 @@
|
|||
/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
/* 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.
|
||||
it under the terms of the GNU General Public License, version 2.0,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is also distributed with certain software (including
|
||||
but not limited to OpenSSL) that is licensed under separate terms,
|
||||
as designated in a particular file or component or in included license
|
||||
documentation. The authors of MySQL hereby grant you an additional
|
||||
permission to link the program and your derivative works with the
|
||||
separately licensed software that they have included with MySQL.
|
||||
|
||||
Without limiting anything contained in the foregoing, this file,
|
||||
which is part of C Driver for MySQL (Connector/C), is also subject to the
|
||||
Universal FOSS Exception, version 1.0, a copy of which can be found at
|
||||
http://oss.oracle.com/licenses/universal-foss-exception.
|
||||
|
||||
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.
|
||||
GNU General Public License, version 2.0, 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,
|
||||
|
@ -30,6 +42,7 @@ extern "C" {
|
|||
*/
|
||||
|
||||
#define PSI_INSTRUMENT_ME 0
|
||||
#define PSI_INSTRUMENT_MEM ((PSI_memory_key)0)
|
||||
|
||||
#define PSI_NOT_INSTRUMENTED 0
|
||||
|
||||
|
@ -69,6 +82,14 @@ extern "C" {
|
|||
*/
|
||||
#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
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,13 +1,25 @@
|
|||
/* 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.
|
||||
it under the terms of the GNU General Public License, version 2.0,
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is also distributed with certain software (including
|
||||
but not limited to OpenSSL) that is licensed under separate terms,
|
||||
as designated in a particular file or component or in included license
|
||||
documentation. The authors of MySQL hereby grant you an additional
|
||||
permission to link the program and your derivative works with the
|
||||
separately licensed software that they have included with MySQL.
|
||||
|
||||
Without limiting anything contained in the foregoing, this file,
|
||||
which is part of C Driver for MySQL (Connector/C), is also subject to the
|
||||
Universal FOSS Exception, version 1.0, a copy of which can be found at
|
||||
http://oss.oracle.com/licenses/universal-foss-exception.
|
||||
|
||||
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.
|
||||
GNU General Public License, version 2.0, 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,
|
||||
|
|
89
include/pfs_file_provider.h
Normal file
89
include/pfs_file_provider.h
Normal file
|
@ -0,0 +1,89 @@
|
|||
/* 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 PFS_FILE_PROVIDER_H
|
||||
#define PFS_FILE_PROVIDER_H
|
||||
|
||||
/**
|
||||
@file include/pfs_file_provider.h
|
||||
Performance schema instrumentation (declarations).
|
||||
*/
|
||||
|
||||
#ifdef HAVE_PSI_FILE_INTERFACE
|
||||
#ifdef MYSQL_SERVER
|
||||
#ifndef EMBEDDED_LIBRARY
|
||||
#ifndef MYSQL_DYNAMIC_PLUGIN
|
||||
|
||||
#include "mysql/psi/psi.h"
|
||||
|
||||
#define PSI_FILE_CALL(M) pfs_ ## M ## _v1
|
||||
|
||||
C_MODE_START
|
||||
|
||||
void pfs_register_file_v1(const char *category,
|
||||
PSI_file_info_v1 *info,
|
||||
int count);
|
||||
|
||||
void pfs_create_file_v1(PSI_file_key key, const char *name, File file);
|
||||
|
||||
PSI_file_locker*
|
||||
pfs_get_thread_file_name_locker_v1(PSI_file_locker_state *state,
|
||||
PSI_file_key key,
|
||||
PSI_file_operation op,
|
||||
const char *name, const void *identity);
|
||||
|
||||
PSI_file_locker*
|
||||
pfs_get_thread_file_stream_locker_v1(PSI_file_locker_state *state,
|
||||
PSI_file *file, PSI_file_operation op);
|
||||
|
||||
PSI_file_locker*
|
||||
pfs_get_thread_file_descriptor_locker_v1(PSI_file_locker_state *state,
|
||||
File file, PSI_file_operation op);
|
||||
|
||||
void pfs_start_file_open_wait_v1(PSI_file_locker *locker,
|
||||
const char *src_file,
|
||||
uint src_line);
|
||||
|
||||
PSI_file* pfs_end_file_open_wait_v1(PSI_file_locker *locker, void *result);
|
||||
|
||||
void pfs_end_file_open_wait_and_bind_to_descriptor_v1
|
||||
(PSI_file_locker *locker, File file);
|
||||
|
||||
void pfs_end_temp_file_open_wait_and_bind_to_descriptor_v1
|
||||
(PSI_file_locker *locker, File file, const char *filename);
|
||||
|
||||
void pfs_start_file_wait_v1(PSI_file_locker *locker,
|
||||
size_t count,
|
||||
const char *src_file,
|
||||
uint src_line);
|
||||
|
||||
void pfs_end_file_wait_v1(PSI_file_locker *locker,
|
||||
size_t byte_count);
|
||||
|
||||
void pfs_start_file_close_wait_v1(PSI_file_locker *locker,
|
||||
const char *src_file,
|
||||
uint src_line);
|
||||
|
||||
void pfs_end_file_close_wait_v1(PSI_file_locker *locker, int rc);
|
||||
|
||||
C_MODE_END
|
||||
|
||||
#endif /* EMBEDDED_LIBRARY */
|
||||
#endif /* MYSQL_DYNAMIC_PLUGIN */
|
||||
#endif /* MYSQL_SERVER */
|
||||
#endif /* HAVE_PSI_FILE_INTERFACE */
|
||||
|
||||
#endif
|
||||
|
48
include/pfs_idle_provider.h
Normal file
48
include/pfs_idle_provider.h
Normal file
|
@ -0,0 +1,48 @@
|
|||
/* 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 PFS_IDLE_PROVIDER_H
|
||||
#define PFS_IDLE_PROVIDER_H
|
||||
|
||||
/**
|
||||
@file include/pfs_idle_provider.h
|
||||
Performance schema instrumentation (declarations).
|
||||
*/
|
||||
|
||||
#ifdef HAVE_PSI_IDLE_INTERFACE
|
||||
#ifdef MYSQL_SERVER
|
||||
#ifndef EMBEDDED_LIBRARY
|
||||
#ifndef MYSQL_DYNAMIC_PLUGIN
|
||||
|
||||
#include "mysql/psi/psi.h"
|
||||
|
||||
#define PSI_IDLE_CALL(M) pfs_ ## M ## _v1
|
||||
|
||||
C_MODE_START
|
||||
|
||||
PSI_idle_locker*
|
||||
pfs_start_idle_wait_v1(PSI_idle_locker_state* state, const char *src_file, uint src_line);
|
||||
|
||||
void pfs_end_idle_wait_v1(PSI_idle_locker* locker);
|
||||
|
||||
C_MODE_END
|
||||
|
||||
#endif /* MYSQL_DYNAMIC_PLUGIN */
|
||||
#endif /* EMBEDDED_LIBRARY */
|
||||
#endif /* MYSQL_SERVER */
|
||||
#endif /* HAVE_PSI_IDLE_INTERFACE */
|
||||
|
||||
#endif
|
||||
|
57
include/pfs_memory_provider.h
Normal file
57
include/pfs_memory_provider.h
Normal file
|
@ -0,0 +1,57 @@
|
|||
/* 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 PFS_MEMORY_PROVIDER_H
|
||||
#define PFS_MEMORY_PROVIDER_H
|
||||
|
||||
/**
|
||||
@file include/pfs_memory_provider.h
|
||||
Performance schema instrumentation (declarations).
|
||||
*/
|
||||
|
||||
#ifdef HAVE_PSI_MEMORY_INTERFACE
|
||||
#ifdef MYSQL_SERVER
|
||||
#ifndef EMBEDDED_LIBRARY
|
||||
#ifndef MYSQL_DYNAMIC_PLUGIN
|
||||
|
||||
#include "mysql/psi/psi.h"
|
||||
|
||||
#define PSI_MEMORY_CALL(M) pfs_ ## M ## _v1
|
||||
|
||||
C_MODE_START
|
||||
|
||||
void pfs_register_memory_v1
|
||||
(const char *category, struct PSI_memory_info_v1 *info, int count);
|
||||
|
||||
PSI_memory_key
|
||||
pfs_memory_alloc_v1
|
||||
(PSI_memory_key key, size_t size, PSI_thread **owner);
|
||||
|
||||
PSI_memory_key
|
||||
pfs_memory_realloc_v1
|
||||
(PSI_memory_key key, size_t old_size, size_t new_size, PSI_thread **owner);
|
||||
|
||||
void pfs_memory_free_v1
|
||||
(PSI_memory_key key, size_t size, PSI_thread *owner);
|
||||
|
||||
C_MODE_END
|
||||
|
||||
#endif /* MYSQL_DYNAMIC_PLUGIN */
|
||||
#endif /* EMBEDDED_LIBRARY */
|
||||
#endif /* MYSQL_SERVER */
|
||||
#endif /* HAVE_PSI_MEMORY_INTERFACE */
|
||||
|
||||
#endif
|
||||
|
67
include/pfs_metadata_provider.h
Normal file
67
include/pfs_metadata_provider.h
Normal file
|
@ -0,0 +1,67 @@
|
|||
/* 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 PFS_METADATA_PROVIDER_H
|
||||
#define PFS_METADATA_PROVIDER_H
|
||||
|
||||
/**
|
||||
@file include/pfs_metadata_provider.h
|
||||
Performance schema instrumentation (declarations).
|
||||
*/
|
||||
|
||||
#ifdef HAVE_PSI_METADATA_INTERFACE
|
||||
#ifdef MYSQL_SERVER
|
||||
#ifndef EMBEDDED_LIBRARY
|
||||
#ifndef MYSQL_DYNAMIC_PLUGIN
|
||||
|
||||
#include "mysql/psi/psi.h"
|
||||
|
||||
#define PSI_METADATA_CALL(M) pfs_ ## M ## _v1
|
||||
|
||||
C_MODE_START
|
||||
|
||||
PSI_metadata_lock* pfs_create_metadata_lock_v1
|
||||
(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);
|
||||
|
||||
void pfs_set_metadata_lock_status_v1
|
||||
(PSI_metadata_lock *lock,
|
||||
opaque_mdl_status mdl_status);
|
||||
|
||||
void pfs_destroy_metadata_lock_v1(PSI_metadata_lock *lock);
|
||||
|
||||
struct PSI_metadata_locker*
|
||||
pfs_start_metadata_wait_v1
|
||||
(struct PSI_metadata_locker_state_v1 *state,
|
||||
struct PSI_metadata_lock *mdl,
|
||||
const char *src_file, uint src_line);
|
||||
|
||||
void pfs_end_metadata_wait_v1
|
||||
(struct PSI_metadata_locker *locker, int rc);
|
||||
|
||||
C_MODE_END
|
||||
|
||||
#endif /* MYSQL_DYNAMIC_PLUGIN */
|
||||
#endif /* EMBEDDED_LIBRARY */
|
||||
#endif /* MYSQL_SERVER */
|
||||
#endif /* HAVE_PSI_METADATA_INTERFACE */
|
||||
|
||||
#endif
|
||||
|
71
include/pfs_socket_provider.h
Normal file
71
include/pfs_socket_provider.h
Normal file
|
@ -0,0 +1,71 @@
|
|||
/* 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 PFS_SOCKET_PROVIDER_H
|
||||
#define PFS_SOCKET_PROVIDER_H
|
||||
|
||||
/**
|
||||
@file include/pfs_socket_provider.h
|
||||
Performance schema instrumentation (declarations).
|
||||
*/
|
||||
|
||||
#ifdef HAVE_PSI_SOCKET_INTERFACE
|
||||
#ifdef MYSQL_SERVER
|
||||
#ifndef EMBEDDED_LIBRARY
|
||||
#ifndef MYSQL_DYNAMIC_PLUGIN
|
||||
|
||||
#include "mysql/psi/psi.h"
|
||||
|
||||
#define PSI_SOCKET_CALL(M) pfs_ ## M ## _v1
|
||||
|
||||
C_MODE_START
|
||||
|
||||
void pfs_register_socket_v1(const char *category,
|
||||
PSI_socket_info_v1 *info,
|
||||
int count);
|
||||
|
||||
PSI_socket*
|
||||
pfs_init_socket_v1(PSI_socket_key key, const my_socket *fd,
|
||||
const struct sockaddr *addr, socklen_t addr_len);
|
||||
|
||||
void pfs_destroy_socket_v1(PSI_socket *socket);
|
||||
|
||||
PSI_socket_locker*
|
||||
pfs_start_socket_wait_v1(PSI_socket_locker_state *state,
|
||||
PSI_socket *socket,
|
||||
PSI_socket_operation op,
|
||||
size_t count,
|
||||
const char *src_file, uint src_line);
|
||||
|
||||
void pfs_end_socket_wait_v1(PSI_socket_locker *locker, size_t byte_count);
|
||||
|
||||
void pfs_set_socket_state_v1(PSI_socket *socket, PSI_socket_state state);
|
||||
|
||||
void pfs_set_socket_info_v1(PSI_socket *socket,
|
||||
const my_socket *fd,
|
||||
const struct sockaddr *addr,
|
||||
socklen_t addr_len);
|
||||
|
||||
void pfs_set_socket_thread_owner_v1(PSI_socket *socket);
|
||||
|
||||
C_MODE_END
|
||||
|
||||
#endif /* EMBEDDED_LIBRARY */
|
||||
#endif /* MYSQL_DYNAMIC_PLUGIN */
|
||||
#endif /* MYSQL_SERVER */
|
||||
#endif /* HAVE_PSI_SOCKET_INTERFACE */
|
||||
|
||||
#endif
|
||||
|
52
include/pfs_stage_provider.h
Normal file
52
include/pfs_stage_provider.h
Normal file
|
@ -0,0 +1,52 @@
|
|||
/* 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 PFS_STAGE_PROVIDER_H
|
||||
#define PFS_STAGE_PROVIDER_H
|
||||
|
||||
/**
|
||||
@file include/pfs_stage_provider.h
|
||||
Performance schema instrumentation (declarations).
|
||||
*/
|
||||
|
||||
#ifdef HAVE_PSI_STAGE_INTERFACE
|
||||
#ifdef MYSQL_SERVER
|
||||
#ifndef EMBEDDED_LIBRARY
|
||||
#ifndef MYSQL_DYNAMIC_PLUGIN
|
||||
|
||||
#include "mysql/psi/psi.h"
|
||||
|
||||
#define PSI_STAGE_CALL(M) pfs_ ## M ## _v1
|
||||
|
||||
C_MODE_START
|
||||
|
||||
void pfs_register_stage_v1(const char *category,
|
||||
PSI_stage_info_v1 **info_array,
|
||||
int count);
|
||||
|
||||
PSI_stage_progress* pfs_start_stage_v1(PSI_stage_key key, const char *src_file, int src_line);
|
||||
PSI_stage_progress* pfs_get_current_stage_progress_v1();
|
||||
|
||||
void pfs_end_stage_v1();
|
||||
|
||||
C_MODE_END
|
||||
|
||||
#endif /* MYSQL_DYNAMIC_PLUGIN */
|
||||
#endif /* EMBEDDED_LIBRARY */
|
||||
#endif /* MYSQL_SERVER */
|
||||
#endif /* HAVE_PSI_STAGE_INTERFACE */
|
||||
|
||||
#endif
|
||||
|
118
include/pfs_statement_provider.h
Normal file
118
include/pfs_statement_provider.h
Normal file
|
@ -0,0 +1,118 @@
|
|||
/* 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 PFS_STATEMENT_PROVIDER_H
|
||||
#define PFS_STATEMENT_PROVIDER_H
|
||||
|
||||
/**
|
||||
@file include/pfs_statement_provider.h
|
||||
Performance schema instrumentation (declarations).
|
||||
*/
|
||||
|
||||
#ifdef HAVE_PSI_STATEMENT_INTERFACE
|
||||
#ifdef MYSQL_SERVER
|
||||
#ifndef EMBEDDED_LIBRARY
|
||||
#ifndef MYSQL_DYNAMIC_PLUGIN
|
||||
|
||||
#include "mysql/psi/psi.h"
|
||||
|
||||
#define PSI_STATEMENT_CALL(M) pfs_ ## M ## _v1
|
||||
#define PSI_DIGEST_CALL(M) pfs_ ## M ## _v1
|
||||
|
||||
C_MODE_START
|
||||
|
||||
void pfs_register_statement_v1(const char *category,
|
||||
PSI_statement_info_v1 *info,
|
||||
int count);
|
||||
|
||||
PSI_statement_locker*
|
||||
pfs_get_thread_statement_locker_v1(PSI_statement_locker_state *state,
|
||||
PSI_statement_key key,
|
||||
const void *charset,
|
||||
PSI_sp_share *sp_share);
|
||||
|
||||
PSI_statement_locker*
|
||||
pfs_refine_statement_v1(PSI_statement_locker *locker,
|
||||
PSI_statement_key key);
|
||||
|
||||
void pfs_start_statement_v1(PSI_statement_locker *locker,
|
||||
const char *db, uint db_len,
|
||||
const char *src_file, uint src_line);
|
||||
|
||||
void pfs_set_statement_text_v1(PSI_statement_locker *locker,
|
||||
const char *text, uint text_len);
|
||||
|
||||
void pfs_set_statement_lock_time_v1(PSI_statement_locker *locker,
|
||||
ulonglong count);
|
||||
|
||||
void pfs_set_statement_rows_sent_v1(PSI_statement_locker *locker,
|
||||
ulonglong count);
|
||||
|
||||
void pfs_set_statement_rows_examined_v1(PSI_statement_locker *locker,
|
||||
ulonglong count);
|
||||
|
||||
void pfs_inc_statement_created_tmp_disk_tables_v1(PSI_statement_locker *locker,
|
||||
ulong count);
|
||||
|
||||
void pfs_inc_statement_created_tmp_tables_v1(PSI_statement_locker *locker,
|
||||
ulong count);
|
||||
|
||||
void pfs_inc_statement_select_full_join_v1(PSI_statement_locker *locker,
|
||||
ulong count);
|
||||
|
||||
void pfs_inc_statement_select_full_range_join_v1(PSI_statement_locker *locker,
|
||||
ulong count);
|
||||
|
||||
void pfs_inc_statement_select_range_v1(PSI_statement_locker *locker,
|
||||
ulong count);
|
||||
|
||||
void pfs_inc_statement_select_range_check_v1(PSI_statement_locker *locker,
|
||||
ulong count);
|
||||
|
||||
void pfs_inc_statement_select_scan_v1(PSI_statement_locker *locker,
|
||||
ulong count);
|
||||
|
||||
void pfs_inc_statement_sort_merge_passes_v1(PSI_statement_locker *locker,
|
||||
ulong count);
|
||||
|
||||
void pfs_inc_statement_sort_range_v1(PSI_statement_locker *locker,
|
||||
ulong count);
|
||||
|
||||
void pfs_inc_statement_sort_rows_v1(PSI_statement_locker *locker,
|
||||
ulong count);
|
||||
|
||||
void pfs_inc_statement_sort_scan_v1(PSI_statement_locker *locker,
|
||||
ulong count);
|
||||
|
||||
void pfs_set_statement_no_index_used_v1(PSI_statement_locker *locker);
|
||||
|
||||
void pfs_set_statement_no_good_index_used_v1(PSI_statement_locker *locker);
|
||||
|
||||
void pfs_end_statement_v1(PSI_statement_locker *locker, void *stmt_da);
|
||||
|
||||
PSI_digest_locker *pfs_digest_start_v1(PSI_statement_locker *locker);
|
||||
|
||||
void pfs_digest_end_v1(PSI_digest_locker *locker,
|
||||
const sql_digest_storage *digest);
|
||||
|
||||
C_MODE_END
|
||||
|
||||
#endif /* MYSQL_DYNAMIC_PLUGIN */
|
||||
#endif /* EMBEDDED_LIBRARY */
|
||||
#endif /* MYSQL_SERVER */
|
||||
#endif /* HAVE_PSI_STATEMENT_INTERFACE */
|
||||
|
||||
#endif
|
||||
|
83
include/pfs_table_provider.h
Normal file
83
include/pfs_table_provider.h
Normal file
|
@ -0,0 +1,83 @@
|
|||
/* 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 PFS_TABLE_PROVIDER_H
|
||||
#define PFS_TABLE_PROVIDER_H
|
||||
|
||||
/**
|
||||
@file include/pfs_table_provider.h
|
||||
Performance schema instrumentation (declarations).
|
||||
*/
|
||||
|
||||
#ifdef HAVE_PSI_TABLE_INTERFACE
|
||||
#ifdef MYSQL_SERVER
|
||||
#ifndef EMBEDDED_LIBRARY
|
||||
#ifndef MYSQL_DYNAMIC_PLUGIN
|
||||
|
||||
#include "mysql/psi/psi.h"
|
||||
|
||||
#define PSI_TABLE_CALL(M) pfs_ ## M ## _v1
|
||||
|
||||
C_MODE_START
|
||||
|
||||
PSI_table_share*
|
||||
pfs_get_table_share_v1(my_bool temporary, struct TABLE_SHARE *share);
|
||||
|
||||
void pfs_release_table_share_v1(PSI_table_share* share);
|
||||
|
||||
void
|
||||
pfs_drop_table_share_v1(my_bool temporary,
|
||||
const char *schema_name, int schema_name_length,
|
||||
const char *table_name, int table_name_length);
|
||||
|
||||
PSI_table*
|
||||
pfs_open_table_v1(PSI_table_share *share, const void *identity);
|
||||
|
||||
void pfs_unbind_table_v1(PSI_table *table);
|
||||
|
||||
PSI_table *
|
||||
pfs_rebind_table_v1(PSI_table_share *share, const void *identity, PSI_table *table);
|
||||
|
||||
void pfs_close_table_v1(struct TABLE_SHARE *server_share, PSI_table *table);
|
||||
|
||||
PSI_table_locker*
|
||||
pfs_start_table_io_wait_v1(PSI_table_locker_state *state,
|
||||
PSI_table *table,
|
||||
PSI_table_io_operation op,
|
||||
uint index,
|
||||
const char *src_file, uint src_line);
|
||||
|
||||
PSI_table_locker*
|
||||
pfs_start_table_lock_wait_v1(PSI_table_locker_state *state,
|
||||
PSI_table *table,
|
||||
PSI_table_lock_operation op,
|
||||
ulong op_flags,
|
||||
const char *src_file, uint src_line);
|
||||
|
||||
void pfs_end_table_io_wait_v1(PSI_table_locker* locker, ulonglong numrows);
|
||||
|
||||
void pfs_end_table_lock_wait_v1(PSI_table_locker* locker);
|
||||
|
||||
void pfs_unlock_table_v1(PSI_table *table);
|
||||
|
||||
C_MODE_END
|
||||
|
||||
#endif /* MYSQL_DYNAMIC_PLUGIN */
|
||||
#endif /* EMBEDDED_LIBRARY */
|
||||
#endif /* MYSQL_SERVER */
|
||||
#endif /* HAVE_PSI_TABLE_INTERFACE */
|
||||
|
||||
#endif
|
||||
|
170
include/pfs_thread_provider.h
Normal file
170
include/pfs_thread_provider.h
Normal file
|
@ -0,0 +1,170 @@
|
|||
/* 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 PFS_THREAD_PROVIDER_H
|
||||
#define PFS_THREAD_PROVIDER_H
|
||||
|
||||
/**
|
||||
@file include/pfs_thread_provider.h
|
||||
Performance schema instrumentation (declarations).
|
||||
*/
|
||||
|
||||
#ifdef HAVE_PSI_THREAD_INTERFACE
|
||||
#ifdef MYSQL_SERVER
|
||||
#ifndef EMBEDDED_LIBRARY
|
||||
#ifndef MYSQL_DYNAMIC_PLUGIN
|
||||
|
||||
#include "mysql/psi/psi.h"
|
||||
|
||||
#define PSI_MUTEX_CALL(M) pfs_ ## M ## _v1
|
||||
#define PSI_RWLOCK_CALL(M) pfs_ ## M ## _v1
|
||||
#define PSI_COND_CALL(M) pfs_ ## M ## _v1
|
||||
#define PSI_THREAD_CALL(M) pfs_ ## M ## _v1
|
||||
|
||||
C_MODE_START
|
||||
|
||||
void pfs_register_mutex_v1(const char *category,
|
||||
PSI_mutex_info_v1 *info,
|
||||
int count);
|
||||
|
||||
void pfs_register_rwlock_v1(const char *category,
|
||||
PSI_rwlock_info_v1 *info,
|
||||
int count);
|
||||
|
||||
void pfs_register_cond_v1(const char *category,
|
||||
PSI_cond_info_v1 *info,
|
||||
int count);
|
||||
|
||||
void pfs_register_thread_v1(const char *category,
|
||||
PSI_thread_info_v1 *info,
|
||||
int count);
|
||||
|
||||
PSI_mutex*
|
||||
pfs_init_mutex_v1(PSI_mutex_key key, const void *identity);
|
||||
|
||||
void pfs_destroy_mutex_v1(PSI_mutex* mutex);
|
||||
|
||||
PSI_rwlock*
|
||||
pfs_init_rwlock_v1(PSI_rwlock_key key, const void *identity);
|
||||
|
||||
void pfs_destroy_rwlock_v1(PSI_rwlock* rwlock);
|
||||
|
||||
PSI_cond*
|
||||
pfs_init_cond_v1(PSI_cond_key key, const void *identity);
|
||||
|
||||
void pfs_destroy_cond_v1(PSI_cond* cond);
|
||||
|
||||
int pfs_spawn_thread_v1(PSI_thread_key key,
|
||||
pthread_t *thread, const pthread_attr_t *attr,
|
||||
void *(*start_routine)(void*), void *arg);
|
||||
|
||||
PSI_thread*
|
||||
pfs_new_thread_v1(PSI_thread_key key, const void *identity, ulonglong processlist_id);
|
||||
|
||||
void pfs_set_thread_id_v1(PSI_thread *thread, ulonglong processlist_id);
|
||||
void pfs_set_thread_THD_v1(PSI_thread *thread, THD *thd);
|
||||
void pfs_set_thread_os_id_v1(PSI_thread *thread);
|
||||
|
||||
PSI_thread*
|
||||
pfs_get_thread_v1(void);
|
||||
|
||||
void pfs_set_thread_user_v1(const char *user, int user_len);
|
||||
|
||||
void pfs_set_thread_account_v1(const char *user, int user_len,
|
||||
const char *host, int host_len);
|
||||
|
||||
void pfs_set_thread_db_v1(const char* db, int db_len);
|
||||
|
||||
void pfs_set_thread_command_v1(int command);
|
||||
|
||||
void pfs_set_thread_start_time_v1(time_t start_time);
|
||||
|
||||
void pfs_set_thread_state_v1(const char* state);
|
||||
|
||||
void pfs_set_connection_type_v1(opaque_vio_type conn_type);
|
||||
|
||||
void pfs_set_thread_info_v1(const char* info, uint info_len);
|
||||
|
||||
void pfs_set_thread_v1(PSI_thread* thread);
|
||||
|
||||
void pfs_delete_current_thread_v1(void);
|
||||
|
||||
void pfs_delete_thread_v1(PSI_thread *thread);
|
||||
|
||||
PSI_mutex_locker*
|
||||
pfs_start_mutex_wait_v1(PSI_mutex_locker_state *state,
|
||||
PSI_mutex *mutex, PSI_mutex_operation op,
|
||||
const char *src_file, uint src_line);
|
||||
|
||||
PSI_rwlock_locker*
|
||||
pfs_start_rwlock_rdwait_v1(PSI_rwlock_locker_state *state,
|
||||
PSI_rwlock *rwlock,
|
||||
PSI_rwlock_operation op,
|
||||
const char *src_file, uint src_line);
|
||||
|
||||
PSI_rwlock_locker*
|
||||
pfs_start_rwlock_wrwait_v1(PSI_rwlock_locker_state *state,
|
||||
PSI_rwlock *rwlock,
|
||||
PSI_rwlock_operation op,
|
||||
const char *src_file, uint src_line);
|
||||
|
||||
PSI_cond_locker*
|
||||
pfs_start_cond_wait_v1(PSI_cond_locker_state *state,
|
||||
PSI_cond *cond, PSI_mutex *mutex,
|
||||
PSI_cond_operation op,
|
||||
const char *src_file, uint src_line);
|
||||
|
||||
PSI_table_locker*
|
||||
pfs_start_table_io_wait_v1(PSI_table_locker_state *state,
|
||||
PSI_table *table,
|
||||
PSI_table_io_operation op,
|
||||
uint index,
|
||||
const char *src_file, uint src_line);
|
||||
|
||||
PSI_table_locker*
|
||||
pfs_start_table_lock_wait_v1(PSI_table_locker_state *state,
|
||||
PSI_table *table,
|
||||
PSI_table_lock_operation op,
|
||||
ulong op_flags,
|
||||
const char *src_file, uint src_line);
|
||||
|
||||
void pfs_unlock_mutex_v1(PSI_mutex *mutex);
|
||||
|
||||
void pfs_unlock_rwlock_v1(PSI_rwlock *rwlock);
|
||||
|
||||
void pfs_signal_cond_v1(PSI_cond* cond);
|
||||
|
||||
void pfs_broadcast_cond_v1(PSI_cond* cond);
|
||||
|
||||
void pfs_end_mutex_wait_v1(PSI_mutex_locker* locker, int rc);
|
||||
|
||||
void pfs_end_rwlock_rdwait_v1(PSI_rwlock_locker* locker, int rc);
|
||||
|
||||
void pfs_end_rwlock_wrwait_v1(PSI_rwlock_locker* locker, int rc);
|
||||
|
||||
void pfs_end_cond_wait_v1(PSI_cond_locker* locker, int rc);
|
||||
|
||||
int pfs_set_thread_connect_attrs_v1(const char *buffer, uint length,
|
||||
const void *from_cs);
|
||||
|
||||
C_MODE_END
|
||||
|
||||
#endif /* EMBEDDED_LIBRARY */
|
||||
#endif /* MYSQL_DYNAMIC_PLUGIN */
|
||||
#endif /* MYSQL_SERVER */
|
||||
#endif /* HAVE_PSI_THREAD_INTERFACE */
|
||||
|
||||
#endif
|
||||
|
79
include/pfs_transaction_provider.h
Normal file
79
include/pfs_transaction_provider.h
Normal file
|
@ -0,0 +1,79 @@
|
|||
/* 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 PFS_TRANSACTION_PROVIDER_H
|
||||
#define PFS_TRANSACTION_PROVIDER_H
|
||||
|
||||
/**
|
||||
@file include/pfs_transaction_provider.h
|
||||
Performance schema instrumentation (declarations).
|
||||
*/
|
||||
|
||||
#ifdef HAVE_PSI_TRANSACTION_INTERFACE
|
||||
#ifdef MYSQL_SERVER
|
||||
#ifndef EMBEDDED_LIBRARY
|
||||
#ifndef MYSQL_DYNAMIC_PLUGIN
|
||||
|
||||
#include "mysql/psi/psi.h"
|
||||
|
||||
#define PSI_TRANSACTION_CALL(M) pfs_ ## M ## _v1
|
||||
|
||||
C_MODE_START
|
||||
|
||||
PSI_transaction_locker*
|
||||
pfs_get_thread_transaction_locker_v1(PSI_transaction_locker_state *state,
|
||||
const void *xid,
|
||||
const ulonglong *trxid,
|
||||
int isolation_level,
|
||||
my_bool read_only,
|
||||
my_bool autocommit);
|
||||
|
||||
void pfs_start_transaction_v1(PSI_transaction_locker *locker,
|
||||
const char *src_file, uint src_line);
|
||||
|
||||
void pfs_set_transaction_xid_v1(PSI_transaction_locker *locker,
|
||||
const void *xid,
|
||||
int xa_state);
|
||||
|
||||
void pfs_set_transaction_xa_state_v1(PSI_transaction_locker *locker,
|
||||
int xa_state);
|
||||
|
||||
void pfs_set_transaction_gtid_v1(PSI_transaction_locker *locker,
|
||||
const void *sid,
|
||||
const void *gtid_spec);
|
||||
|
||||
void pfs_set_transaction_trxid_v1(PSI_transaction_locker *locker,
|
||||
const ulonglong *trxid);
|
||||
|
||||
void pfs_inc_transaction_savepoints_v1(PSI_transaction_locker *locker,
|
||||
ulong count);
|
||||
|
||||
void pfs_inc_transaction_rollback_to_savepoint_v1(PSI_transaction_locker *locker,
|
||||
ulong count);
|
||||
|
||||
void pfs_inc_transaction_release_savepoint_v1(PSI_transaction_locker *locker,
|
||||
ulong count);
|
||||
|
||||
void pfs_end_transaction_v1(PSI_transaction_locker *locker, my_bool commit);
|
||||
|
||||
C_MODE_END
|
||||
|
||||
#endif /* MYSQL_DYNAMIC_PLUGIN */
|
||||
#endif /* EMBEDDED_LIBRARY */
|
||||
#endif /* MYSQL_SERVER */
|
||||
#endif /* HAVE_PSI_TRANSACTION_INTERFACE */
|
||||
|
||||
#endif
|
||||
|
|
@ -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');
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
@ -30,7 +35,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.
|
||||
|
||||
|
@ -61,15 +66,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);
|
||||
|
||||
--connection default
|
||||
|
||||
|
@ -96,6 +109,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;
|
||||
|
@ -131,15 +149,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);
|
||||
|
||||
--connection default
|
||||
|
||||
|
@ -166,6 +192,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;
|
||||
|
@ -197,15 +228,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);
|
||||
|
||||
--connection default
|
||||
|
||||
|
@ -232,6 +271,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;
|
||||
|
@ -263,15 +307,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);
|
||||
|
||||
--connection default
|
||||
|
||||
|
@ -298,6 +350,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;
|
||||
|
@ -329,6 +386,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;
|
||||
|
@ -360,6 +422,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;
|
||||
|
@ -391,6 +458,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;
|
||||
|
@ -422,6 +494,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 +526,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;
|
||||
|
@ -474,6 +556,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;
|
||||
|
@ -499,6 +586,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;
|
||||
|
@ -524,6 +616,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;
|
||||
|
@ -549,6 +646,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;
|
||||
|
@ -574,6 +676,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;
|
||||
|
@ -599,6 +706,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;
|
||||
|
@ -624,6 +736,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;
|
||||
|
@ -649,6 +766,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;
|
||||
|
@ -674,6 +796,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;
|
||||
|
@ -699,6 +826,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;
|
||||
|
@ -724,6 +856,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;
|
||||
|
@ -749,6 +886,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;
|
||||
|
@ -774,6 +916,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;
|
||||
|
@ -799,13 +946,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();
|
||||
|
@ -824,13 +976,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();
|
||||
|
@ -849,13 +1006,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();
|
||||
|
@ -874,6 +1036,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
|
||||
|
@ -90,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;
|
||||
|
@ -111,14 +118,16 @@ update performance_schema.threads set instrumented='NO';
|
|||
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_user_locks',
|
||||
where name in ('wait/synch/mutex/sql/LOCK_connection_count',
|
||||
'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', 'stage/sql/Init for update',
|
||||
'stage/sql/Checking permissions',
|
||||
where name in ('stage/sql/starting',
|
||||
'stage/sql/init',
|
||||
'stage/sql/checking permissions',
|
||||
'stage/sql/Opening tables',
|
||||
'stage/sql/Closing tables');
|
||||
|
||||
|
@ -128,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;
|
||||
|
@ -154,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;
|
||||
|
@ -180,7 +200,8 @@ begin
|
|||
if (my_thread_id is not null) then
|
||||
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_user_locks',
|
||||
where event_name in ('wait/synch/mutex/sql/LOCK_connection_count',
|
||||
'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 +218,8 @@ prepare dump_waits_account from
|
|||
"select user, host, event_name, count_star
|
||||
from performance_schema.events_waits_summary_by_account_by_event_name
|
||||
where user like \'user%\'
|
||||
and event_name in ('wait/synch/mutex/sql/LOCK_user_locks',
|
||||
and event_name in ('wait/synch/mutex/sql/LOCK_connection_count',
|
||||
'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;";
|
||||
|
@ -206,7 +228,8 @@ prepare dump_waits_user from
|
|||
"select user, event_name, count_star
|
||||
from performance_schema.events_waits_summary_by_user_by_event_name
|
||||
where user like \'user%\'
|
||||
and event_name in ('wait/synch/mutex/sql/LOCK_user_locks',
|
||||
and event_name in ('wait/synch/mutex/sql/LOCK_connection_count',
|
||||
'wait/synch/mutex/sql/LOCK_uuid_generator',
|
||||
'wait/synch/rwlock/sql/LOCK_grant',
|
||||
'wait/io/file/sql/query_log')
|
||||
order by user, event_name;";
|
||||
|
@ -215,7 +238,8 @@ prepare dump_waits_host from
|
|||
"select host, event_name, count_star
|
||||
from performance_schema.events_waits_summary_by_host_by_event_name
|
||||
where host=\'localhost\'
|
||||
and event_name in ('wait/synch/mutex/sql/LOCK_user_locks',
|
||||
and event_name in ('wait/synch/mutex/sql/LOCK_connection_count',
|
||||
'wait/synch/mutex/sql/LOCK_uuid_generator',
|
||||
'wait/synch/rwlock/sql/LOCK_grant',
|
||||
'wait/io/file/sql/query_log')
|
||||
order by host, event_name;";
|
||||
|
@ -223,7 +247,8 @@ prepare dump_waits_host from
|
|||
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_user_locks',
|
||||
where event_name in ('wait/synch/mutex/sql/LOCK_connection_count',
|
||||
'wait/synch/mutex/sql/LOCK_uuid_generator',
|
||||
'wait/synch/rwlock/sql/LOCK_grant',
|
||||
'wait/io/file/sql/query_log')
|
||||
order by event_name;";
|
||||
|
@ -231,7 +256,8 @@ prepare dump_waits_global from
|
|||
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_user_locks',
|
||||
where event_name in ('wait/synch/mutex/sql/LOCK_connection_count',
|
||||
'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;";
|
||||
|
@ -240,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', 'stage/sql/Init for update',
|
||||
and event_name in ('stage/sql/starting',
|
||||
'stage/sql/init',
|
||||
'stage/sql/checking permissions',
|
||||
'stage/sql/Opening tables',
|
||||
'stage/sql/closing tables')
|
||||
|
@ -250,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', 'stage/sql/Init for update',
|
||||
and event_name in ('stage/sql/starting',
|
||||
'stage/sql/init',
|
||||
'stage/sql/checking permissions',
|
||||
'stage/sql/Opening tables',
|
||||
'stage/sql/closing tables')
|
||||
|
@ -260,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', 'stage/sql/Init for update',
|
||||
and event_name in ('stage/sql/starting',
|
||||
'stage/sql/init',
|
||||
'stage/sql/checking permissions',
|
||||
'stage/sql/Opening tables',
|
||||
'stage/sql/closing tables')
|
||||
|
@ -269,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', 'stage/sql/Init for update',
|
||||
where event_name in ('stage/sql/starting',
|
||||
'stage/sql/init',
|
||||
'stage/sql/checking permissions',
|
||||
'stage/sql/Opening tables',
|
||||
'stage/sql/closing tables')
|
||||
|
@ -278,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', 'stage/sql/Init for update',
|
||||
where event_name in ('stage/sql/starting',
|
||||
'stage/sql/init',
|
||||
'stage/sql/checking permissions',
|
||||
'stage/sql/Opening tables',
|
||||
'stage/sql/closing tables')
|
||||
|
@ -291,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
|
||||
|
@ -301,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
|
||||
|
@ -311,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
|
||||
|
@ -320,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
|
||||
|
@ -329,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;
|
||||
|
|
@ -7,13 +7,13 @@ 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
|
||||
|
||||
--disable_result_log
|
||||
--disable_query_log
|
||||
select * from performance_schema.accounts;
|
||||
select * from performance_schema.cond_instances;
|
||||
select * from performance_schema.events_stages_current;
|
||||
|
@ -33,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;
|
||||
|
@ -42,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;
|
||||
|
@ -61,13 +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
|
||||
--enable_query_log
|
||||
|
||||
# This has a stable output, printing the result:
|
||||
show global variables like "performance_schema%";
|
||||
|
||||
# This has an unrepeatable output, it does depends too much on
|
||||
# - the platform hardware (sizeof structures, padding)
|
||||
|
@ -78,6 +115,6 @@ select * from performance_schema.users;
|
|||
|
||||
--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
|
||||
|
||||
|
@ -88,13 +101,34 @@ 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;
|
||||
|
||||
--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 +181,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;
|
||||
|
||||
--connection default
|
||||
|
||||
|
@ -202,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;
|
||||
|
||||
--connection default
|
||||
|
||||
|
@ -257,9 +291,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;
|
||||
|
||||
--connection default
|
||||
|
||||
|
@ -494,4 +528,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%";
|
||||
|
||||
|
|
|
@ -222,7 +222,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\',
|
||||
|
@ -254,7 +256,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'
|
||||
|
|
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,145 @@
|
|||
# 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);
|
||||
--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
|
||||
|
||||
|
||||
|
|
@ -14,3 +14,4 @@
|
|||
--remove_file $MYSQLTEST_VARDIR/tmp/err_file
|
||||
--remove_file $MYSQLD_DATADIR/mysql_upgrade_info
|
||||
|
||||
--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,4 +0,0 @@
|
|||
# Kill the server
|
||||
Found: unknown variable 'performance-schema-enabled=maybe'
|
||||
Found: Aborting
|
||||
# restart
|
|
@ -1,3 +0,0 @@
|
|||
# Kill the server
|
||||
FOUND 1 /ambiguous option '--performance-schema-max_=12'/ in bad_option_2.txt
|
||||
# restart
|
|
@ -1,4 +0,0 @@
|
|||
# Kill the server
|
||||
Found: unknown option '-x'
|
||||
Found: Aborting
|
||||
# restart
|
|
@ -1,4 +0,0 @@
|
|||
# Kill the server
|
||||
Found: Can't change dir to.*bad_option_h_param
|
||||
Found: Aborting
|
||||
# restart
|
|
@ -1,4 +0,0 @@
|
|||
# Kill the server
|
||||
Found: unknown option '-X'
|
||||
Found: Aborting
|
||||
# restart
|
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
|
||||
|
|
|
@ -37,10 +37,15 @@ SELECT COUNT(DISTINCT PROCESSLIST_ID)
|
|||
FROM performance_schema.session_connect_attrs;
|
||||
COUNT(DISTINCT PROCESSLIST_ID)
|
||||
2
|
||||
<<<<<<< HEAD
|
||||
connection non_privileged_user;
|
||||
=======
|
||||
# must return 1
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
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,7 +25,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
<<<<<<< HEAD
|
||||
connect con1a, localhost, user1, , ;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "user1 in con1a" as status;
|
||||
status
|
||||
user1 in con1a
|
||||
|
@ -31,7 +50,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
<<<<<<< HEAD
|
||||
connect con1b, localhost, user1, , ;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "user1 in con1b" as status;
|
||||
status
|
||||
user1 in con1b
|
||||
|
@ -52,7 +76,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
<<<<<<< HEAD
|
||||
connect con1c, localhost, user1, , ;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "user1 in con1c" as status;
|
||||
status
|
||||
user1 in con1c
|
||||
|
@ -74,7 +103,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
<<<<<<< HEAD
|
||||
connect con2a, localhost, user2, , ;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "user2 in con2a" as status;
|
||||
status
|
||||
user2 in con2a
|
||||
|
@ -99,7 +133,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
<<<<<<< HEAD
|
||||
connect con2b, localhost, user2, , ;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "user2 in con2b" as status;
|
||||
status
|
||||
user2 in con2b
|
||||
|
@ -125,7 +164,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
<<<<<<< HEAD
|
||||
connect con2c, localhost, user2, , ;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "user2 in con2c" as status;
|
||||
status
|
||||
user2 in con2c
|
||||
|
@ -152,7 +196,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
<<<<<<< HEAD
|
||||
connect con3a, localhost, user3, , ;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "user3 in con3a" as status;
|
||||
status
|
||||
user3 in con3a
|
||||
|
@ -182,7 +231,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
<<<<<<< HEAD
|
||||
connect con3b, localhost, user3, , ;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "user3 in con3b" as status;
|
||||
status
|
||||
user3 in con3b
|
||||
|
@ -213,7 +267,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
<<<<<<< HEAD
|
||||
connect con3c, localhost, user3, , ;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "user3 in con3c" as status;
|
||||
status
|
||||
user3 in con3c
|
||||
|
@ -245,8 +304,13 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
<<<<<<< HEAD
|
||||
connection default;
|
||||
disconnect con1a;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "con1a disconnected" as status;
|
||||
status
|
||||
con1a disconnected
|
||||
|
@ -277,7 +341,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
<<<<<<< HEAD
|
||||
disconnect con2a;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "con2a disconnected" as status;
|
||||
status
|
||||
con2a disconnected
|
||||
|
@ -307,7 +376,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
<<<<<<< HEAD
|
||||
disconnect con3a;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "con3a disconnected" as status;
|
||||
status
|
||||
con3a disconnected
|
||||
|
@ -336,6 +410,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
|
||||
|
@ -362,6 +438,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
|
||||
|
@ -388,6 +466,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
|
||||
|
@ -414,7 +494,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
<<<<<<< HEAD
|
||||
connect con4a, localhost, user4, , ;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "user4 in con4a" as status;
|
||||
status
|
||||
user4 in con4a
|
||||
|
@ -446,7 +531,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
<<<<<<< HEAD
|
||||
connect con4b, localhost, user4, , ;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "user4 in con4b" as status;
|
||||
status
|
||||
user4 in con4b
|
||||
|
@ -479,7 +569,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
<<<<<<< HEAD
|
||||
connect con4c, localhost, user4, , ;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "user4 in con4c" as status;
|
||||
status
|
||||
user4 in con4c
|
||||
|
@ -513,8 +608,13 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
<<<<<<< HEAD
|
||||
connection default;
|
||||
disconnect con1b;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "con1b disconnected" as status;
|
||||
status
|
||||
con1b disconnected
|
||||
|
@ -547,7 +647,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
<<<<<<< HEAD
|
||||
disconnect con2b;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "con2b disconnected" as status;
|
||||
status
|
||||
con2b disconnected
|
||||
|
@ -579,7 +684,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
<<<<<<< HEAD
|
||||
disconnect con3b;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "con3b disconnected" as status;
|
||||
status
|
||||
con3b disconnected
|
||||
|
@ -610,7 +720,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
<<<<<<< HEAD
|
||||
disconnect con1c;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "con1c disconnected" as status;
|
||||
status
|
||||
con1c disconnected
|
||||
|
@ -640,7 +755,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
<<<<<<< HEAD
|
||||
disconnect con2c;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "con2c disconnected" as status;
|
||||
status
|
||||
con2c disconnected
|
||||
|
@ -669,7 +789,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
<<<<<<< HEAD
|
||||
disconnect con3c;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "con3c disconnected" as status;
|
||||
status
|
||||
con3c disconnected
|
||||
|
@ -697,6 +822,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
|
||||
|
@ -719,6 +846,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
|
||||
|
@ -738,6 +867,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
|
||||
|
@ -757,7 +888,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
<<<<<<< HEAD
|
||||
connect con5a, localhost, user5, , ;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "user5 in con5a" as status;
|
||||
status
|
||||
user5 in con5a
|
||||
|
@ -782,7 +918,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
<<<<<<< HEAD
|
||||
connect con5b, localhost, user5, , ;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "user5 in con5b" as status;
|
||||
status
|
||||
user5 in con5b
|
||||
|
@ -808,7 +949,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
<<<<<<< HEAD
|
||||
connect con5c, localhost, user5, , ;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "user5 in con5c" as status;
|
||||
status
|
||||
user5 in con5c
|
||||
|
@ -835,6 +981,7 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
<<<<<<< HEAD
|
||||
connection default;
|
||||
disconnect con4a;
|
||||
disconnect con4b;
|
||||
|
@ -842,6 +989,10 @@ disconnect con4c;
|
|||
disconnect con5a;
|
||||
disconnect con5b;
|
||||
disconnect con5c;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "con 5a, 5b, 5c, 6a, 6b, 6c disconnected" as status;
|
||||
status
|
||||
con 5a, 5b, 5c, 6a, 6b, 6c disconnected
|
||||
|
@ -862,6 +1013,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
|
||||
|
@ -878,6 +1031,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
|
||||
|
@ -892,6 +1047,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
|
||||
|
@ -906,3 +1063,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,7 +25,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
<<<<<<< HEAD
|
||||
connect con1a, localhost, user1, , ;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "user1 in con1a" as status;
|
||||
status
|
||||
user1 in con1a
|
||||
|
@ -31,7 +50,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
<<<<<<< HEAD
|
||||
connect con1b, localhost, user1, , ;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "user1 in con1b" as status;
|
||||
status
|
||||
user1 in con1b
|
||||
|
@ -52,7 +76,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
<<<<<<< HEAD
|
||||
connect con1c, localhost, user1, , ;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "user1 in con1c" as status;
|
||||
status
|
||||
user1 in con1c
|
||||
|
@ -74,7 +103,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
<<<<<<< HEAD
|
||||
connect con2a, localhost, user2, , ;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "user2 in con2a" as status;
|
||||
status
|
||||
user2 in con2a
|
||||
|
@ -98,7 +132,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 1
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
<<<<<<< HEAD
|
||||
connect con2b, localhost, user2, , ;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "user2 in con2b" as status;
|
||||
status
|
||||
user2 in con2b
|
||||
|
@ -123,7 +162,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 2
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
<<<<<<< HEAD
|
||||
connect con2c, localhost, user2, , ;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "user2 in con2c" as status;
|
||||
status
|
||||
user2 in con2c
|
||||
|
@ -149,7 +193,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 3
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
<<<<<<< HEAD
|
||||
connect con3a, localhost, user3, , ;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "user3 in con3a" as status;
|
||||
status
|
||||
user3 in con3a
|
||||
|
@ -177,7 +226,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 4
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
<<<<<<< HEAD
|
||||
connect con3b, localhost, user3, , ;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "user3 in con3b" as status;
|
||||
status
|
||||
user3 in con3b
|
||||
|
@ -206,7 +260,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 5
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
<<<<<<< HEAD
|
||||
connect con3c, localhost, user3, , ;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "user3 in con3c" as status;
|
||||
status
|
||||
user3 in con3c
|
||||
|
@ -236,8 +295,13 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 6
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
<<<<<<< HEAD
|
||||
connection default;
|
||||
disconnect con1a;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "con1a disconnected" as status;
|
||||
status
|
||||
con1a disconnected
|
||||
|
@ -266,7 +330,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 6
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
<<<<<<< HEAD
|
||||
disconnect con2a;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "con2a disconnected" as status;
|
||||
status
|
||||
con2a disconnected
|
||||
|
@ -294,7 +363,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 6
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
<<<<<<< HEAD
|
||||
disconnect con3a;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "con3a disconnected" as status;
|
||||
status
|
||||
con3a disconnected
|
||||
|
@ -321,6 +395,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
|
||||
|
@ -345,6 +421,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
|
||||
|
@ -369,6 +447,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
|
||||
|
@ -393,7 +473,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 6
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
<<<<<<< HEAD
|
||||
connect con4a, localhost, user4, , ;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "user4 in con4a" as status;
|
||||
status
|
||||
user4 in con4a
|
||||
|
@ -422,7 +507,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 7
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
<<<<<<< HEAD
|
||||
connect con4b, localhost, user4, , ;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "user4 in con4b" as status;
|
||||
status
|
||||
user4 in con4b
|
||||
|
@ -452,7 +542,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 8
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
<<<<<<< HEAD
|
||||
connect con4c, localhost, user4, , ;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "user4 in con4c" as status;
|
||||
status
|
||||
user4 in con4c
|
||||
|
@ -483,8 +578,13 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
<<<<<<< HEAD
|
||||
connection default;
|
||||
disconnect con1b;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "con1b disconnected" as status;
|
||||
status
|
||||
con1b disconnected
|
||||
|
@ -514,7 +614,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
<<<<<<< HEAD
|
||||
disconnect con2b;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "con2b disconnected" as status;
|
||||
status
|
||||
con2b disconnected
|
||||
|
@ -543,7 +648,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
<<<<<<< HEAD
|
||||
disconnect con3b;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "con3b disconnected" as status;
|
||||
status
|
||||
con3b disconnected
|
||||
|
@ -571,7 +681,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
<<<<<<< HEAD
|
||||
disconnect con1c;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "con1c disconnected" as status;
|
||||
status
|
||||
con1c disconnected
|
||||
|
@ -598,7 +713,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
<<<<<<< HEAD
|
||||
disconnect con2c;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "con2c disconnected" as status;
|
||||
status
|
||||
con2c disconnected
|
||||
|
@ -624,7 +744,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
<<<<<<< HEAD
|
||||
disconnect con3c;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "con3c disconnected" as status;
|
||||
status
|
||||
con3c disconnected
|
||||
|
@ -649,6 +774,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
|
||||
|
@ -670,6 +797,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
|
||||
|
@ -688,6 +817,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
|
||||
|
@ -706,7 +837,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
<<<<<<< HEAD
|
||||
connect con5a, localhost, user5, , ;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "user5 in con5a" as status;
|
||||
status
|
||||
user5 in con5a
|
||||
|
@ -730,7 +866,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
<<<<<<< HEAD
|
||||
connect con5b, localhost, user5, , ;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "user5 in con5b" as status;
|
||||
status
|
||||
user5 in con5b
|
||||
|
@ -755,7 +896,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
<<<<<<< HEAD
|
||||
connect con5c, localhost, user5, , ;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "user5 in con5c" as status;
|
||||
status
|
||||
user5 in con5c
|
||||
|
@ -781,6 +927,7 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
<<<<<<< HEAD
|
||||
connection default;
|
||||
disconnect con4a;
|
||||
disconnect con4b;
|
||||
|
@ -788,6 +935,10 @@ disconnect con4c;
|
|||
disconnect con5a;
|
||||
disconnect con5b;
|
||||
disconnect con5c;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "con 5a, 5b, 5c, 6a, 6b, 6c disconnected" as status;
|
||||
status
|
||||
con 5a, 5b, 5c, 6a, 6b, 6c disconnected
|
||||
|
@ -807,6 +958,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
|
||||
|
@ -823,6 +976,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
|
||||
|
@ -837,6 +992,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
|
||||
|
@ -851,3 +1008,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,7 +25,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
<<<<<<< HEAD
|
||||
connect con1a, localhost, user1, , ;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "user1 in con1a" as status;
|
||||
status
|
||||
user1 in con1a
|
||||
|
@ -31,7 +50,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
<<<<<<< HEAD
|
||||
connect con1b, localhost, user1, , ;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "user1 in con1b" as status;
|
||||
status
|
||||
user1 in con1b
|
||||
|
@ -52,7 +76,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
<<<<<<< HEAD
|
||||
connect con1c, localhost, user1, , ;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "user1 in con1c" as status;
|
||||
status
|
||||
user1 in con1c
|
||||
|
@ -74,7 +103,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
<<<<<<< HEAD
|
||||
connect con2a, localhost, user2, , ;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "user2 in con2a" as status;
|
||||
status
|
||||
user2 in con2a
|
||||
|
@ -97,7 +131,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 1
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 1
|
||||
<<<<<<< HEAD
|
||||
connect con2b, localhost, user2, , ;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "user2 in con2b" as status;
|
||||
status
|
||||
user2 in con2b
|
||||
|
@ -121,7 +160,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 2
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 2
|
||||
<<<<<<< HEAD
|
||||
connect con2c, localhost, user2, , ;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "user2 in con2c" as status;
|
||||
status
|
||||
user2 in con2c
|
||||
|
@ -146,7 +190,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 3
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 3
|
||||
<<<<<<< HEAD
|
||||
connect con3a, localhost, user3, , ;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "user3 in con3a" as status;
|
||||
status
|
||||
user3 in con3a
|
||||
|
@ -172,7 +221,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 4
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 4
|
||||
<<<<<<< HEAD
|
||||
connect con3b, localhost, user3, , ;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "user3 in con3b" as status;
|
||||
status
|
||||
user3 in con3b
|
||||
|
@ -199,7 +253,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 5
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 5
|
||||
<<<<<<< HEAD
|
||||
connect con3c, localhost, user3, , ;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "user3 in con3c" as status;
|
||||
status
|
||||
user3 in con3c
|
||||
|
@ -227,8 +286,13 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 6
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 6
|
||||
<<<<<<< HEAD
|
||||
connection default;
|
||||
disconnect con1a;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "con1a disconnected" as status;
|
||||
status
|
||||
con1a disconnected
|
||||
|
@ -255,7 +319,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 6
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 6
|
||||
<<<<<<< HEAD
|
||||
disconnect con2a;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "con2a disconnected" as status;
|
||||
status
|
||||
con2a disconnected
|
||||
|
@ -281,7 +350,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 6
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 6
|
||||
<<<<<<< HEAD
|
||||
disconnect con3a;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "con3a disconnected" as status;
|
||||
status
|
||||
con3a disconnected
|
||||
|
@ -306,6 +380,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
|
||||
|
@ -328,6 +404,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
|
||||
|
@ -350,6 +428,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
|
||||
|
@ -372,7 +452,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 6
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 6
|
||||
<<<<<<< HEAD
|
||||
connect con4a, localhost, user4, , ;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "user4 in con4a" as status;
|
||||
status
|
||||
user4 in con4a
|
||||
|
@ -398,7 +483,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 7
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 7
|
||||
<<<<<<< HEAD
|
||||
connect con4b, localhost, user4, , ;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "user4 in con4b" as status;
|
||||
status
|
||||
user4 in con4b
|
||||
|
@ -425,7 +515,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 8
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 8
|
||||
<<<<<<< HEAD
|
||||
connect con4c, localhost, user4, , ;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "user4 in con4c" as status;
|
||||
status
|
||||
user4 in con4c
|
||||
|
@ -453,8 +548,13 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 9
|
||||
<<<<<<< HEAD
|
||||
connection default;
|
||||
disconnect con1b;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "con1b disconnected" as status;
|
||||
status
|
||||
con1b disconnected
|
||||
|
@ -481,7 +581,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 9
|
||||
<<<<<<< HEAD
|
||||
disconnect con2b;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "con2b disconnected" as status;
|
||||
status
|
||||
con2b disconnected
|
||||
|
@ -507,7 +612,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 9
|
||||
<<<<<<< HEAD
|
||||
disconnect con3b;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "con3b disconnected" as status;
|
||||
status
|
||||
con3b disconnected
|
||||
|
@ -532,7 +642,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 9
|
||||
<<<<<<< HEAD
|
||||
disconnect con1c;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "con1c disconnected" as status;
|
||||
status
|
||||
con1c disconnected
|
||||
|
@ -556,7 +671,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 9
|
||||
<<<<<<< HEAD
|
||||
disconnect con2c;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "con2c disconnected" as status;
|
||||
status
|
||||
con2c disconnected
|
||||
|
@ -579,7 +699,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 9
|
||||
<<<<<<< HEAD
|
||||
disconnect con3c;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "con3c disconnected" as status;
|
||||
status
|
||||
con3c disconnected
|
||||
|
@ -601,6 +726,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
|
||||
|
@ -619,6 +746,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
|
||||
|
@ -636,6 +765,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
|
||||
|
@ -653,7 +784,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 9
|
||||
<<<<<<< HEAD
|
||||
connect con5a, localhost, user5, , ;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "user5 in con5a" as status;
|
||||
status
|
||||
user5 in con5a
|
||||
|
@ -676,7 +812,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 9
|
||||
<<<<<<< HEAD
|
||||
connect con5b, localhost, user5, , ;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "user5 in con5b" as status;
|
||||
status
|
||||
user5 in con5b
|
||||
|
@ -700,7 +841,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 9
|
||||
<<<<<<< HEAD
|
||||
connect con5c, localhost, user5, , ;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "user5 in con5c" as status;
|
||||
status
|
||||
user5 in con5c
|
||||
|
@ -725,6 +871,7 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 9
|
||||
<<<<<<< HEAD
|
||||
connection default;
|
||||
disconnect con4a;
|
||||
disconnect con4b;
|
||||
|
@ -732,6 +879,10 @@ disconnect con4c;
|
|||
disconnect con5a;
|
||||
disconnect con5b;
|
||||
disconnect con5c;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "con 5a, 5b, 5c, 6a, 6b, 6c disconnected" as status;
|
||||
status
|
||||
con 5a, 5b, 5c, 6a, 6b, 6c disconnected
|
||||
|
@ -750,6 +901,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
|
||||
|
@ -765,6 +918,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
|
||||
|
@ -779,6 +934,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
|
||||
|
@ -793,3 +950,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,7 +25,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
<<<<<<< HEAD
|
||||
connect con1a, localhost, user1, , ;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "user1 in con1a" as status;
|
||||
status
|
||||
user1 in con1a
|
||||
|
@ -31,7 +50,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
<<<<<<< HEAD
|
||||
connect con1b, localhost, user1, , ;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "user1 in con1b" as status;
|
||||
status
|
||||
user1 in con1b
|
||||
|
@ -52,7 +76,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
<<<<<<< HEAD
|
||||
connect con1c, localhost, user1, , ;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "user1 in con1c" as status;
|
||||
status
|
||||
user1 in con1c
|
||||
|
@ -74,7 +103,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 0
|
||||
<<<<<<< HEAD
|
||||
connect con2a, localhost, user2, , ;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "user2 in con2a" as status;
|
||||
status
|
||||
user2 in con2a
|
||||
|
@ -98,7 +132,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 1
|
||||
<<<<<<< HEAD
|
||||
connect con2b, localhost, user2, , ;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "user2 in con2b" as status;
|
||||
status
|
||||
user2 in con2b
|
||||
|
@ -123,7 +162,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 1
|
||||
<<<<<<< HEAD
|
||||
connect con2c, localhost, user2, , ;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "user2 in con2c" as status;
|
||||
status
|
||||
user2 in con2c
|
||||
|
@ -149,7 +193,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 1
|
||||
<<<<<<< HEAD
|
||||
connect con3a, localhost, user3, , ;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "user3 in con3a" as status;
|
||||
status
|
||||
user3 in con3a
|
||||
|
@ -177,7 +226,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 2
|
||||
<<<<<<< HEAD
|
||||
connect con3b, localhost, user3, , ;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "user3 in con3b" as status;
|
||||
status
|
||||
user3 in con3b
|
||||
|
@ -206,7 +260,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 2
|
||||
<<<<<<< HEAD
|
||||
connect con3c, localhost, user3, , ;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "user3 in con3c" as status;
|
||||
status
|
||||
user3 in con3c
|
||||
|
@ -236,8 +295,13 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 2
|
||||
<<<<<<< HEAD
|
||||
connection default;
|
||||
disconnect con1a;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "con1a disconnected" as status;
|
||||
status
|
||||
con1a disconnected
|
||||
|
@ -266,7 +330,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 2
|
||||
<<<<<<< HEAD
|
||||
disconnect con2a;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "con2a disconnected" as status;
|
||||
status
|
||||
con2a disconnected
|
||||
|
@ -294,7 +363,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 2
|
||||
<<<<<<< HEAD
|
||||
disconnect con3a;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "con3a disconnected" as status;
|
||||
status
|
||||
con3a disconnected
|
||||
|
@ -321,6 +395,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
|
||||
|
@ -345,6 +421,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
|
||||
|
@ -369,6 +447,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
|
||||
|
@ -393,7 +473,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 2
|
||||
<<<<<<< HEAD
|
||||
connect con4a, localhost, user4, , ;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "user4 in con4a" as status;
|
||||
status
|
||||
user4 in con4a
|
||||
|
@ -422,7 +507,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 3
|
||||
<<<<<<< HEAD
|
||||
connect con4b, localhost, user4, , ;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "user4 in con4b" as status;
|
||||
status
|
||||
user4 in con4b
|
||||
|
@ -452,7 +542,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 3
|
||||
<<<<<<< HEAD
|
||||
connect con4c, localhost, user4, , ;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "user4 in con4c" as status;
|
||||
status
|
||||
user4 in con4c
|
||||
|
@ -483,8 +578,13 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 3
|
||||
<<<<<<< HEAD
|
||||
connection default;
|
||||
disconnect con1b;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "con1b disconnected" as status;
|
||||
status
|
||||
con1b disconnected
|
||||
|
@ -514,7 +614,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 3
|
||||
<<<<<<< HEAD
|
||||
disconnect con2b;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "con2b disconnected" as status;
|
||||
status
|
||||
con2b disconnected
|
||||
|
@ -543,7 +648,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 3
|
||||
<<<<<<< HEAD
|
||||
disconnect con3b;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "con3b disconnected" as status;
|
||||
status
|
||||
con3b disconnected
|
||||
|
@ -571,7 +681,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 3
|
||||
<<<<<<< HEAD
|
||||
disconnect con1c;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "con1c disconnected" as status;
|
||||
status
|
||||
con1c disconnected
|
||||
|
@ -598,7 +713,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 3
|
||||
<<<<<<< HEAD
|
||||
disconnect con2c;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "con2c disconnected" as status;
|
||||
status
|
||||
con2c disconnected
|
||||
|
@ -624,7 +744,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 3
|
||||
<<<<<<< HEAD
|
||||
disconnect con3c;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "con3c disconnected" as status;
|
||||
status
|
||||
con3c disconnected
|
||||
|
@ -649,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
|
||||
truncate table performance_schema.accounts;
|
||||
call dump_all();
|
||||
processlist_user processlist_host
|
||||
|
@ -668,6 +795,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
|
||||
|
@ -686,6 +815,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
|
||||
|
@ -704,7 +835,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 3
|
||||
<<<<<<< HEAD
|
||||
connect con5a, localhost, user5, , ;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "user5 in con5a" as status;
|
||||
status
|
||||
user5 in con5a
|
||||
|
@ -728,7 +864,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 3
|
||||
<<<<<<< HEAD
|
||||
connect con5b, localhost, user5, , ;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "user5 in con5b" as status;
|
||||
status
|
||||
user5 in con5b
|
||||
|
@ -753,7 +894,12 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 3
|
||||
<<<<<<< HEAD
|
||||
connect con5c, localhost, user5, , ;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "user5 in con5c" as status;
|
||||
status
|
||||
user5 in con5c
|
||||
|
@ -779,6 +925,7 @@ variable_name variable_value
|
|||
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_HOSTS_LOST 0
|
||||
PERFORMANCE_SCHEMA_USERS_LOST 3
|
||||
<<<<<<< HEAD
|
||||
connection default;
|
||||
disconnect con4a;
|
||||
disconnect con4b;
|
||||
|
@ -786,6 +933,10 @@ disconnect con4c;
|
|||
disconnect con5a;
|
||||
disconnect con5b;
|
||||
disconnect con5c;
|
||||
=======
|
||||
Warnings:
|
||||
Warning 1287 'INFORMATION_SCHEMA.GLOBAL_STATUS' is deprecated and will be removed in a future release. Please use performance_schema.global_status instead
|
||||
>>>>>>> merge-perfschema-5.7
|
||||
select "con 5a, 5b, 5c, 6a, 6b, 6c disconnected" as status;
|
||||
status
|
||||
con 5a, 5b, 5c, 6a, 6b, 6c disconnected
|
||||
|
@ -805,6 +956,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
|
||||
|
@ -820,6 +973,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
|
||||
|
@ -834,6 +989,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
|
||||
|
@ -848,3 +1005,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,6 +70,7 @@ 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
|
||||
<<<<<<< HEAD
|
||||
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
|
||||
|
@ -113,6 +114,42 @@ 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 where Variable_name like 'performance_schema_%' and
|
||||
Variable_name not like 'performance_schema_%_classes_lost';
|
||||
=======
|
||||
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_%';
|
||||
>>>>>>> 258e16fa2de... WIP 5.7 P_S
|
||||
Variable_name Value
|
||||
Performance_schema_accounts_lost 0
|
||||
Performance_schema_cond_instances_lost 0
|
||||
|
@ -120,13 +157,30 @@ Performance_schema_digest_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
|
||||
<<<<<<< HEAD
|
||||
Performance_schema_mutex_instances_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
|
||||
>>>>>>> 258e16fa2de... WIP 5.7 P_S
|
||||
Performance_schema_rwlock_instances_lost 0
|
||||
Performance_schema_session_connect_attrs_lost 0
|
||||
Performance_schema_socket_instances_lost 0
|
||||
Performance_schema_table_handles_lost 0
|
||||
Performance_schema_table_instances_lost 0
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
Performance_schema_table_lock_stat_lost 0
|
||||
Performance_schema_thread_classes_lost 0
|
||||
>>>>>>> 258e16fa2de... WIP 5.7 P_S
|
||||
Performance_schema_thread_instances_lost 0
|
||||
Performance_schema_users_lost 0
|
||||
truncate performance_schema.events_waits_history_long;
|
||||
|
|
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'
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue