Commit a9e22b58 authored by Konstantin Osipov's avatar Konstantin Osipov

Merge next-mr -> next-4284-merge.

parents 1edca1d7 8dfc3fbb
#!/bin/sh
# Copyright (C) 2009 Sun Microsystems, Inc
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# This script's purpose is to update the automake/autoconf helper scripts and
# to run a plain "configure" without any special compile flags. Only features
......@@ -61,6 +77,7 @@ fi
# Remember that configure restricts the man pages to the configured features !
./configure \
--with-embedded-server \
--with-perfschema \
--with-ndbcluster
$gmake
......@@ -40,9 +40,9 @@ extern "C" {
typedef struct unicase_info_st
{
uint16 toupper;
uint16 tolower;
uint16 sort;
uint32 toupper;
uint32 tolower;
uint32 sort;
} MY_UNICASE_INFO;
......@@ -439,6 +439,14 @@ extern size_t my_caseup_mb(CHARSET_INFO *, char *src, size_t srclen,
char *dst, size_t dstlen);
extern size_t my_casedn_mb(CHARSET_INFO *, char *src, size_t srclen,
char *dst, size_t dstlen);
extern size_t my_caseup_mb_varlen(CHARSET_INFO *, char *src, size_t srclen,
char *dst, size_t dstlen);
extern size_t my_casedn_mb_varlen(CHARSET_INFO *, char *src, size_t srclen,
char *dst, size_t dstlen);
extern size_t my_caseup_ujis(CHARSET_INFO *, char *src, size_t srclen,
char *dst, size_t dstlen);
extern size_t my_casedn_ujis(CHARSET_INFO *, char *src, size_t srclen,
char *dst, size_t dstlen);
extern int my_strcasecmp_mb(CHARSET_INFO * cs,const char *, const char *);
int my_wildcmp_mb(CHARSET_INFO *,
......
# Copyright (C) 2000-2006 MySQL AB
# Copyright (C) 2000-2006 MySQL AB, 2008-2009 Sun Microsystems, Inc.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
......@@ -75,6 +75,8 @@ EXTRA_DIST = README \
# List of directories containing test + result files and the
# related test data files that should be copied
# If you want to add a new suite, please check DEFAULT_SUITES in
# mysql-test-run.pl.
TEST_DIRS = t r include std_data std_data/parts collections \
std_data/ndb_backup50 std_data/ndb_backup51 \
std_data/ndb_backup51_data_be std_data/ndb_backup51_data_le \
......@@ -100,7 +102,9 @@ TEST_DIRS = t r include std_data std_data/parts collections \
suite/rpl_ndb suite/rpl_ndb/t suite/rpl_ndb/r \
suite/parts suite/parts/t suite/parts/r suite/parts/inc \
suite/innodb suite/innodb/t suite/innodb/r suite/innodb/include \
suite/sys_vars suite/sys_vars/t suite/sys_vars/inc suite/sys_vars/r
suite/sys_vars suite/sys_vars/t suite/sys_vars/inc suite/sys_vars/r \
suite/perfschema suite/perfschema/t suite/perfschema/r \
suite/perfschema/include
# Used by dist-hook and install-data-local to copy all
# test files into either dist or install directory
......
# Copyright (C) 2009 Sun Microsystems, Inc
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# Use default setting for mysqld processes
!include default_mysqld.cnf
!include default_client.cnf
......@@ -9,6 +24,8 @@
log-bin= master-bin
# Run tests with the performance schema instrumentation
loose-enable-performance-schema
[mysqlbinlog]
disable-force-if-open
......
# Copyright (C) 2009 Sun Microsystems, Inc
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# Default values that applies to all MySQL Servers
[mysqld]
open-files-limit= 1024
......@@ -26,3 +41,6 @@ slave-net-timeout=120
log-bin=mysqld-bin
# Run tests with the performance schema instrumentation
loose-enable-performance-schema
#!/usr/bin/perl
# -*- cperl -*-
# Copyright (C) 2009 Sun Microsystems, Inc
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
##############################################################################
#
......@@ -128,7 +143,9 @@ my $path_config_file; # The generated config file, var/my.cnf
# executables will be used by the test suite.
our $opt_vs_config = $ENV{'MTR_VS_CONFIG'};
my $DEFAULT_SUITES= "main,sys_vars,binlog,federated,rpl,rpl_ndb,ndb,innodb";
# If you add a new suite, please check TEST_DIRS in Makefile.am.
#
my $DEFAULT_SUITES= "main,sys_vars,binlog,federated,rpl,rpl_ndb,ndb,innodb,perfschema";
my $opt_suites;
our $opt_verbose= 0; # Verbose output, enable with --verbose
......
......@@ -3,6 +3,7 @@ Database
information_schema
mtr
mysql
performance_schema
test
show tables in mysql;
Tables_in_mysql
......
......@@ -277,3 +277,281 @@ hex(a)
EE00
drop table t1;
End of 5.0 tests
#
# Start of 5.5 tests
#
#
# Testing WL#4583 Case conversion in Asian character sets
#
SET NAMES utf8;
SET collation_connection=big5_chinese_ci;
CREATE TABLE t1 (b VARCHAR(2));
INSERT INTO t1 VALUES ('0'),('1'),('2'),('3'),('4'),('5'),('6'),('7');
INSERT INTO t1 VALUES ('8'),('9'),('A'),('B'),('C'),('D'),('E'),('F');
CREATE TEMPORARY TABLE head AS SELECT concat(b1.b, b2.b) AS head FROM t1 b1, t1 b2;
CREATE TEMPORARY TABLE tail AS SELECT concat(b1.b, b2.b) AS tail FROM t1 b1, t1 b2;
DROP TABLE t1;
CREATE TABLE t1 AS
SELECT concat(head, tail) AS code, ' ' AS a
FROM head, tail
WHERE (head BETWEEN '80' AND 'FF') AND (tail BETWEEN '20' AND 'FF')
ORDER BY head, tail;
DROP TEMPORARY TABLE head, tail;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`code` varchar(8) DEFAULT NULL,
`a` varchar(1) CHARACTER SET big5 NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT COUNT(*) FROM t1;
COUNT(*)
28672
UPDATE t1 SET a=unhex(code) ORDER BY code;
Warnings:
Warning 1366 Incorrect string value: '\x80 ' for column 'a' at row 1
Warning 1366 Incorrect string value: '\x80!' for column 'a' at row 2
Warning 1366 Incorrect string value: '\x80"' for column 'a' at row 3
Warning 1366 Incorrect string value: '\x80#' for column 'a' at row 4
Warning 1366 Incorrect string value: '\x80$' for column 'a' at row 5
Warning 1366 Incorrect string value: '\x80%' for column 'a' at row 6
Warning 1366 Incorrect string value: '\x80&' for column 'a' at row 7
Warning 1366 Incorrect string value: '\x80'' for column 'a' at row 8
Warning 1366 Incorrect string value: '\x80(' for column 'a' at row 9
Warning 1366 Incorrect string value: '\x80)' for column 'a' at row 10
Warning 1366 Incorrect string value: '\x80*' for column 'a' at row 11
Warning 1366 Incorrect string value: '\x80+' for column 'a' at row 12
Warning 1366 Incorrect string value: '\x80,' for column 'a' at row 13
Warning 1366 Incorrect string value: '\x80-' for column 'a' at row 14
Warning 1366 Incorrect string value: '\x80.' for column 'a' at row 15
Warning 1366 Incorrect string value: '\x80/' for column 'a' at row 16
Warning 1366 Incorrect string value: '\x800' for column 'a' at row 17
Warning 1366 Incorrect string value: '\x801' for column 'a' at row 18
Warning 1366 Incorrect string value: '\x802' for column 'a' at row 19
Warning 1366 Incorrect string value: '\x803' for column 'a' at row 20
Warning 1366 Incorrect string value: '\x804' for column 'a' at row 21
Warning 1366 Incorrect string value: '\x805' for column 'a' at row 22
Warning 1366 Incorrect string value: '\x806' for column 'a' at row 23
Warning 1366 Incorrect string value: '\x807' for column 'a' at row 24
Warning 1366 Incorrect string value: '\x808' for column 'a' at row 25
Warning 1366 Incorrect string value: '\x809' for column 'a' at row 26
Warning 1366 Incorrect string value: '\x80:' for column 'a' at row 27
Warning 1366 Incorrect string value: '\x80;' for column 'a' at row 28
Warning 1366 Incorrect string value: '\x80<' for column 'a' at row 29
Warning 1366 Incorrect string value: '\x80=' for column 'a' at row 30
Warning 1366 Incorrect string value: '\x80>' for column 'a' at row 31
Warning 1366 Incorrect string value: '\x80?' for column 'a' at row 32
Warning 1366 Incorrect string value: '\x80@' for column 'a' at row 33
Warning 1366 Incorrect string value: '\x80A' for column 'a' at row 34
Warning 1366 Incorrect string value: '\x80B' for column 'a' at row 35
Warning 1366 Incorrect string value: '\x80C' for column 'a' at row 36
Warning 1366 Incorrect string value: '\x80D' for column 'a' at row 37
Warning 1366 Incorrect string value: '\x80E' for column 'a' at row 38
Warning 1366 Incorrect string value: '\x80F' for column 'a' at row 39
Warning 1366 Incorrect string value: '\x80G' for column 'a' at row 40
Warning 1366 Incorrect string value: '\x80H' for column 'a' at row 41
Warning 1366 Incorrect string value: '\x80I' for column 'a' at row 42
Warning 1366 Incorrect string value: '\x80J' for column 'a' at row 43
Warning 1366 Incorrect string value: '\x80K' for column 'a' at row 44
Warning 1366 Incorrect string value: '\x80L' for column 'a' at row 45
Warning 1366 Incorrect string value: '\x80M' for column 'a' at row 46
Warning 1366 Incorrect string value: '\x80N' for column 'a' at row 47
Warning 1366 Incorrect string value: '\x80O' for column 'a' at row 48
Warning 1366 Incorrect string value: '\x80P' for column 'a' at row 49
Warning 1366 Incorrect string value: '\x80Q' for column 'a' at row 50
Warning 1366 Incorrect string value: '\x80R' for column 'a' at row 51
Warning 1366 Incorrect string value: '\x80S' for column 'a' at row 52
Warning 1366 Incorrect string value: '\x80T' for column 'a' at row 53
Warning 1366 Incorrect string value: '\x80U' for column 'a' at row 54
Warning 1366 Incorrect string value: '\x80V' for column 'a' at row 55
Warning 1366 Incorrect string value: '\x80W' for column 'a' at row 56
Warning 1366 Incorrect string value: '\x80X' for column 'a' at row 57
Warning 1366 Incorrect string value: '\x80Y' for column 'a' at row 58
Warning 1366 Incorrect string value: '\x80Z' for column 'a' at row 59
Warning 1366 Incorrect string value: '\x80[' for column 'a' at row 60
Warning 1366 Incorrect string value: '\x80\' for column 'a' at row 61
Warning 1366 Incorrect string value: '\x80]' for column 'a' at row 62
Warning 1366 Incorrect string value: '\x80^' for column 'a' at row 63
Warning 1366 Incorrect string value: '\x80_' for column 'a' at row 64
SELECT COUNT(*) FROM t1 WHERE a<>'';
COUNT(*)
13973
SELECT code, hex(upper(a)), hex(lower(a)),a, upper(a), lower(a) FROM t1 WHERE hex(a)<>hex(upper(a)) OR hex(a)<>hex(lower(a));
code hex(upper(a)) hex(lower(a)) a upper(a) lower(a)
A2CF A2CF A2E9 A A a
A2D0 A2D0 A2EA B B b
A2D1 A2D1 A2EB C C c
A2D2 A2D2 A2EC D D d
A2D3 A2D3 A2ED E E e
A2D4 A2D4 A2EE F F f
A2D5 A2D5 A2EF G G g
A2D6 A2D6 A2F0 H H h
A2D7 A2D7 A2F1 I I i
A2D8 A2D8 A2F2 J J j
A2D9 A2D9 A2F3 K K k
A2DA A2DA A2F4 L L l
A2DB A2DB A2F5 M M m
A2DC A2DC A2F6 N N n
A2DD A2DD A2F7 O O o
A2DE A2DE A2F8 P P p
A2DF A2DF A2F9 Q Q q
A2E0 A2E0 A2FA R R r
A2E1 A2E1 A2FB S S s
A2E2 A2E2 A2FC T T t
A2E3 A2E3 A2FD U U u
A2E4 A2E4 A2FE V V v
A2E5 A2E5 A340 W W w
A2E6 A2E6 A341 X X x
A2E7 A2E7 A342 Y Y y
A2E8 A2E8 A343 Z Z z
A2E9 A2CF A2E9 a A a
A2EA A2D0 A2EA b B b
A2EB A2D1 A2EB c C c
A2EC A2D2 A2EC d D d
A2ED A2D3 A2ED e E e
A2EE A2D4 A2EE f F f
A2EF A2D5 A2EF g G g
A2F0 A2D6 A2F0 h H h
A2F1 A2D7 A2F1 i I i
A2F2 A2D8 A2F2 j J j
A2F3 A2D9 A2F3 k K k
A2F4 A2DA A2F4 l L l
A2F5 A2DB A2F5 m M m
A2F6 A2DC A2F6 n N n
A2F7 A2DD A2F7 o O o
A2F8 A2DE A2F8 p P p
A2F9 A2DF A2F9 q Q q
A2FA A2E0 A2FA r R r
A2FB A2E1 A2FB s S s
A2FC A2E2 A2FC t T t
A2FD A2E3 A2FD u U u
A2FE A2E4 A2FE v V v
A340 A2E5 A340 w W w
A341 A2E6 A341 x X x
A342 A2E7 A342 y Y y
A343 A2E8 A343 z Z z
A344 A344 A35C Α Α α
A345 A345 A35D Β Β β
A346 A346 A35E Γ Γ γ
A347 A347 A35F Δ Δ δ
A348 A348 A360 Ε Ε ε
A349 A349 A361 Ζ Ζ ζ
A34A A34A A362 Η Η η
A34B A34B A363 Θ Θ θ
A34C A34C A364 Ι Ι ι
A34D A34D A365 Κ Κ κ
A34E A34E A366 Λ Λ λ
A34F A34F A367 Μ Μ μ
A350 A350 A368 Ν Ν ν
A351 A351 A369 Ξ Ξ ξ
A352 A352 A36A Ο Ο ο
A353 A353 A36B Π Π π
A354 A354 A36C Ρ Ρ ρ
A355 A355 A36D Σ Σ σ
A356 A356 A36E Τ Τ τ
A357 A357 A36F Υ Υ υ
A358 A358 A370 Φ Φ φ
A359 A359 A371 Χ Χ χ
A35A A35A A372 Ψ Ψ ψ
A35B A35B A373 Ω Ω ω
A35C A344 A35C α Α α
A35D A345 A35D β Β β
A35E A346 A35E γ Γ γ
A35F A347 A35F δ Δ δ
A360 A348 A360 ε Ε ε
A361 A349 A361 ζ Ζ ζ
A362 A34A A362 η Η η
A363 A34B A363 θ Θ θ
A364 A34C A364 ι Ι ι
A365 A34D A365 κ Κ κ
A366 A34E A366 λ Λ λ
A367 A34F A367 μ Μ μ
A368 A350 A368 ν Ν ν
A369 A351 A369 ξ Ξ ξ
A36A A352 A36A ο Ο ο
A36B A353 A36B π Π π
A36C A354 A36C ρ Ρ ρ
A36D A355 A36D σ Σ σ
A36E A356 A36E τ Τ τ
A36F A357 A36F υ Υ υ
A370 A358 A370 φ Φ φ
A371 A359 A371 χ Χ χ
A372 A35A A372 ψ Ψ ψ
A373 A35B A373 ω Ω ω
C7B1 C7B1 C7CC Д Д д
C7B2 C7B2 C7CD Е Е е
C7B3 C7B3 C7CE Ё Ё ё
C7B4 C7B4 C7CF Ж Ж ж
C7B5 C7B5 C7D0 З З з
C7B6 C7B6 C7D1 И И и
C7B7 C7B7 C7D2 Й Й й
C7B8 C7B8 C7D3 К К к
C7B9 C7B9 C7D4 Л Л л
C7BA C7BA C7D5 М М м
C7BB C7BB C7DC У У у
C7BC C7BC C7DD Ф Ф ф
C7BD C7BD C7DE Х Х х
C7BE C7BE C7DF Ц Ц ц
C7BF C7BF C7E0 Ч Ч ч
C7C0 C7C0 C7E1 Ш Ш ш
C7C1 C7C1 C7E2 Щ Щ щ
C7C2 C7C2 C7E3 Ъ Ъ ъ
C7C3 C7C3 C7E4 Ы Ы ы
C7C4 C7C4 C7E5 Ь Ь ь
C7C5 C7C5 C7E6 Э Э э
C7C6 C7C6 C7E7 Ю Ю ю
C7C7 C7C7 C7E8 Я Я я
C7CC C7B1 C7CC д Д д
C7CD C7B2 C7CD е Е е
C7CE C7B3 C7CE ё Ё ё
C7CF C7B4 C7CF ж Ж ж
C7D0 C7B5 C7D0 з З з
C7D1 C7B6 C7D1 и И и
C7D2 C7B7 C7D2 й Й й
C7D3 C7B8 C7D3 к К к
C7D4 C7B9 C7D4 л Л л
C7D5 C7BA C7D5 м М м
C7DC C7BB C7DC у У у
C7DD C7BC C7DD ф Ф ф
C7DE C7BD C7DE х Х х
C7DF C7BE C7DF ц Ц ц
C7E0 C7BF C7E0 ч Ч ч
C7E1 C7C0 C7E1 ш Ш ш
C7E2 C7C1 C7E2 щ Щ щ
C7E3 C7C2 C7E3 ъ Ъ ъ
C7E4 C7C3 C7E4 ы Ы ы
C7E5 C7C4 C7E5 ь Ь ь
C7E6 C7C5 C7E6 э Э э
C7E7 C7C6 C7E7 ю Ю ю
C7E8 C7C7 C7E8 я Я я
SELECT * FROM t1
WHERE HEX(CAST(LOWER(a) AS CHAR CHARACTER SET utf8)) <>
HEX(LOWER(CAST(a AS CHAR CHARACTER SET utf8))) ORDER BY code;
code a
A2B9 Ⅰ
A2BA Ⅱ
A2BB Ⅲ
A2BC Ⅳ
A2BD Ⅴ
A2BE Ⅵ
A2BF Ⅶ
A2C0 Ⅷ
A2C1 Ⅸ
A2C2 Ⅹ
SELECT * FROM t1
WHERE HEX(CAST(UPPER(a) AS CHAR CHARACTER SET utf8)) <>
HEX(UPPER(CAST(a AS CHAR CHARACTER SET utf8))) ORDER BY code;
code a
C7C8 а
C7C9 б
C7CA в
C7CB г
C7D6 н
C7D7 о
C7D8 п
C7D9 р
C7DA с
C7DB т
DROP TABLE t1;
#
# End of 5.5 tests
#
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -50,6 +50,7 @@ information_schema
mtr
mysql
mysqltest
performance_schema
test
flush tables with read lock;
drop database mysqltest;
......@@ -61,6 +62,7 @@ Database
information_schema
mtr
mysql
performance_schema
test
drop database mysqltest;
ERROR HY000: Can't drop database 'mysqltest'; database doesn't exist
......
......@@ -11,12 +11,14 @@ select * from information_schema.SCHEMATA where schema_name > 'm';
CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
def mtr latin1 latin1_swedish_ci NULL
def mysql latin1 latin1_swedish_ci NULL
def performance_schema utf8 utf8_general_ci NULL
def test latin1 latin1_swedish_ci NULL
select schema_name from information_schema.schemata;
schema_name
information_schema
mtr
mysql
performance_schema
test
show databases like 't%';
Database (t%)
......@@ -26,6 +28,7 @@ Database
information_schema
mtr
mysql
performance_schema
test
show databases where `database` = 't%';
Database
......@@ -364,6 +367,7 @@ c
information_schema
mtr
mysql
performance_schema
test
explain select * from v0;
id select_type table type possible_keys key key_len ref rows Extra
......
......@@ -419,6 +419,38 @@ The following options may be given as the first argument:
default}
--partition[=name] Enable or disable partition plugin. Possible values are
ON, OFF, FORCE (don't start if the plugin fails to load).
--performance-schema
Enable the performance schema.
--performance-schema-events-waits-history-long-size=#
Number of rows in EVENTS_WAITS_HISTORY_LONG.
--performance-schema-events-waits-history-size=#
Number of rows per thread in EVENTS_WAITS_HISTORY.
--performance-schema-max-cond-classes=#
Maximum number of condition instruments.
--performance-schema-max-cond-instances=#
Maximum number of instrumented condition objects.
--performance-schema-max-file-classes=#
Maximum number of file instruments.
--performance-schema-max-file-handles=#
Maximum number of opened instrumented files.
--performance-schema-max-file-instances=#
Maximum number of instrumented files.
--performance-schema-max-mutex-classes=#
Maximum number of mutex instruments.
--performance-schema-max-mutex-instances=#
Maximum number of instrumented MUTEX objects.
--performance-schema-max-rwlock-classes=#
Maximum number of rwlock instruments.
--performance-schema-max-rwlock-instances=#
Maximum number of instrumented RWLOCK objects.
--performance-schema-max-table-handles=#
Maximum number of opened instrumented tables.
--performance-schema-max-table-instances=#
Maximum number of instrumented tables.
--performance-schema-max-thread-classes=#
Maximum number of thread instruments.
--performance-schema-max-thread-instances=#
Maximum number of instrumented threads.
--pid-file=name Pid file used by safe_mysqld
--plugin-dir=name Directory for plugins
--plugin-load=name Optional semicolon-separated list of plugins to load,
......@@ -719,7 +751,7 @@ The following options may be given as the first argument:
Variables (--variable-name=value)
and boolean options {FALSE|TRUE} Value (after reading options)
----------------------------------- --------------------------------------
------------------------------------------------- ------------------------
abort-slave-event-count 0
allow-suspicious-udfs FALSE
archive ON
......@@ -856,6 +888,22 @@ optimizer-prune-level 1
optimizer-search-depth 62
optimizer-switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on
partition ON
performance-schema FALSE
performance-schema-events-waits-history-long-size 10000
performance-schema-events-waits-history-size 10
performance-schema-max-cond-classes 80
performance-schema-max-cond-instances 1000
performance-schema-max-file-classes 50
performance-schema-max-file-handles 32768
performance-schema-max-file-instances 10000
performance-schema-max-mutex-classes 200
performance-schema-max-mutex-instances 1000
performance-schema-max-rwlock-classes 20
performance-schema-max-rwlock-instances 1000
performance-schema-max-table-handles 100000
performance-schema-max-table-instances 50000
performance-schema-max-thread-classes 50
performance-schema-max-thread-instances 1000
plugin-dir MYSQL_LIBDIR/mysql/plugin
plugin-load (No default value)
port 3306
......
......@@ -419,6 +419,38 @@ The following options may be given as the first argument:
default}
--partition[=name] Enable or disable partition plugin. Possible values are
ON, OFF, FORCE (don't start if the plugin fails to load).
--performance-schema
Enable the performance schema.
--performance-schema-events-waits-history-long-size=#
Number of rows in EVENTS_WAITS_HISTORY_LONG.
--performance-schema-events-waits-history-size=#
Number of rows per thread in EVENTS_WAITS_HISTORY.
--performance-schema-max-cond-classes=#
Maximum number of condition instruments.
--performance-schema-max-cond-instances=#
Maximum number of instrumented condition objects.
--performance-schema-max-file-classes=#
Maximum number of file instruments.
--performance-schema-max-file-handles=#
Maximum number of opened instrumented files.
--performance-schema-max-file-instances=#
Maximum number of instrumented files.
--performance-schema-max-mutex-classes=#
Maximum number of mutex instruments.
--performance-schema-max-mutex-instances=#
Maximum number of instrumented MUTEX objects.
--performance-schema-max-rwlock-classes=#
Maximum number of rwlock instruments.
--performance-schema-max-rwlock-instances=#
Maximum number of instrumented RWLOCK objects.
--performance-schema-max-table-handles=#
Maximum number of opened instrumented tables.
--performance-schema-max-table-instances=#
Maximum number of instrumented tables.
--performance-schema-max-thread-classes=#
Maximum number of thread instruments.
--performance-schema-max-thread-instances=#
Maximum number of instrumented threads.
--pid-file=name Pid file used by safe_mysqld
--plugin-dir=name Directory for plugins
--plugin-load=name Optional semicolon-separated list of plugins to load,
......@@ -723,7 +755,7 @@ The following options may be given as the first argument:
Variables (--variable-name=value)
and boolean options {FALSE|TRUE} Value (after reading options)
--------------------------------- ----------------------------------------
------------------------------------------------- ------------------------
abort-slave-event-count 0
allow-suspicious-udfs FALSE
archive ON
......@@ -860,6 +892,22 @@ optimizer-prune-level 1
optimizer-search-depth 62
optimizer-switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on
partition ON
performance-schema FALSE
performance-schema-events-waits-history-long-size 10000
performance-schema-events-waits-history-size 10
performance-schema-max-cond-classes 80
performance-schema-max-cond-instances 1000
performance-schema-max-file-classes 50
performance-schema-max-file-handles 32768
performance-schema-max-file-instances 10000
performance-schema-max-mutex-classes 200
performance-schema-max-mutex-instances 1000
performance-schema-max-rwlock-classes 20
performance-schema-max-rwlock-instances 1000
performance-schema-max-table-handles 100000
performance-schema-max-table-instances 50000
performance-schema-max-thread-classes 50
performance-schema-max-thread-instances 1000
plugin-dir MYSQL_LIBDIR/plugin
plugin-load (No default value)
port 3306
......
......@@ -262,6 +262,7 @@ Database
information_schema
mtr
mysql
performance_schema
test
prepare stmt4 from ' show tables from test like ''t2%'' ';
execute stmt4;
......
......@@ -9,6 +9,7 @@ information_schema
foo
mtr
mysql
performance_schema
test
drop schema foo;
#
......
......@@ -142,6 +142,7 @@ Database
information_schema
mtr
mysql
performance_schema
test
show databases like "test%";
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
......
......@@ -116,4 +116,5 @@ Database
information_schema
mtr
mysql
performance_schema
test
......@@ -320,10 +320,10 @@ INSERT INTO t2 SET a = func_modify_t1();
SHOW BINLOG EVENTS FROM 12283;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 12283 Query 1 12351 BEGIN
master-bin.000001 12351 Table_map 1 12393 table_id: 41 (test.t2)
master-bin.000001 12393 Table_map 1 12435 table_id: 42 (test.t1)
master-bin.000001 12435 Write_rows 1 12473 table_id: 42
master-bin.000001 12473 Write_rows 1 12511 table_id: 41 flags: STMT_END_F
master-bin.000001 12351 Table_map 1 12393 table_id: 59 (test.t2)
master-bin.000001 12393 Table_map 1 12435 table_id: 60 (test.t1)
master-bin.000001 12435 Write_rows 1 12473 table_id: 60
master-bin.000001 12473 Write_rows 1 12511 table_id: 59 flags: STMT_END_F
master-bin.000001 12511 Query 1 12580 COMMIT
DROP TABLE t1,t2;
DROP FUNCTION func_modify_t1;
......@@ -347,12 +347,12 @@ INSERT INTO t1 SET a = 2;
SHOW BINLOG EVENTS FROM 13426;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 13426 Query 1 13494 BEGIN
master-bin.000001 13494 Table_map 1 13535 table_id: 44 (test.t1)
master-bin.000001 13535 Table_map 1 13577 table_id: 45 (test.t3)
master-bin.000001 13577 Table_map 1 13619 table_id: 46 (test.t2)
master-bin.000001 13619 Write_rows 1 13657 table_id: 46
master-bin.000001 13657 Write_rows 1 13695 table_id: 45
master-bin.000001 13695 Write_rows 1 13729 table_id: 44 flags: STMT_END_F
master-bin.000001 13494 Table_map 1 13535 table_id: 62 (test.t1)
master-bin.000001 13535 Table_map 1 13577 table_id: 63 (test.t3)
master-bin.000001 13577 Table_map 1 13619 table_id: 64 (test.t2)
master-bin.000001 13619 Write_rows 1 13657 table_id: 64
master-bin.000001 13657 Write_rows 1 13695 table_id: 63
master-bin.000001 13695 Write_rows 1 13729 table_id: 62 flags: STMT_END_F
master-bin.000001 13729 Query 1 13798 COMMIT
DROP TABLE t1,t2,t3;
SET SESSION binlog_format = STATEMENT;
......
......@@ -56,6 +56,7 @@ catalog_name schema_name sql_path
def information_schema NULL
def mtr NULL
def mysql NULL
def performance_schema NULL
def test NULL
###############################################################################
# Testcases 3.2.9.2+3.2.9.3: INFORMATION_SCHEMA.SCHEMATA accessible information
......
......@@ -13,6 +13,7 @@ information_schema
日本語
ニホンゴ
mysql
performance_schema
test
USE `ニホンゴ`;
USE `日本語`;
......
......@@ -14,6 +14,7 @@ information_schema
龔龖龗
ニホンゴ
mysql
performance_schema
test
USE `ニホンゴ`;
USE `日本語`;
......
......@@ -13,6 +13,7 @@ information_schema
龔龖龗
ニホンゴ
mysql
performance_schema
test
USE `ニホンゴ`;
USE `日本語`;
......
......@@ -13,6 +13,7 @@ information_schema
龔龖龗
ニホンゴ
mysql
performance_schema
test
USE `ニホンゴ`;
USE `日本語`;
......
# Copyright (C) 2009 Sun Microsystems, Inc
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# Tests for PERFORMANCE_SCHEMA
RESET MASTER;
select count(*) > 0 from performance_schema.SETUP_INSTRUMENTS;
update performance_schema.SETUP_INSTRUMENTS set enabled='NO'
where name like "wait/synch/rwlock/%";
select count(*) > 0 from performance_schema.EVENTS_WAITS_CURRENT;
--disable_warnings
drop table if exists test.t1;
drop table if exists test.t2;
--enable_warnings
create table test.t1 (thread_id integer);
create table test.t2 (name varchar(128));
insert into test.t1
select thread_id from performance_schema.EVENTS_WAITS_CURRENT;
insert into test.t2
select name from performance_schema.SETUP_INSTRUMENTS
where name like "wait/synch/rwlock/%";
drop table test.t1;
drop table test.t2;
update performance_schema.SETUP_INSTRUMENTS set enabled='YES'
where name like "wait/synch/rwlock/%";
--source include/show_binlog_events.inc
# Copyright (C) 2009 Sun Microsystems, Inc
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# Tests for PERFORMANCE_SCHEMA
update performance_schema.SETUP_INSTRUMENTS set enabled='YES';
disconnect con1;
disconnect con2;
disconnect con3;
connection default;
# Copyright (C) 2009 Sun Microsystems, Inc
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# Tests for PERFORMANCE_SCHEMA
--disable_warnings
drop table if exists test.t1;
--enable_warnings
## The result of show grants is not consistent across platforms ...
## show grants;
## Not enforced yet: deny CREATE_ACL and DROP_ACL
## Waiting to remove .FRM files first
##
## --error ER_DBACCESS_DENIED_ERROR
## create table performance_schema.t1(a int);
##
## --error ER_DBACCESS_DENIED_ERROR
## drop table performance_schema.t1;
##
## --error ER_DBACCESS_DENIED_ERROR
## create table performance_schema.SETUP_INSTRUMENTS(a int);
##
## --error ER_DBACCESS_DENIED_ERROR
## create table performance_schema.EVENTS_WAITS_CURRENT(a int);
##
## --error ER_DBACCESS_DENIED_ERROR
## create table performance_schema.FILE_INSTANCES(a int);
##
## --error ER_DBACCESS_DENIED_ERROR
## drop table performance_schema.SETUP_INSTRUMENTS;
##
## --error ER_DBACCESS_DENIED_ERROR
## drop table performance_schema.EVENTS_WAITS_CURRENT;
##
## --error ER_DBACCESS_DENIED_ERROR
## drop table performance_schema.FILE_INSTANCES;
--error ER_DBACCESS_DENIED_ERROR
rename table performance_schema.SETUP_INSTRUMENTS to test.t1;
--error ER_DBACCESS_DENIED_ERROR
rename table performance_schema.EVENTS_WAITS_CURRENT to test.t1;
--error ER_DBACCESS_DENIED_ERROR
rename table performance_schema.FILE_INSTANCES to test.t1;
--error ER_DBACCESS_DENIED_ERROR
rename table performance_schema.SETUP_INSTRUMENTS to performance_schema.t1;
--error ER_DBACCESS_DENIED_ERROR
rename table performance_schema.EVENTS_WAITS_CURRENT to performance_schema.t1;
--error ER_DBACCESS_DENIED_ERROR
rename table performance_schema.FILE_INSTANCES to performance_schema.t1;
--error ER_DBACCESS_DENIED_ERROR
rename table performance_schema.SETUP_INSTRUMENTS
to performance_schema.EVENTS_WAITS_CURRENT;
--error ER_DBACCESS_DENIED_ERROR
rename table performance_schema.EVENTS_WAITS_CURRENT
to performance_schema.SETUP_INSTRUMENTS;
--error ER_DBACCESS_DENIED_ERROR
create procedure performance_schema.my_proc() begin end;
--error ER_DBACCESS_DENIED_ERROR
create function performance_schema.my_func() returns int return 0;
--error ER_DBACCESS_DENIED_ERROR
create event performance_schema.my_event on schedule every 15 minute
do begin end;
--error ER_DBACCESS_DENIED_ERROR
create trigger performance_schema.bi_setup_instruments
before insert on performance_schema.SETUP_INSTRUMENTS
for each row begin end;
--error ER_DBACCESS_DENIED_ERROR
create trigger performance_schema.bi_events_waits_current
before insert on performance_schema.EVENTS_WAITS_CURRENT
for each row begin end;
--error ER_DBACCESS_DENIED_ERROR
create trigger performance_schema.bi_file_instances
before insert on performance_schema.FILE_INSTANCES
for each row begin end;
--error ER_WRONG_PERFSCHEMA_USAGE
create table test.t1(a int) engine=PERFORMANCE_SCHEMA;
--error ER_WRONG_PERFSCHEMA_USAGE
create table test.t1 like performance_schema.SETUP_INSTRUMENTS;
--error ER_WRONG_PERFSCHEMA_USAGE
create table test.t1 like performance_schema.EVENTS_WAITS_CURRENT;
--error ER_WRONG_PERFSCHEMA_USAGE
create table test.t1 like performance_schema.FILE_INSTANCES;
--replace_result '\'setup_instruments' '\'SETUP_INSTRUMENTS'
--error ER_TABLEACCESS_DENIED_ERROR
insert into performance_schema.SETUP_INSTRUMENTS
set name="foo";
--replace_result '\'events_waits_current' '\'EVENTS_WAITS_CURRENT'
--error ER_TABLEACCESS_DENIED_ERROR
insert into performance_schema.EVENTS_WAITS_CURRENT
set name="foo";
--replace_result '\'file_instances' '\'FILE_INSTANCES'
--error ER_TABLEACCESS_DENIED_ERROR
insert into performance_schema.FILE_INSTANCES
set name="foo";
--replace_result '\'setup_instruments' '\'SETUP_INSTRUMENTS'
--error ER_TABLEACCESS_DENIED_ERROR
delete from performance_schema.SETUP_INSTRUMENTS;
--replace_result '\'events_waits_current' '\'EVENTS_WAITS_CURRENT'
--error ER_TABLEACCESS_DENIED_ERROR
delete from performance_schema.EVENTS_WAITS_CURRENT;
--replace_result '\'file_instances' '\'FILE_INSTANCES'
--error ER_TABLEACCESS_DENIED_ERROR
delete from performance_schema.FILE_INSTANCES;
lock table performance_schema.SETUP_INSTRUMENTS read;
unlock tables;
lock table performance_schema.SETUP_INSTRUMENTS write;
unlock tables;
--replace_result '\'events_waits_current' '\'EVENTS_WAITS_CURRENT'
--error ER_TABLEACCESS_DENIED_ERROR
lock table performance_schema.EVENTS_WAITS_CURRENT read;
unlock tables;
--replace_result '\'events_waits_current' '\'EVENTS_WAITS_CURRENT'
--error ER_TABLEACCESS_DENIED_ERROR
lock table performance_schema.EVENTS_WAITS_CURRENT write;
unlock tables;
--replace_result '\'file_instances' '\'FILE_INSTANCES'
--error ER_TABLEACCESS_DENIED_ERROR
lock table performance_schema.FILE_INSTANCES read;
unlock tables;
--replace_result '\'file_instances' '\'FILE_INSTANCES'
--error ER_TABLEACCESS_DENIED_ERROR
lock table performance_schema.FILE_INSTANCES write;
unlock tables;
--echo #
--echo # WL#4818, NFS2: Can use grants to give normal user access
--echo # to view data from _CURRENT and _HISTORY tables
--echo #
--echo # Should work as pfs_user_1 and pfs_user_2, but not as pfs_user_3.
--echo # (Except for EVENTS_WAITS_CURRENT, which is granted.)
# Errors here will be caught by the diff afterwards
--disable_abort_on_error
--replace_result '\'events_waits_history' '\'EVENTS_WAITS_HISTORY'
SELECT "can select" FROM performance_schema.EVENTS_WAITS_HISTORY LIMIT 1;
--replace_result '\'events_waits_history_long' '\'EVENTS_WAITS_HISTORY_LONG'
SELECT "can select" FROM performance_schema.EVENTS_WAITS_HISTORY_LONG LIMIT 1;
--replace_result '\'events_waits_current' '\'EVENTS_WAITS_CURRENT'
SELECT "can select" FROM performance_schema.EVENTS_WAITS_CURRENT LIMIT 1;
--replace_result '\'events_waits_summary_by_instance' '\'EVENTS_WAITS_SUMMARY_BY_INSTANCE'
SELECT "can select" FROM performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE LIMIT 1;
--replace_result '\'file_summary_by_instance' '\'FILE_SUMMARY_BY_INSTANCE'
SELECT "can select" FROM performance_schema.FILE_SUMMARY_BY_INSTANCE LIMIT 1;
--enable_abort_on_error
# Copyright (C) 2009 Sun Microsystems, Inc
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# Tests for PERFORMANCE_SCHEMA
let $MYSQLD_DATADIR= `select @@datadir`;
let $MYSQLD_TMPDIR= `select @@tmpdir`;
--disable_query_log
update performance_schema.SETUP_INSTRUMENTS set enabled='NO';
update performance_schema.SETUP_CONSUMERS set enabled='YES';
--enable_query_log
connect (con1, localhost, root, , );
let $con1_THREAD_ID=`select thread_id from performance_schema.PROCESSLIST
where ID in (select connection_id())`;
connect (con2, localhost, root, , );
let $con2_THREAD_ID=`select thread_id from performance_schema.PROCESSLIST
where ID in (select connection_id())`;
connect (con3, localhost, root, , );
let $con3_THREAD_ID=`select thread_id from performance_schema.PROCESSLIST
where ID in (select connection_id())`;
connection default;
--disable_query_log
prepare stmt_dump_events from
"select event_name,
left(source, locate(\":\", source)) as short_source,
operation, number_of_bytes
from performance_schema.EVENTS_WAITS_HISTORY_LONG
where thread_id=? order by event_id;";
prepare stmt_dump_thread from
"select name from performance_schema.PROCESSLIST where thread_id=? ;";
--enable_query_log
# Copyright (C) 2008-2009 Sun Microsystems, Inc
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# Tests for PERFORMANCE_SCHEMA
show databases;
select count(*) from performance_schema.PERFORMANCE_TIMERS;
select count(*) from performance_schema.SETUP_CONSUMERS;
select count(*) > 0 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
select * from performance_schema.COND_INSTANCES;
select * from performance_schema.EVENTS_WAITS_CURRENT;
select * from performance_schema.EVENTS_WAITS_HISTORY;
select * from performance_schema.EVENTS_WAITS_HISTORY_LONG;
select * from performance_schema.EVENTS_WAITS_SUMMARY_BY_EVENT_NAME;
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.FILE_INSTANCES;
select * from performance_schema.FILE_SUMMARY_BY_EVENT_NAME;
select * from performance_schema.FILE_SUMMARY_BY_INSTANCE;
select * from performance_schema.MUTEX_INSTANCES;
select * from performance_schema.PERFORMANCE_TIMERS;
select * from performance_schema.PROCESSLIST;
select * from performance_schema.RWLOCK_INSTANCES;
select * from performance_schema.SETUP_CONSUMERS;
select * from performance_schema.SETUP_INSTRUMENTS;
select * from performance_schema.SETUP_OBJECTS;
select * from performance_schema.SETUP_TIMERS;
--enable_result_log
# This has a stable output, printing the result:
show variables like "performance_schema%";
# This has an unrepeatable output, it does depends too much on
# - the platform hardware (sizeof structures, padding)
# - the compiler used (sizeof(enum))
# - the platform header files (sizeof(size_t))
# - the code path in the server (what gets executed and instrumented
# at runtime)
--disable_result_log
show engine PERFORMANCE_SCHEMA status;
show status like "performance_schema%";
--enable_result_log
"General cleanup"
drop table if exists t1;
update performance_schema.SETUP_INSTRUMENTS set enabled = 'NO';
update performance_schema.SETUP_CONSUMERS set enabled = 'NO';
truncate table performance_schema.FILE_SUMMARY_BY_EVENT_NAME;
truncate table performance_schema.FILE_SUMMARY_BY_INSTANCE;
truncate table performance_schema.EVENTS_WAITS_SUMMARY_BY_EVENT_NAME;
truncate table performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE;
truncate table performance_schema.EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME;
update performance_schema.SETUP_CONSUMERS set enabled = 'YES';
update performance_schema.SETUP_INSTRUMENTS
set enabled = 'YES', timed = 'YES';
create table t1 (
id INT PRIMARY KEY,
b CHAR(100) DEFAULT 'initial value')
ENGINE=MyISAM;
insert into t1 (id) values (1), (2), (3), (4), (5), (6), (7), (8);
update performance_schema.SETUP_INSTRUMENTS SET enabled = 'NO';
set @dump_all=FALSE;
"Verifying file aggregate consistency"
SELECT EVENT_NAME, e.COUNT_READ, SUM(i.COUNT_READ)
FROM performance_schema.FILE_SUMMARY_BY_EVENT_NAME AS e
JOIN performance_schema.FILE_SUMMARY_BY_INSTANCE AS i USING (EVENT_NAME)
GROUP BY EVENT_NAME
HAVING (e.COUNT_READ <> SUM(i.COUNT_READ))
OR @dump_all;
EVENT_NAME COUNT_READ SUM(i.COUNT_READ)
SELECT EVENT_NAME, e.COUNT_WRITE, SUM(i.COUNT_WRITE)
FROM performance_schema.FILE_SUMMARY_BY_EVENT_NAME AS e
JOIN performance_schema.FILE_SUMMARY_BY_INSTANCE AS i USING (EVENT_NAME)
GROUP BY EVENT_NAME
HAVING (e.COUNT_WRITE <> SUM(i.COUNT_WRITE))
OR @dump_all;
EVENT_NAME COUNT_WRITE SUM(i.COUNT_WRITE)
SELECT EVENT_NAME, e.SUM_NUMBER_OF_BYTES_READ, SUM(i.SUM_NUMBER_OF_BYTES_READ)
FROM performance_schema.FILE_SUMMARY_BY_EVENT_NAME AS e
JOIN performance_schema.FILE_SUMMARY_BY_INSTANCE AS i USING (EVENT_NAME)
GROUP BY EVENT_NAME
HAVING (e.SUM_NUMBER_OF_BYTES_READ <> SUM(i.SUM_NUMBER_OF_BYTES_READ))
OR @dump_all;
EVENT_NAME SUM_NUMBER_OF_BYTES_READ SUM(i.SUM_NUMBER_OF_BYTES_READ)
SELECT EVENT_NAME, e.SUM_NUMBER_OF_BYTES_WRITE, SUM(i.SUM_NUMBER_OF_BYTES_WRITE)
FROM performance_schema.FILE_SUMMARY_BY_EVENT_NAME AS e
JOIN performance_schema.FILE_SUMMARY_BY_INSTANCE AS i USING (EVENT_NAME)
GROUP BY EVENT_NAME
HAVING (e.SUM_NUMBER_OF_BYTES_WRITE <> SUM(i.SUM_NUMBER_OF_BYTES_WRITE))
OR @dump_all;
EVENT_NAME SUM_NUMBER_OF_BYTES_WRITE SUM(i.SUM_NUMBER_OF_BYTES_WRITE)
"Verifying waits aggregate consistency (instance)"
SELECT EVENT_NAME, e.SUM_TIMER_WAIT, SUM(i.SUM_TIMER_WAIT)
FROM performance_schema.EVENTS_WAITS_SUMMARY_BY_EVENT_NAME AS e
JOIN performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE AS i USING (EVENT_NAME)
GROUP BY EVENT_NAME
HAVING (e.SUM_TIMER_WAIT <> SUM(i.SUM_TIMER_WAIT))
OR @dump_all;
EVENT_NAME SUM_TIMER_WAIT SUM(i.SUM_TIMER_WAIT)
SELECT EVENT_NAME, e.MIN_TIMER_WAIT, MIN(i.MIN_TIMER_WAIT)
FROM performance_schema.EVENTS_WAITS_SUMMARY_BY_EVENT_NAME AS e
JOIN performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE AS i USING (EVENT_NAME)
GROUP BY EVENT_NAME
HAVING (e.MIN_TIMER_WAIT <> MIN(i.MIN_TIMER_WAIT))
AND (MIN(i.MIN_TIMER_WAIT) != 0)
OR @dump_all;
EVENT_NAME MIN_TIMER_WAIT MIN(i.MIN_TIMER_WAIT)
SELECT EVENT_NAME, e.MAX_TIMER_WAIT, MAX(i.MAX_TIMER_WAIT)
FROM performance_schema.EVENTS_WAITS_SUMMARY_BY_EVENT_NAME AS e
JOIN performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE AS i USING (EVENT_NAME)
GROUP BY EVENT_NAME
HAVING (e.MAX_TIMER_WAIT <> MAX(i.MAX_TIMER_WAIT))
OR @dump_all;
EVENT_NAME MAX_TIMER_WAIT MAX(i.MAX_TIMER_WAIT)
"Verifying waits aggregate consistency (thread)"
SELECT EVENT_NAME, e.SUM_TIMER_WAIT, SUM(t.SUM_TIMER_WAIT)
FROM performance_schema.EVENTS_WAITS_SUMMARY_BY_EVENT_NAME AS e
JOIN performance_schema.EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME AS t
USING (EVENT_NAME)
GROUP BY EVENT_NAME
HAVING (e.SUM_TIMER_WAIT <> SUM(t.SUM_TIMER_WAIT))
OR @dump_all;
EVENT_NAME SUM_TIMER_WAIT SUM(t.SUM_TIMER_WAIT)
SELECT EVENT_NAME, e.MIN_TIMER_WAIT, MIN(t.MIN_TIMER_WAIT)
FROM performance_schema.EVENTS_WAITS_SUMMARY_BY_EVENT_NAME AS e
JOIN performance_schema.EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME AS t
USING (EVENT_NAME)
GROUP BY EVENT_NAME
HAVING (e.MIN_TIMER_WAIT <> MIN(t.MIN_TIMER_WAIT))
AND (MIN(t.MIN_TIMER_WAIT) != 0)
OR @dump_all;
EVENT_NAME MIN_TIMER_WAIT MIN(t.MIN_TIMER_WAIT)
SELECT EVENT_NAME, e.MAX_TIMER_WAIT, MAX(t.MAX_TIMER_WAIT)
FROM performance_schema.EVENTS_WAITS_SUMMARY_BY_EVENT_NAME AS e
JOIN performance_schema.EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME AS t
USING (EVENT_NAME)
GROUP BY EVENT_NAME
HAVING (e.MAX_TIMER_WAIT <> MAX(t.MAX_TIMER_WAIT))
OR @dump_all;
EVENT_NAME MAX_TIMER_WAIT MAX(t.MAX_TIMER_WAIT)
update performance_schema.SETUP_CONSUMERS set enabled = 'YES';
update performance_schema.SETUP_INSTRUMENTS
set enabled = 'YES', timed = 'YES';
drop table test.t1;
Found: unknown variable 'performance-schema-enabled=maybe'
Found: Aborting
Found: ambiguous option '--performance-schema-max_=12'
set binlog_format=mixed;
RESET MASTER;
select count(*) > 0 from performance_schema.SETUP_INSTRUMENTS;
count(*) > 0
1
update performance_schema.SETUP_INSTRUMENTS set enabled='NO'
where name like "wait/synch/rwlock/%";
select count(*) > 0 from performance_schema.EVENTS_WAITS_CURRENT;
count(*) > 0
1
drop table if exists test.t1;
drop table if exists test.t2;
create table test.t1 (thread_id integer);
create table test.t2 (name varchar(128));
insert into test.t1
select thread_id from performance_schema.EVENTS_WAITS_CURRENT;
insert into test.t2
select name from performance_schema.SETUP_INSTRUMENTS
where name like "wait/synch/rwlock/%";
drop table test.t1;
drop table test.t2;
update performance_schema.SETUP_INSTRUMENTS set enabled='YES'
where name like "wait/synch/rwlock/%";
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (performance_schema.SETUP_INSTRUMENTS)
master-bin.000001 # Update_rows # # table_id: #
master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # use `test`; drop table if exists test.t1
master-bin.000001 # Query # # use `test`; drop table if exists test.t2
master-bin.000001 # Query # # use `test`; create table test.t1 (thread_id integer)
master-bin.000001 # Query # # use `test`; create table test.t2 (name varchar(128))
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t2)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # use `test`; drop table test.t1
master-bin.000001 # Query # # use `test`; drop table test.t2
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (performance_schema.SETUP_INSTRUMENTS)
master-bin.000001 # Update_rows # # table_id: #
master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
set binlog_format=row;
RESET MASTER;
select count(*) > 0 from performance_schema.SETUP_INSTRUMENTS;
count(*) > 0
1
update performance_schema.SETUP_INSTRUMENTS set enabled='NO'
where name like "wait/synch/rwlock/%";
select count(*) > 0 from performance_schema.EVENTS_WAITS_CURRENT;
count(*) > 0
1
drop table if exists test.t1;
drop table if exists test.t2;
create table test.t1 (thread_id integer);
create table test.t2 (name varchar(128));
insert into test.t1
select thread_id from performance_schema.EVENTS_WAITS_CURRENT;
insert into test.t2
select name from performance_schema.SETUP_INSTRUMENTS
where name like "wait/synch/rwlock/%";
drop table test.t1;
drop table test.t2;
update performance_schema.SETUP_INSTRUMENTS set enabled='YES'
where name like "wait/synch/rwlock/%";
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (performance_schema.SETUP_INSTRUMENTS)
master-bin.000001 # Update_rows # # table_id: #
master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # use `test`; drop table if exists test.t1
master-bin.000001 # Query # # use `test`; drop table if exists test.t2
master-bin.000001 # Query # # use `test`; create table test.t1 (thread_id integer)
master-bin.000001 # Query # # use `test`; create table test.t2 (name varchar(128))
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t2)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # use `test`; drop table test.t1
master-bin.000001 # Query # # use `test`; drop table test.t2
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (performance_schema.SETUP_INSTRUMENTS)
master-bin.000001 # Update_rows # # table_id: #
master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
set binlog_format=statement;
RESET MASTER;
select count(*) > 0 from performance_schema.SETUP_INSTRUMENTS;
count(*) > 0
1
update performance_schema.SETUP_INSTRUMENTS set enabled='NO'
where name like "wait/synch/rwlock/%";
Warnings:
Note 1592 Statement may not be safe to log in statement format.
select count(*) > 0 from performance_schema.EVENTS_WAITS_CURRENT;
count(*) > 0
1
drop table if exists test.t1;
drop table if exists test.t2;
create table test.t1 (thread_id integer);
create table test.t2 (name varchar(128));
insert into test.t1
select thread_id from performance_schema.EVENTS_WAITS_CURRENT;
Warnings:
Note 1592 Statement may not be safe to log in statement format.
insert into test.t2
select name from performance_schema.SETUP_INSTRUMENTS
where name like "wait/synch/rwlock/%";
Warnings:
Note 1592 Statement may not be safe to log in statement format.
drop table test.t1;
drop table test.t2;
update performance_schema.SETUP_INSTRUMENTS set enabled='YES'
where name like "wait/synch/rwlock/%";
Warnings:
Note 1592 Statement may not be safe to log in statement format.
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; update performance_schema.SETUP_INSTRUMENTS set enabled='NO'
where name like "wait/synch/rwlock/%"
master-bin.000001 # Query # # use `test`; drop table if exists test.t1
master-bin.000001 # Query # # use `test`; drop table if exists test.t2
master-bin.000001 # Query # # use `test`; create table test.t1 (thread_id integer)
master-bin.000001 # Query # # use `test`; create table test.t2 (name varchar(128))
master-bin.000001 # Query # # use `test`; insert into test.t1
select thread_id from performance_schema.EVENTS_WAITS_CURRENT
master-bin.000001 # Query # # use `test`; insert into test.t2
select name from performance_schema.SETUP_INSTRUMENTS
where name like "wait/synch/rwlock/%"
master-bin.000001 # Query # # use `test`; drop table test.t1
master-bin.000001 # Query # # use `test`; drop table test.t2
master-bin.000001 # Query # # use `test`; update performance_schema.SETUP_INSTRUMENTS set enabled='YES'
where name like "wait/synch/rwlock/%"
show variables like 'performance_schema_max_thread_classes';
Variable_name Value
performance_schema_max_thread_classes 12
show variables like 'performance_schema_max_thread_instances';
Variable_name Value
performance_schema_max_thread_instances 318
show grants;
Grants for root@localhost
GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION
grant usage on *.* to 'pfs_user_5'@localhost with GRANT OPTION;
grant SELECT(thread_id, event_id) on performance_schema.EVENTS_WAITS_CURRENT
to 'pfs_user_5'@localhost;
grant UPDATE(enabled) on performance_schema.SETUP_INSTRUMENTS
to 'pfs_user_5'@localhost;
flush privileges;
select thread_id from performance_schema.EVENTS_WAITS_CURRENT;
select thread_id, event_id from performance_schema.EVENTS_WAITS_CURRENT;
update performance_schema.SETUP_INSTRUMENTS set enabled='YES';
select event_name from performance_schema.EVENTS_WAITS_CURRENT;
ERROR 42000: SELECT command denied to user 'pfs_user_5'@'localhost' for column 'event_name' in table 'EVENTS_WAITS_CURRENT'
select thread_id, event_id, event_name
from performance_schema.EVENTS_WAITS_CURRENT;
ERROR 42000: SELECT command denied to user 'pfs_user_5'@'localhost' for column 'event_name' in table 'EVENTS_WAITS_CURRENT'
update performance_schema.SETUP_INSTRUMENTS set name='illegal';
ERROR 42000: UPDATE command denied to user 'pfs_user_5'@'localhost' for column 'name' in table 'SETUP_INSTRUMENTS'
update performance_schema.SETUP_INSTRUMENTS set timed='NO';
ERROR 42000: UPDATE command denied to user 'pfs_user_5'@'localhost' for column 'timed' in table 'SETUP_INSTRUMENTS'
REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'pfs_user_5'@localhost;
DROP USER 'pfs_user_5'@localhost;
flush privileges;
UPDATE performance_schema.SETUP_INSTRUMENTS SET enabled = 'YES', timed = 'YES';
UPDATE performance_schema.SETUP_CONSUMERS SET enabled = 'YES';
UPDATE performance_schema.SETUP_TIMERS SET timer_name = 'CYCLE';
alter table performance_schema.COND_INSTANCES add column foo integer;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
truncate table performance_schema.COND_INSTANCES;
ERROR HY000: Invalid performance_schema usage.
ALTER TABLE performance_schema.COND_INSTANCES ADD INDEX test_index(NAME);
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
CREATE UNIQUE INDEX test_index ON performance_schema.COND_INSTANCES(NAME);
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
alter table performance_schema.EVENTS_WAITS_CURRENT add column foo integer;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
truncate table performance_schema.EVENTS_WAITS_CURRENT;
ALTER TABLE performance_schema.EVENTS_WAITS_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_WAITS_CURRENT(EVENT_ID);
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
alter table performance_schema.EVENTS_WAITS_HISTORY add column foo integer;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
truncate table performance_schema.EVENTS_WAITS_HISTORY;
ALTER TABLE performance_schema.EVENTS_WAITS_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_WAITS_HISTORY(EVENT_ID);
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
alter table performance_schema.EVENTS_WAITS_HISTORY_LONG add column foo integer;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
truncate table performance_schema.EVENTS_WAITS_HISTORY_LONG;
ALTER TABLE performance_schema.EVENTS_WAITS_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_WAITS_HISTORY_LONG(EVENT_ID);
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
alter table performance_schema.EVENTS_WAITS_SUMMARY_BY_EVENT_NAME add column foo integer;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
truncate table performance_schema.EVENTS_WAITS_SUMMARY_BY_EVENT_NAME;
ALTER TABLE performance_schema.EVENTS_WAITS_SUMMARY_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_WAITS_SUMMARY_BY_EVENT_NAME(EVENT_NAME);
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
alter table performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE add column foo integer;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
truncate table performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE;
ALTER TABLE performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE 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_WAITS_SUMMARY_BY_INSTANCE(EVENT_NAME);
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
alter table performance_schema.EVENTS_WAITS_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_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME;
ALTER TABLE performance_schema.EVENTS_WAITS_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_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME(THREAD_ID);
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
alter table performance_schema.FILE_INSTANCES add column foo integer;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
truncate table performance_schema.FILE_INSTANCES;
ERROR HY000: Invalid performance_schema usage.
ALTER TABLE performance_schema.FILE_INSTANCES ADD INDEX test_index(FILE_NAME);
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
CREATE UNIQUE INDEX test_index ON performance_schema.FILE_INSTANCES(FILE_NAME);
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
alter table performance_schema.FILE_SUMMARY_BY_EVENT_NAME add column foo integer;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
truncate table performance_schema.FILE_SUMMARY_BY_EVENT_NAME;
ALTER TABLE performance_schema.FILE_SUMMARY_BY_EVENT_NAME ADD INDEX test_index(NAME);
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
CREATE UNIQUE INDEX test_index ON performance_schema.FILE_SUMMARY_BY_EVENT_NAME(NAME);
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
alter table performance_schema.FILE_SUMMARY_BY_INSTANCE add column foo integer;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
truncate table performance_schema.FILE_SUMMARY_BY_INSTANCE;
ALTER TABLE performance_schema.FILE_SUMMARY_BY_INSTANCE ADD INDEX test_index(NAME);
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
CREATE UNIQUE INDEX test_index ON performance_schema.FILE_SUMMARY_BY_INSTANCE(NAME);
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
alter table performance_schema.MUTEX_INSTANCES add column foo integer;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
truncate table performance_schema.MUTEX_INSTANCES;
ERROR HY000: Invalid performance_schema usage.
ALTER TABLE performance_schema.MUTEX_INSTANCES ADD INDEX test_index(NAME);
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
CREATE UNIQUE INDEX test_index ON performance_schema.MUTEX_INSTANCES(NAME);
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
alter table performance_schema.PERFORMANCE_TIMERS add column foo integer;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
truncate table performance_schema.PERFORMANCE_TIMERS;
ERROR HY000: Invalid performance_schema usage.
ALTER TABLE performance_schema.PERFORMANCE_TIMERS ADD INDEX test_index(TIMER_NAME);
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
CREATE UNIQUE INDEX test_index ON performance_schema.PERFORMANCE_TIMERS(TIMER_NAME);
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
alter table performance_schema.PROCESSLIST add column foo integer;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
truncate table performance_schema.PROCESSLIST;
ERROR HY000: Invalid performance_schema usage.
ALTER TABLE performance_schema.PROCESSLIST ADD INDEX test_index(ID);
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
CREATE UNIQUE INDEX test_index ON performance_schema.PROCESSLIST(ID);
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
alter table performance_schema.RWLOCK_INSTANCES add column foo integer;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
truncate table performance_schema.RWLOCK_INSTANCES;
ERROR HY000: Invalid performance_schema usage.
ALTER TABLE performance_schema.RWLOCK_INSTANCES ADD INDEX test_index(NAME);
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
CREATE UNIQUE INDEX test_index ON performance_schema.RWLOCK_INSTANCES(NAME);
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
alter table performance_schema.SETUP_CONSUMERS add column foo integer;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
truncate table performance_schema.SETUP_CONSUMERS;
ERROR HY000: Invalid performance_schema usage.
ALTER TABLE performance_schema.SETUP_CONSUMERS ADD INDEX test_index(NAME);
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
CREATE UNIQUE INDEX test_index ON performance_schema.SETUP_CONSUMERS(NAME);
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
alter table performance_schema.SETUP_INSTRUMENTS add column foo integer;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
truncate table performance_schema.SETUP_INSTRUMENTS;
ERROR HY000: Invalid performance_schema usage.
ALTER TABLE performance_schema.SETUP_INSTRUMENTS ADD INDEX test_index(NAME);
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
CREATE UNIQUE INDEX test_index ON performance_schema.SETUP_INSTRUMENTS(NAME);
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
alter table performance_schema.SETUP_OBJECTS add column foo integer;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
truncate table performance_schema.SETUP_OBJECTS;
ALTER TABLE performance_schema.SETUP_OBJECTS 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.SETUP_OBJECTS(OBJECT_NAME);
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
alter table performance_schema.SETUP_TIMERS add column foo integer;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
truncate table performance_schema.SETUP_TIMERS;
ERROR HY000: Invalid performance_schema usage.
ALTER TABLE performance_schema.SETUP_TIMERS ADD INDEX test_index(NAME);
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
CREATE UNIQUE INDEX test_index ON performance_schema.SETUP_TIMERS(NAME);
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
select * from performance_schema.COND_INSTANCES limit 1;
NAME OBJECT_INSTANCE_BEGIN
# #
select * from performance_schema.COND_INSTANCES
where name='FOO';
NAME OBJECT_INSTANCE_BEGIN
insert into performance_schema.COND_INSTANCES
set name='FOO', object_instance_begin=12;
ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'COND_INSTANCES'
update performance_schema.COND_INSTANCES
set name='FOO';
ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'COND_INSTANCES'
delete from performance_schema.COND_INSTANCES
where name like "wait/%";
ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'COND_INSTANCES'
delete from performance_schema.COND_INSTANCES;
ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'COND_INSTANCES'
LOCK TABLES performance_schema.COND_INSTANCES READ;
ERROR 42000: SELECT,LOCK TABL command denied to user 'root'@'localhost' for table 'COND_INSTANCES'
UNLOCK TABLES;
LOCK TABLES performance_schema.COND_INSTANCES WRITE;
ERROR 42000: SELECT,LOCK TABL command denied to user 'root'@'localhost' for table 'COND_INSTANCES'
UNLOCK TABLES;
select * from performance_schema.EVENTS_WAITS_CURRENT
where event_name like 'Wait/Synch/%' limit 1;
THREAD_ID EVENT_ID EVENT_NAME SOURCE TIMER_START TIMER_END TIMER_WAIT SPINS OBJECT_SCHEMA OBJECT_NAME OBJECT_TYPE OBJECT_INSTANCE_BEGIN NESTING_EVENT_ID OPERATION NUMBER_OF_BYTES FLAGS
# # # # # # # # NULL NULL NULL # NULL # NULL 0
select * from performance_schema.EVENTS_WAITS_CURRENT
where event_name='FOO';
THREAD_ID EVENT_ID EVENT_NAME SOURCE TIMER_START TIMER_END TIMER_WAIT SPINS OBJECT_SCHEMA OBJECT_NAME OBJECT_TYPE OBJECT_INSTANCE_BEGIN NESTING_EVENT_ID OPERATION NUMBER_OF_BYTES FLAGS
insert into performance_schema.EVENTS_WAITS_CURRENT
set thread_id='1', event_id=1,
event_name='FOO', timer_start=1, timer_end=2, timer_wait=3;
ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'EVENTS_WAITS_CURRENT'
update performance_schema.EVENTS_WAITS_CURRENT
set timer_start=12;
ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'EVENTS_WAITS_CURRENT'
update performance_schema.EVENTS_WAITS_CURRENT
set timer_start=12 where thread_id=0;
ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'EVENTS_WAITS_CURRENT'
delete from performance_schema.EVENTS_WAITS_CURRENT
where thread_id=1;
ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'EVENTS_WAITS_CURRENT'
delete from performance_schema.EVENTS_WAITS_CURRENT;
ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'EVENTS_WAITS_CURRENT'
LOCK TABLES performance_schema.EVENTS_WAITS_CURRENT READ;
ERROR 42000: SELECT,LOCK TABL command denied to user 'root'@'localhost' for table 'EVENTS_WAITS_CURRENT'
UNLOCK TABLES;
LOCK TABLES performance_schema.EVENTS_WAITS_CURRENT WRITE;
ERROR 42000: SELECT,LOCK TABL command denied to user 'root'@'localhost' for table 'EVENTS_WAITS_CURRENT'
UNLOCK TABLES;
select * from performance_schema.EVENTS_WAITS_HISTORY
where event_name like 'Wait/Synch/%' limit 1;
THREAD_ID EVENT_ID EVENT_NAME SOURCE TIMER_START TIMER_END TIMER_WAIT SPINS OBJECT_SCHEMA OBJECT_NAME OBJECT_TYPE OBJECT_INSTANCE_BEGIN NESTING_EVENT_ID OPERATION NUMBER_OF_BYTES FLAGS
# # # # # # # # NULL NULL NULL # NULL # NULL 0
select * from performance_schema.EVENTS_WAITS_HISTORY
where event_name='FOO';
THREAD_ID EVENT_ID EVENT_NAME SOURCE TIMER_START TIMER_END TIMER_WAIT SPINS OBJECT_SCHEMA OBJECT_NAME OBJECT_TYPE OBJECT_INSTANCE_BEGIN NESTING_EVENT_ID OPERATION NUMBER_OF_BYTES FLAGS
select * from performance_schema.EVENTS_WAITS_HISTORY
where event_name like 'Wait/Synch/%' order by timer_wait limit 1;
THREAD_ID EVENT_ID EVENT_NAME SOURCE TIMER_START TIMER_END TIMER_WAIT SPINS OBJECT_SCHEMA OBJECT_NAME OBJECT_TYPE OBJECT_INSTANCE_BEGIN NESTING_EVENT_ID OPERATION NUMBER_OF_BYTES FLAGS
# # # # # # # # NULL NULL NULL # NULL # NULL 0
select * from performance_schema.EVENTS_WAITS_HISTORY
where event_name like 'Wait/Synch/%' order by timer_wait desc limit 1;
THREAD_ID EVENT_ID EVENT_NAME SOURCE TIMER_START TIMER_END TIMER_WAIT SPINS OBJECT_SCHEMA OBJECT_NAME OBJECT_TYPE OBJECT_INSTANCE_BEGIN NESTING_EVENT_ID OPERATION NUMBER_OF_BYTES FLAGS
# # # # # # # # NULL NULL NULL # NULL # NULL 0
insert into performance_schema.EVENTS_WAITS_HISTORY
set thread_id='1', event_id=1,
event_name='FOO', timer_start=1, timer_end=2, timer_wait=3;
ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'EVENTS_WAITS_HISTORY'
update performance_schema.EVENTS_WAITS_HISTORY
set timer_start=12;
ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'EVENTS_WAITS_HISTORY'
update performance_schema.EVENTS_WAITS_HISTORY
set timer_start=12 where thread_id=0;
ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'EVENTS_WAITS_HISTORY'
delete from performance_schema.EVENTS_WAITS_HISTORY
where thread_id=1;
ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'EVENTS_WAITS_HISTORY'
delete from performance_schema.EVENTS_WAITS_HISTORY;
ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'EVENTS_WAITS_HISTORY'
LOCK TABLES performance_schema.EVENTS_WAITS_HISTORY READ;
ERROR 42000: SELECT,LOCK TABL command denied to user 'root'@'localhost' for table 'EVENTS_WAITS_HISTORY'
UNLOCK TABLES;
LOCK TABLES performance_schema.EVENTS_WAITS_HISTORY WRITE;
ERROR 42000: SELECT,LOCK TABL command denied to user 'root'@'localhost' for table 'EVENTS_WAITS_HISTORY'
UNLOCK TABLES;
select * from performance_schema.EVENTS_WAITS_HISTORY_LONG
where event_name like 'Wait/Synch/%' limit 1;
THREAD_ID EVENT_ID EVENT_NAME SOURCE TIMER_START TIMER_END TIMER_WAIT SPINS OBJECT_SCHEMA OBJECT_NAME OBJECT_TYPE OBJECT_INSTANCE_BEGIN NESTING_EVENT_ID OPERATION NUMBER_OF_BYTES FLAGS
# # # # # # # # NULL NULL NULL # NULL # NULL 0
select * from performance_schema.EVENTS_WAITS_HISTORY_LONG
where event_name='FOO';
THREAD_ID EVENT_ID EVENT_NAME SOURCE TIMER_START TIMER_END TIMER_WAIT SPINS OBJECT_SCHEMA OBJECT_NAME OBJECT_TYPE OBJECT_INSTANCE_BEGIN NESTING_EVENT_ID OPERATION NUMBER_OF_BYTES FLAGS
select * from performance_schema.EVENTS_WAITS_HISTORY_LONG
where event_name like 'Wait/Synch/%' order by timer_wait limit 1;
THREAD_ID EVENT_ID EVENT_NAME SOURCE TIMER_START TIMER_END TIMER_WAIT SPINS OBJECT_SCHEMA OBJECT_NAME OBJECT_TYPE OBJECT_INSTANCE_BEGIN NESTING_EVENT_ID OPERATION NUMBER_OF_BYTES FLAGS
# # # # # # # # NULL NULL NULL # NULL # NULL 0
select * from performance_schema.EVENTS_WAITS_HISTORY_LONG
where event_name like 'Wait/Synch/%' order by timer_wait desc limit 1;
THREAD_ID EVENT_ID EVENT_NAME SOURCE TIMER_START TIMER_END TIMER_WAIT SPINS OBJECT_SCHEMA OBJECT_NAME OBJECT_TYPE OBJECT_INSTANCE_BEGIN NESTING_EVENT_ID OPERATION NUMBER_OF_BYTES FLAGS
# # # # # # # # NULL NULL NULL # NULL # NULL 0
insert into performance_schema.EVENTS_WAITS_HISTORY_LONG
set thread_id='1', event_id=1,
event_name='FOO', timer_start=1, timer_end=2, timer_wait=3;
ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'EVENTS_WAITS_HISTORY_LONG'
update performance_schema.EVENTS_WAITS_HISTORY_LONG
set timer_start=12;
ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'EVENTS_WAITS_HISTORY_LONG'
update performance_schema.EVENTS_WAITS_HISTORY_LONG
set timer_start=12 where thread_id=0;
ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'EVENTS_WAITS_HISTORY_LONG'
delete from performance_schema.EVENTS_WAITS_HISTORY_LONG
where thread_id=1;
ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'EVENTS_WAITS_HISTORY_LONG'
delete from performance_schema.EVENTS_WAITS_HISTORY_LONG;
ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'EVENTS_WAITS_HISTORY_LONG'
LOCK TABLES performance_schema.EVENTS_WAITS_HISTORY_LONG READ;
ERROR 42000: SELECT,LOCK TABL command denied to user 'root'@'localhost' for table 'EVENTS_WAITS_HISTORY_LONG'
UNLOCK TABLES;
LOCK TABLES performance_schema.EVENTS_WAITS_HISTORY_LONG WRITE;
ERROR 42000: SELECT,LOCK TABL command denied to user 'root'@'localhost' for table 'EVENTS_WAITS_HISTORY_LONG'
UNLOCK TABLES;
select * from performance_schema.EVENTS_WAITS_SUMMARY_BY_EVENT_NAME
where event_name like 'Wait/Synch/%' limit 1;
EVENT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT
# # # # # #
select * from performance_schema.EVENTS_WAITS_SUMMARY_BY_EVENT_NAME
where event_name='FOO';
EVENT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT
insert into performance_schema.EVENTS_WAITS_SUMMARY_BY_EVENT_NAME
set event_name='FOO', count_star=1, sum_timer_wait=2, min_timer_wait=3,
avg_timer_wait=4, max_timer_wait=5;
ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'EVENTS_WAITS_SUMMARY_BY_EVENT_NAME'
update performance_schema.EVENTS_WAITS_SUMMARY_BY_EVENT_NAME
set count_star=12;
ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'EVENTS_WAITS_SUMMARY_BY_EVENT_NAME'
update performance_schema.EVENTS_WAITS_SUMMARY_BY_EVENT_NAME
set count_star=12 where event_name like "FOO";
ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'EVENTS_WAITS_SUMMARY_BY_EVENT_NAME'
delete from performance_schema.EVENTS_WAITS_SUMMARY_BY_EVENT_NAME
where count_star=1;
ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'EVENTS_WAITS_SUMMARY_BY_EVENT_NAME'
delete from performance_schema.EVENTS_WAITS_SUMMARY_BY_EVENT_NAME;
ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'EVENTS_WAITS_SUMMARY_BY_EVENT_NAME'
LOCK TABLES performance_schema.EVENTS_WAITS_SUMMARY_BY_EVENT_NAME READ;
ERROR 42000: SELECT,LOCK TABL command denied to user 'root'@'localhost' for table 'EVENTS_WAITS_SUMMARY_BY_EVENT_NAME'
UNLOCK TABLES;
LOCK TABLES performance_schema.EVENTS_WAITS_SUMMARY_BY_EVENT_NAME WRITE;
ERROR 42000: SELECT,LOCK TABL command denied to user 'root'@'localhost' for table 'EVENTS_WAITS_SUMMARY_BY_EVENT_NAME'
UNLOCK TABLES;
select * from performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE
where event_name like 'Wait/Synch/%' limit 1;
EVENT_NAME OBJECT_INSTANCE_BEGIN COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT
# # # # # # #
select * from performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE
where event_name='FOO';
EVENT_NAME OBJECT_INSTANCE_BEGIN COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT
select * from performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE
order by count_star limit 1;
EVENT_NAME OBJECT_INSTANCE_BEGIN COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT
# # # # # # #
select * from performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE
order by count_star desc limit 1;
EVENT_NAME OBJECT_INSTANCE_BEGIN COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT
# # # # # # #
select * from performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE
where min_timer_wait > 0 order by count_star limit 1;
EVENT_NAME OBJECT_INSTANCE_BEGIN COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT
# # # # # # #
select * from performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE
where min_timer_wait > 0 order by count_star desc limit 1;
EVENT_NAME OBJECT_INSTANCE_BEGIN COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT
# # # # # # #
insert into performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE
set event_name='FOO', object_instance_begin=0,
count_star=1, sum_timer_wait=2, min_timer_wait=3,
avg_timer_wait=4, max_timer_wait=5;
ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'EVENTS_WAITS_SUMMARY_BY_INSTANCE'
update performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE
set count_star=12;
ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'EVENTS_WAITS_SUMMARY_BY_INSTANCE'
update performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE
set count_star=12 where event_name like "FOO";
ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'EVENTS_WAITS_SUMMARY_BY_INSTANCE'
delete from performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE
where count_star=1;
ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'EVENTS_WAITS_SUMMARY_BY_INSTANCE'
delete from performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE;
ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'EVENTS_WAITS_SUMMARY_BY_INSTANCE'
LOCK TABLES performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE READ;
ERROR 42000: SELECT,LOCK TABL command denied to user 'root'@'localhost' for table 'EVENTS_WAITS_SUMMARY_BY_INSTANCE'
UNLOCK TABLES;
LOCK TABLES performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE WRITE;
ERROR 42000: SELECT,LOCK TABL command denied to user 'root'@'localhost' for table 'EVENTS_WAITS_SUMMARY_BY_INSTANCE'
UNLOCK TABLES;
select * from performance_schema.EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME
where event_name like 'Wait/Synch/%' limit 1;
THREAD_ID EVENT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT
# # # # # # #
select * from performance_schema.EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME
where event_name='FOO';
THREAD_ID EVENT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT
insert into performance_schema.EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME
set event_name='FOO', thread_id=1,
count_star=1, sum_timer_wait=2, min_timer_wait=3,
avg_timer_wait=4, max_timer_wait=5;
ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME'
update performance_schema.EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME
set count_star=12;
ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME'
update performance_schema.EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME
set count_star=12 where event_name like "FOO";
ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME'
delete from performance_schema.EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME
where count_star=1;
ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME'
delete from performance_schema.EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME;
ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME'
LOCK TABLES performance_schema.EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME READ;
ERROR 42000: SELECT,LOCK TABL command denied to user 'root'@'localhost' for table 'EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME'
UNLOCK TABLES;
LOCK TABLES performance_schema.EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME WRITE;
ERROR 42000: SELECT,LOCK TABL command denied to user 'root'@'localhost' for table 'EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME'
UNLOCK TABLES;
select * from performance_schema.FILE_INSTANCES limit 1;
FILE_NAME EVENT_NAME OPEN_COUNT
# # #
select * from performance_schema.FILE_INSTANCES
where file_name='FOO';
FILE_NAME EVENT_NAME OPEN_COUNT
insert into performance_schema.FILE_INSTANCES
set file_name='FOO', event_name='BAR', open_count=12;
ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'FILE_INSTANCES'
update performance_schema.FILE_INSTANCES
set file_name='FOO';
ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'FILE_INSTANCES'
delete from performance_schema.FILE_INSTANCES
where event_name like "wait/%";
ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'FILE_INSTANCES'
delete from performance_schema.FILE_INSTANCES;
ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'FILE_INSTANCES'
LOCK TABLES performance_schema.FILE_INSTANCES READ;
ERROR 42000: SELECT,LOCK TABL command denied to user 'root'@'localhost' for table 'FILE_INSTANCES'
UNLOCK TABLES;
LOCK TABLES performance_schema.FILE_INSTANCES WRITE;
ERROR 42000: SELECT,LOCK TABL command denied to user 'root'@'localhost' for table 'FILE_INSTANCES'
UNLOCK TABLES;
select * from performance_schema.FILE_SUMMARY_BY_EVENT_NAME
where event_name like 'Wait/io/%' limit 1;
EVENT_NAME COUNT_READ COUNT_WRITE SUM_NUMBER_OF_BYTES_READ SUM_NUMBER_OF_BYTES_WRITE
# # # # #
select * from performance_schema.FILE_SUMMARY_BY_EVENT_NAME
where event_name='FOO';
EVENT_NAME COUNT_READ COUNT_WRITE SUM_NUMBER_OF_BYTES_READ SUM_NUMBER_OF_BYTES_WRITE
insert into performance_schema.FILE_SUMMARY_BY_EVENT_NAME
set event_name='FOO', count_read=1, count_write=2,
sum_number_of_bytes_read=4, sum_number_of_bytes_write=5;
ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'FILE_SUMMARY_BY_EVENT_NAME'
update performance_schema.FILE_SUMMARY_BY_EVENT_NAME
set count_read=12;
ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'FILE_SUMMARY_BY_EVENT_NAME'
update performance_schema.FILE_SUMMARY_BY_EVENT_NAME
set count_write=12 where event_name like "FOO";
ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'FILE_SUMMARY_BY_EVENT_NAME'
delete from performance_schema.FILE_SUMMARY_BY_EVENT_NAME
where count_read=1;
ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'FILE_SUMMARY_BY_EVENT_NAME'
delete from performance_schema.FILE_SUMMARY_BY_EVENT_NAME;
ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'FILE_SUMMARY_BY_EVENT_NAME'
LOCK TABLES performance_schema.FILE_SUMMARY_BY_EVENT_NAME READ;
ERROR 42000: SELECT,LOCK TABL command denied to user 'root'@'localhost' for table 'FILE_SUMMARY_BY_EVENT_NAME'
UNLOCK TABLES;
LOCK TABLES performance_schema.FILE_SUMMARY_BY_EVENT_NAME WRITE;
ERROR 42000: SELECT,LOCK TABL command denied to user 'root'@'localhost' for table 'FILE_SUMMARY_BY_EVENT_NAME'
UNLOCK TABLES;
select * from performance_schema.FILE_SUMMARY_BY_INSTANCE
where event_name like 'Wait/io/%' limit 1;
FILE_NAME EVENT_NAME COUNT_READ COUNT_WRITE SUM_NUMBER_OF_BYTES_READ SUM_NUMBER_OF_BYTES_WRITE
# # # # # #
select * from performance_schema.FILE_SUMMARY_BY_INSTANCE
where event_name='FOO';
FILE_NAME EVENT_NAME COUNT_READ COUNT_WRITE SUM_NUMBER_OF_BYTES_READ SUM_NUMBER_OF_BYTES_WRITE
insert into performance_schema.FILE_SUMMARY_BY_INSTANCE
set event_name='FOO', count_read=1, count_write=2,
sum_number_of_bytes_read=4, sum_number_of_bytes_write=5;
ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'FILE_SUMMARY_BY_INSTANCE'
update performance_schema.FILE_SUMMARY_BY_INSTANCE
set count_read=12;
ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'FILE_SUMMARY_BY_INSTANCE'
update performance_schema.FILE_SUMMARY_BY_INSTANCE
set count_write=12 where event_name like "FOO";
ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'FILE_SUMMARY_BY_INSTANCE'
delete from performance_schema.FILE_SUMMARY_BY_INSTANCE
where count_read=1;
ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'FILE_SUMMARY_BY_INSTANCE'
delete from performance_schema.FILE_SUMMARY_BY_INSTANCE;
ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'FILE_SUMMARY_BY_INSTANCE'
LOCK TABLES performance_schema.FILE_SUMMARY_BY_INSTANCE READ;
ERROR 42000: SELECT,LOCK TABL command denied to user 'root'@'localhost' for table 'FILE_SUMMARY_BY_INSTANCE'
UNLOCK TABLES;
LOCK TABLES performance_schema.FILE_SUMMARY_BY_INSTANCE WRITE;
ERROR 42000: SELECT,LOCK TABL command denied to user 'root'@'localhost' for table 'FILE_SUMMARY_BY_INSTANCE'
UNLOCK TABLES;
select * from performance_schema.MUTEX_INSTANCES limit 1;
NAME OBJECT_INSTANCE_BEGIN LOCKED_BY_THREAD_ID
# # NULL
select * from performance_schema.MUTEX_INSTANCES
where name='FOO';
NAME OBJECT_INSTANCE_BEGIN LOCKED_BY_THREAD_ID
insert into performance_schema.MUTEX_INSTANCES
set name='FOO', object_instance_begin=12;
ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'MUTEX_INSTANCES'
update performance_schema.MUTEX_INSTANCES
set name='FOO';
ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'MUTEX_INSTANCES'
delete from performance_schema.MUTEX_INSTANCES
where name like "wait/%";
ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'MUTEX_INSTANCES'
delete from performance_schema.MUTEX_INSTANCES;
ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'MUTEX_INSTANCES'
LOCK TABLES performance_schema.MUTEX_INSTANCES READ;
ERROR 42000: SELECT,LOCK TABL command denied to user 'root'@'localhost' for table 'MUTEX_INSTANCES'
UNLOCK TABLES;
LOCK TABLES performance_schema.MUTEX_INSTANCES WRITE;
ERROR 42000: SELECT,LOCK TABL command denied to user 'root'@'localhost' for table 'MUTEX_INSTANCES'
UNLOCK TABLES;
select * from performance_schema.PERFORMANCE_TIMERS;
TIMER_NAME TIMER_FREQUENCY TIMER_RESOLUTION TIMER_OVERHEAD
CYCLE <frequency> <resolution> <overhead>
NANOSECOND <frequency> <resolution> <overhead>
MICROSECOND <frequency> <resolution> <overhead>
MILLISECOND <frequency> <resolution> <overhead>
TICK <frequency> <resolution> <overhead>
select * from performance_schema.PERFORMANCE_TIMERS
where timer_name='CYCLE';
TIMER_NAME TIMER_FREQUENCY TIMER_RESOLUTION TIMER_OVERHEAD
CYCLE <frequency> <resolution> <overhead>
insert into performance_schema.PERFORMANCE_TIMERS
set timer_name='FOO', timer_frequency=1,
timer_resolution=2, timer_overhead=3;
ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'PERFORMANCE_TIMERS'
update performance_schema.PERFORMANCE_TIMERS
set timer_frequency=12 where timer_name='CYCLE';
ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'PERFORMANCE_TIMERS'
delete from performance_schema.PERFORMANCE_TIMERS;
ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'PERFORMANCE_TIMERS'
delete from performance_schema.PERFORMANCE_TIMERS
where timer_name='CYCLE';
ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'PERFORMANCE_TIMERS'
LOCK TABLES performance_schema.PERFORMANCE_TIMERS READ;
ERROR 42000: SELECT,LOCK TABL command denied to user 'root'@'localhost' for table 'PERFORMANCE_TIMERS'
UNLOCK TABLES;
LOCK TABLES performance_schema.PERFORMANCE_TIMERS WRITE;
ERROR 42000: SELECT,LOCK TABL command denied to user 'root'@'localhost' for table 'PERFORMANCE_TIMERS'
UNLOCK TABLES;
select * from performance_schema.PROCESSLIST
where name like 'Thread/%' limit 1;
THREAD_ID ID NAME
# # #
select * from performance_schema.PROCESSLIST
where name='FOO';
THREAD_ID ID NAME
insert into performance_schema.PROCESSLIST
set name='FOO', thread_id=1, id=2;
ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'PROCESSLIST'
update performance_schema.PROCESSLIST
set thread_id=12;
ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'PROCESSLIST'
update performance_schema.PROCESSLIST
set thread_id=12 where name like "FOO";
ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'PROCESSLIST'
delete from performance_schema.PROCESSLIST
where id=1;
ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'PROCESSLIST'
delete from performance_schema.PROCESSLIST;
ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'PROCESSLIST'
LOCK TABLES performance_schema.PROCESSLIST READ;
ERROR 42000: SELECT,LOCK TABL command denied to user 'root'@'localhost' for table 'PROCESSLIST'
UNLOCK TABLES;
LOCK TABLES performance_schema.PROCESSLIST WRITE;
ERROR 42000: SELECT,LOCK TABL command denied to user 'root'@'localhost' for table 'PROCESSLIST'
UNLOCK TABLES;
select * from performance_schema.RWLOCK_INSTANCES limit 1;
NAME OBJECT_INSTANCE_BEGIN WRITE_LOCKED_BY_THREAD_ID READ_LOCKED_BY_COUNT
# # NULL 0
select * from performance_schema.RWLOCK_INSTANCES
where name='FOO';
NAME OBJECT_INSTANCE_BEGIN WRITE_LOCKED_BY_THREAD_ID READ_LOCKED_BY_COUNT
insert into performance_schema.RWLOCK_INSTANCES
set name='FOO', object_instance_begin=12;
ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'RWLOCK_INSTANCES'
update performance_schema.RWLOCK_INSTANCES
set name='FOO';
ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'RWLOCK_INSTANCES'
delete from performance_schema.RWLOCK_INSTANCES
where name like "wait/%";
ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'RWLOCK_INSTANCES'
delete from performance_schema.RWLOCK_INSTANCES;
ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'RWLOCK_INSTANCES'
LOCK TABLES performance_schema.RWLOCK_INSTANCES READ;
ERROR 42000: SELECT,LOCK TABL command denied to user 'root'@'localhost' for table 'RWLOCK_INSTANCES'
UNLOCK TABLES;
LOCK TABLES performance_schema.RWLOCK_INSTANCES WRITE;
ERROR 42000: SELECT,LOCK TABL command denied to user 'root'@'localhost' for table 'RWLOCK_INSTANCES'
UNLOCK TABLES;
select * from performance_schema.SETUP_CONSUMERS;
NAME ENABLED
events_waits_current YES
events_waits_history YES
events_waits_history_long YES
events_waits_summary_by_thread_by_event_name YES
events_waits_summary_by_event_name YES
events_waits_summary_by_instance YES
file_summary_by_event_name YES
file_summary_by_instance YES
select * from performance_schema.SETUP_CONSUMERS
where name='events_waits_current';
NAME ENABLED
events_waits_current YES
select * from performance_schema.SETUP_CONSUMERS
where enabled='YES';
NAME ENABLED
events_waits_current YES
events_waits_history YES
events_waits_history_long YES
events_waits_summary_by_thread_by_event_name YES
events_waits_summary_by_event_name YES
events_waits_summary_by_instance YES
file_summary_by_event_name YES
file_summary_by_instance YES
select * from performance_schema.SETUP_CONSUMERS
where enabled='NO';
NAME ENABLED
insert into performance_schema.SETUP_CONSUMERS
set name='FOO', enabled='YES';
ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'SETUP_CONSUMERS'
update performance_schema.SETUP_CONSUMERS
set name='FOO';
ERROR HY000: Invalid performance_schema usage.
update performance_schema.SETUP_CONSUMERS
set enabled='YES';
delete from performance_schema.SETUP_CONSUMERS;
ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'SETUP_CONSUMERS'
delete from performance_schema.SETUP_CONSUMERS
where name='events_waits_current';
ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'SETUP_CONSUMERS'
LOCK TABLES performance_schema.SETUP_CONSUMERS READ;
UNLOCK TABLES;
LOCK TABLES performance_schema.SETUP_CONSUMERS WRITE;
UNLOCK TABLES;
select * from performance_schema.SETUP_INSTRUMENTS;
select * from performance_schema.SETUP_INSTRUMENTS
where name like 'Wait/Synch/Mutex/sql/%'
and name not in ('wait/synch/mutex/sql/DEBUG_SYNC::mutex')
order by name limit 10;
NAME ENABLED TIMED
wait/synch/mutex/sql/Cversion_lock YES YES
wait/synch/mutex/sql/Delayed_insert::mutex YES YES
wait/synch/mutex/sql/Event_scheduler::LOCK_scheduler_state YES YES
wait/synch/mutex/sql/hash_filo::lock YES YES
wait/synch/mutex/sql/LOCK_active_mi YES YES
wait/synch/mutex/sql/LOCK_connection_count YES YES
wait/synch/mutex/sql/LOCK_crypt YES YES
wait/synch/mutex/sql/LOCK_delayed_create YES YES
wait/synch/mutex/sql/LOCK_delayed_insert YES YES
wait/synch/mutex/sql/LOCK_delayed_status YES YES
select * from performance_schema.SETUP_INSTRUMENTS
where name like 'Wait/Synch/Rwlock/sql/%'
order by name limit 10;
NAME ENABLED TIMED
wait/synch/rwlock/sql/LOCK_dboptions YES YES
wait/synch/rwlock/sql/LOCK_grant YES YES
wait/synch/rwlock/sql/LOCK_system_variables_hash YES YES
wait/synch/rwlock/sql/LOCK_sys_init_connect YES YES
wait/synch/rwlock/sql/LOCK_sys_init_slave YES YES
wait/synch/rwlock/sql/LOGGER::LOCK_logger YES YES
wait/synch/rwlock/sql/Query_cache_query::lock YES YES
wait/synch/rwlock/sql/THR_LOCK_servers YES YES
wait/synch/rwlock/sql/THR_LOCK_udf YES YES
select * from performance_schema.SETUP_INSTRUMENTS
where name like 'Wait/Synch/Cond/sql/%'
and name not in (
'wait/synch/cond/sql/COND_handler_count',
'wait/synch/cond/sql/DEBUG_SYNC::cond')
order by name limit 10;
NAME ENABLED TIMED
wait/synch/cond/sql/COND_flush_thread_cache YES YES
wait/synch/cond/sql/COND_global_read_lock YES YES
wait/synch/cond/sql/COND_manager YES YES
wait/synch/cond/sql/COND_queue_state YES YES
wait/synch/cond/sql/COND_refresh YES YES
wait/synch/cond/sql/COND_rpl_status YES YES
wait/synch/cond/sql/COND_server_started YES YES
wait/synch/cond/sql/COND_thread_cache YES YES
wait/synch/cond/sql/COND_thread_count YES YES
wait/synch/cond/sql/Delayed_insert::cond YES YES
select * from performance_schema.SETUP_INSTRUMENTS
where name='Wait';
select * from performance_schema.SETUP_INSTRUMENTS
where enabled='YES';
insert into performance_schema.SETUP_INSTRUMENTS
set name='FOO', enabled='YES', timed='YES';
ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'SETUP_INSTRUMENTS'
update performance_schema.SETUP_INSTRUMENTS
set name='FOO';
ERROR HY000: Invalid performance_schema usage.
update performance_schema.SETUP_INSTRUMENTS
set enabled='NO';
update performance_schema.SETUP_INSTRUMENTS
set timed='NO';
select * from performance_schema.SETUP_INSTRUMENTS;
update performance_schema.SETUP_INSTRUMENTS
set enabled='YES', timed='YES';
delete from performance_schema.SETUP_INSTRUMENTS;
ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'SETUP_INSTRUMENTS'
delete from performance_schema.SETUP_INSTRUMENTS
where name like 'Wait/Synch/%';
ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'SETUP_INSTRUMENTS'
LOCK TABLES performance_schema.SETUP_INSTRUMENTS READ;
UNLOCK TABLES;
LOCK TABLES performance_schema.SETUP_INSTRUMENTS WRITE;
UNLOCK TABLES;
select * from performance_schema.SETUP_OBJECTS;
OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED AGGREGATED
select * from performance_schema.SETUP_OBJECTS
where object_type = 'TABLE';
OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED AGGREGATED
select * from performance_schema.SETUP_OBJECTS
where enabled='YES';
OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED AGGREGATED
insert into performance_schema.SETUP_OBJECTS
set object_type='TABLE', object_schema='FOO', object_name='BAR',
enabled='YES', timed='YES', aggregated='YES';
ERROR HY000: Table storage engine for 'SETUP_OBJECTS' doesn't have this option
update performance_schema.SETUP_OBJECTS
set object_type='TABLE';
update performance_schema.SETUP_OBJECTS
set object_schema='ILLEGAL';
update performance_schema.SETUP_OBJECTS
set object_name='ILLEGAL';
update performance_schema.SETUP_OBJECTS
set enabled='NO';
update performance_schema.SETUP_OBJECTS
set timed='NO';
update performance_schema.SETUP_OBJECTS
set aggregated='NO';
select * from performance_schema.SETUP_OBJECTS;
OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED AGGREGATED
update performance_schema.SETUP_OBJECTS
set enabled='YES', timed='YES', aggregated='YES';
delete from performance_schema.SETUP_OBJECTS
where object_type = 'TABLE';
delete from performance_schema.SETUP_OBJECTS;
LOCK TABLES performance_schema.SETUP_OBJECTS READ;
UNLOCK TABLES;
LOCK TABLES performance_schema.SETUP_OBJECTS WRITE;
UNLOCK TABLES;
select * from performance_schema.SETUP_TIMERS;
NAME TIMER_NAME
wait CYCLE
select * from performance_schema.SETUP_TIMERS
where name='Wait';
NAME TIMER_NAME
wait CYCLE
select * from performance_schema.SETUP_TIMERS
where timer_name='CYCLE';
NAME TIMER_NAME
wait CYCLE
insert into performance_schema.SETUP_TIMERS
set name='FOO', timer_name='CYCLE';
ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'SETUP_TIMERS'
update performance_schema.SETUP_TIMERS
set name='FOO';
ERROR HY000: Invalid performance_schema usage.
update performance_schema.SETUP_TIMERS
set timer_name='MILLISECOND';
select * from performance_schema.SETUP_TIMERS;
NAME TIMER_NAME
wait MILLISECOND
update performance_schema.SETUP_TIMERS
set timer_name='CYCLE';
delete from performance_schema.SETUP_TIMERS;
ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'SETUP_TIMERS'
delete from performance_schema.SETUP_TIMERS
where name='Wait';
ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'SETUP_TIMERS'
LOCK TABLES performance_schema.SETUP_TIMERS READ;
UNLOCK TABLES;
LOCK TABLES performance_schema.SETUP_TIMERS WRITE;
UNLOCK TABLES;
UPDATE performance_schema.SETUP_INSTRUMENTS SET enabled = 'NO', timed = 'YES';
UPDATE performance_schema.SETUP_INSTRUMENTS SET enabled = 'YES'
WHERE name LIKE 'wait/io/file/%';
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (id INT PRIMARY KEY, b CHAR(100) DEFAULT 'initial value')
ENGINE=MyISAM;
INSERT INTO t1 (id) VALUES (1), (2), (3), (4), (5), (6), (7), (8);
TRUNCATE TABLE performance_schema.EVENTS_WAITS_HISTORY_LONG;
TRUNCATE TABLE performance_schema.EVENTS_WAITS_HISTORY;
TRUNCATE TABLE performance_schema.EVENTS_WAITS_CURRENT;
SELECT * FROM t1 WHERE id = 1;
id b
1 initial value
SET @before_count = (SELECT SUM(TIMER_WAIT)
FROM performance_schema.EVENTS_WAITS_HISTORY_LONG
WHERE (EVENT_NAME = 'wait/io/file/myisam/dfile')
AND (OBJECT_NAME LIKE '%t1.MYD'));
SELECT IF(@before_count > 0, 'Success', 'Failure') has_instrumentation;
has_instrumentation
Success
SELECT * FROM t1 WHERE id < 4;
id b
1 initial value
2 initial value
3 initial value
SET @after_count = (SELECT SUM(TIMER_WAIT)
FROM performance_schema.EVENTS_WAITS_HISTORY_LONG
WHERE (EVENT_NAME = 'wait/io/file/myisam/dfile')
AND (OBJECT_NAME LIKE '%t1.MYD') AND (1 = 1));
SELECT IF((@after_count - @before_count) > 0, 'Success', 'Failure') test_ff1_timed;
test_ff1_timed
Success
UPDATE performance_schema.SETUP_INSTRUMENTS SET enabled='NO';
SET @before_count = (SELECT SUM(TIMER_WAIT)
FROM performance_schema.EVENTS_WAITS_HISTORY_LONG
WHERE (EVENT_NAME = 'wait/io/file/myisam/dfile')
AND (OBJECT_NAME LIKE '%t1.MYD') AND (2 = 2));
SELECT * FROM t1 WHERE id < 6;
id b
1 initial value
2 initial value
3 initial value
4 initial value
5 initial value
SET @after_count = (SELECT SUM(TIMER_WAIT)
FROM performance_schema.EVENTS_WAITS_HISTORY_LONG
WHERE (EVENT_NAME = 'wait/io/file/myisam/dfile')
AND (OBJECT_NAME LIKE '%t1.MYD') AND (3 = 3));
SELECT IF((COALESCE(@after_count, 0) - COALESCE(@before_count, 0)) = 0, 'Success', 'Failure') test_ff2_timed;
test_ff2_timed
Success
UPDATE performance_schema.SETUP_INSTRUMENTS SET enabled = 'YES'
WHERE name LIKE 'wait/io/file/%';
UPDATE performance_schema.SETUP_INSTRUMENTS SET timed = 'NO';
TRUNCATE TABLE performance_schema.EVENTS_WAITS_HISTORY_LONG;
TRUNCATE TABLE performance_schema.EVENTS_WAITS_HISTORY;
TRUNCATE TABLE performance_schema.EVENTS_WAITS_CURRENT;
SELECT * FROM t1 WHERE id > 4;
id b
5 initial value
6 initial value
7 initial value
8 initial value
SELECT * FROM performance_schema.EVENTS_WAITS_HISTORY_LONG
WHERE TIMER_WAIT != NULL
OR TIMER_START != NULL
OR TIMER_END != NULL;
THREAD_ID EVENT_ID EVENT_NAME SOURCE TIMER_START TIMER_END TIMER_WAIT SPINS OBJECT_SCHEMA OBJECT_NAME OBJECT_TYPE OBJECT_INSTANCE_BEGIN NESTING_EVENT_ID OPERATION NUMBER_OF_BYTES FLAGS
SELECT * FROM performance_schema.EVENTS_WAITS_HISTORY
WHERE TIMER_WAIT != NULL
OR TIMER_START != NULL
OR TIMER_END != NULL;
THREAD_ID EVENT_ID EVENT_NAME SOURCE TIMER_START TIMER_END TIMER_WAIT SPINS OBJECT_SCHEMA OBJECT_NAME OBJECT_TYPE OBJECT_INSTANCE_BEGIN NESTING_EVENT_ID OPERATION NUMBER_OF_BYTES FLAGS
SELECT * FROM performance_schema.EVENTS_WAITS_CURRENT
WHERE TIMER_WAIT != NULL
OR TIMER_START != NULL
OR TIMER_END != NULL;
THREAD_ID EVENT_ID EVENT_NAME SOURCE TIMER_START TIMER_END TIMER_WAIT SPINS OBJECT_SCHEMA OBJECT_NAME OBJECT_TYPE OBJECT_INSTANCE_BEGIN NESTING_EVENT_ID OPERATION NUMBER_OF_BYTES FLAGS
UPDATE performance_schema.SETUP_INSTRUMENTS SET timed = 'YES';
SELECT * FROM t1 WHERE id < 4;
id b
1 initial value
2 initial value
3 initial value
DROP TABLE t1;
SELECT SUM(COUNT_READ) AS sum_count_read,
SUM(COUNT_WRITE) AS sum_count_write,
SUM(SUM_NUMBER_OF_BYTES_READ) AS sum_num_bytes_read,
SUM(SUM_NUMBER_OF_BYTES_WRITE) AS sum_num_bytes_write
FROM performance_schema.FILE_SUMMARY_BY_INSTANCE
WHERE FILE_NAME LIKE CONCAT('%', @@tmpdir, '%') ORDER BY NULL;
SELECT EVENT_NAME, COUNT_STAR, AVG_TIMER_WAIT, SUM_TIMER_WAIT
FROM performance_schema.EVENTS_WAITS_SUMMARY_BY_EVENT_NAME
WHERE COUNT_STAR > 0
ORDER BY SUM_TIMER_WAIT DESC
LIMIT 10;
SELECT i.user, SUM(TIMER_WAIT) SUM_WAIT
# ((TIME_TO_SEC(TIMEDIFF(NOW(), i.startup_time)) * 1000) / SUM(TIMER_WAIT)) * 100 WAIT_PERCENTAGE
FROM performance_schema.EVENTS_WAITS_HISTORY_LONG h
INNER JOIN performance_schema.PROCESSLIST p USING (THREAD_ID)
LEFT JOIN information_schema.PROCESSLIST i USING (ID)
GROUP BY i.user
ORDER BY SUM_WAIT DESC
LIMIT 20;
SELECT h.EVENT_NAME, SUM(h.TIMER_WAIT) TOTAL_WAIT
FROM performance_schema.EVENTS_WAITS_HISTORY_LONG h
INNER JOIN performance_schema.PROCESSLIST p USING (THREAD_ID)
WHERE p.ID = 1
GROUP BY h.EVENT_NAME
HAVING TOTAL_WAIT > 0;
SELECT i.user, h.operation, SUM(NUMBER_OF_BYTES) bytes
FROM performance_schema.EVENTS_WAITS_HISTORY_LONG h
INNER JOIN performance_schema.PROCESSLIST p USING (THREAD_ID)
LEFT JOIN information_schema.PROCESSLIST i USING (ID)
GROUP BY i.user, h.operation
HAVING BYTES > 0
ORDER BY i.user, h.operation;
This diff is collapsed.
use performance_schema;
grant SELECT, UPDATE, LOCK TABLES on performance_schema.* to pfsuser@localhost;
flush privileges;
connect (con1, localhost, pfsuser, , test);
lock tables performance_schema.SETUP_INSTRUMENTS read;
select * from performance_schema.SETUP_INSTRUMENTS;
unlock tables;
lock tables performance_schema.SETUP_INSTRUMENTS write;
update performance_schema.SETUP_INSTRUMENTS set enabled='NO';
update performance_schema.SETUP_INSTRUMENTS set enabled='YES';
unlock tables;
connection default;
flush tables with read lock;
connection con1;
lock tables performance_schema.SETUP_INSTRUMENTS read;
select * from performance_schema.SETUP_INSTRUMENTS;
unlock tables;
lock tables performance_schema.SETUP_INSTRUMENTS write;
connection default;
select event_name,
left(source, locate(":", source)) as short_source,
timer_end, timer_wait, operation
from performance_schema.EVENTS_WAITS_CURRENT
where event_name like "wait/synch/cond/sql/COND_global_read_lock";
event_name short_source timer_end timer_wait operation
wait/synch/cond/sql/COND_global_read_lock lock.cc: NULL NULL wait
unlock tables;
update performance_schema.SETUP_INSTRUMENTS set enabled='NO';
update performance_schema.SETUP_INSTRUMENTS set enabled='YES';
unlock tables;
connection default;
drop user pfsuser@localhost;
flush privileges;
This diff is collapsed.
SELECT EVENT_ID FROM performance_schema.EVENTS_WAITS_CURRENT
WHERE THREAD_ID IN
(SELECT THREAD_ID FROM performance_schema.PROCESSLIST)
AND EVENT_NAME IN
(SELECT NAME FROM performance_schema.SETUP_INSTRUMENTS
WHERE NAME LIKE "wait/synch/%")
LIMIT 1;
create table test.t1(a int) engine=performance_schema;
ERROR HY000: Invalid performance_schema usage.
create table test.t1 like performance_schema.EVENTS_WAITS_CURRENT;
ERROR HY000: Invalid performance_schema usage.
create table performance_schema.t1(a int);
ERROR 42000: CREATE command denied to user 'root'@'localhost' for table 't1'
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment