Commit 17f68f6a authored by Sunanda Menon's avatar Sunanda Menon

merge

parents 53f6e8bc 2ac02cf3
......@@ -115,18 +115,27 @@ ENDIF()
# Control aspects of the development environment which are
# specific to MySQL maintainers and developers.
#
INCLUDE (CheckCCompilerFlag)
OPTION(MYSQL_MAINTAINER_MODE "MySQL maintainer-specific development environment" OFF)
# Whether the maintainer mode should be enabled.
IF(MYSQL_MAINTAINER_MODE)
IF(CMAKE_COMPILER_IS_GNUCC)
CHECK_C_COMPILER_FLAG("-Wdeclaration-after-statement" HAVE_DECLARATION_AFTER_STATEMENT)
IF(HAVE_DECLARATION_AFTER_STATEMENT)
SET(MY_MAINTAINER_DECLARATION_AFTER_STATEMENT "-Wdeclaration-after-statement")
ENDIF()
SET(MY_MAINTAINER_C_WARNINGS
"-Wall -Wextra -Wunused -Wwrite-strings -Wno-strict-aliasing -Werror"
CACHE STRING "C warning options used in maintainer builds.")
"-Wall -Wextra -Wunused -Wwrite-strings -Wno-strict-aliasing -Werror")
ENDIF()
IF(CMAKE_COMPILER_IS_GNUCXX)
SET(MY_MAINTAINER_CXX_WARNINGS "${MY_MAINTAINER_C_WARNINGS} -Wno-unused-parameter"
CACHE STRING "C++ warning options used in maintainer builds.")
ENDIF()
IF(CMAKE_COMPILER_IS_GNUCC)
SET(MY_MAINTAINER_C_WARNINGS
"${MY_MAINTAINER_C_WARNINGS} ${MY_MAINTAINER_DECLARATION_AFTER_STATEMENT}"
CACHE STRING "C warning options used in maintainer builds.")
ENDIF()
# Do not make warnings in checks into errors.
IF(CMAKE_COMPILER_IS_GNUCC AND CMAKE_COMPILER_IS_GNUCXX)
SET(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -Wno-error")
......
......@@ -86,7 +86,7 @@ IF(UNIX)
SET(CMAKE_INSTALL_PREFIX ${default_prefix}
CACHE PATH "install prefix" FORCE)
ENDIF()
SET(VALID_INSTALL_LAYOUTS "RPM" "STANDALONE" "DEB" "SVR5")
SET(VALID_INSTALL_LAYOUTS "RPM" "STANDALONE" "DEB" "SVR4")
LIST(FIND VALID_INSTALL_LAYOUTS "${INSTALL_LAYOUT}" ind)
IF(ind EQUAL -1)
MESSAGE(FATAL_ERROR "Invalid INSTALL_LAYOUT parameter:${INSTALL_LAYOUT}."
......
......@@ -19,6 +19,7 @@ AC_DEFUN([MY_MAINTAINER_MODE_WARNINGS], [
AS_IF([test "$GCC" = "yes"], [
C_WARNINGS="-Wall -Wextra -Wunused -Wwrite-strings -Wno-strict-aliasing -Werror"
CXX_WARNINGS="${C_WARNINGS} -Wno-unused-parameter"
C_WARNINGS="${C_WARNINGS} -Wdeclaration-after-statement"
])
# Test whether the warning options work.
......
......@@ -256,7 +256,7 @@ extern my_bool my_disable_locking, my_disable_async_io,
extern char wild_many,wild_one,wild_prefix;
extern const char *charsets_dir;
/* from default.c */
extern char *my_defaults_extra_file;
extern const char *my_defaults_extra_file;
extern const char *my_defaults_group_suffix;
extern const char *my_defaults_file;
......
......@@ -79,8 +79,7 @@ struct st_mysql_client_plugin_AUTHENTICATION
/**
loads a plugin and initializes it
@param mysql MYSQL structure. only MYSQL_PLUGIN_DIR option value is used,
and last_errno/last_error, for error reporting
@param mysql MYSQL structure.
@param name a name of the plugin to load
@param type type of plugin that should be loaded, -1 to disable type check
@param argc number of arguments to pass to the plugin initialization
......@@ -100,8 +99,7 @@ mysql_load_plugin(struct st_mysql *mysql, const char *name, int type,
This is the same as mysql_load_plugin, but take va_list instead of
a list of arguments.
@param mysql MYSQL structure. only MYSQL_PLUGIN_DIR option value is used,
and last_errno/last_error, for error reporting
@param mysql MYSQL structure.
@param name a name of the plugin to load
@param type type of plugin that should be loaded, -1 to disable type check
@param argc number of arguments to pass to the plugin initialization
......@@ -118,8 +116,7 @@ mysql_load_plugin_v(struct st_mysql *mysql, const char *name, int type,
/**
finds an already loaded plugin by name, or loads it, if necessary
@param mysql MYSQL structure. only MYSQL_PLUGIN_DIR option value is used,
and last_errno/last_error, for error reporting
@param mysql MYSQL structure.
@param name a name of the plugin to load
@param type type of plugin that should be loaded
......
......@@ -506,7 +506,8 @@ int init_embedded_server(int argc, char **argv, char **groups)
orig_argc= *argcp;
orig_argv= *argvp;
load_defaults("my", (const char **)groups, argcp, argvp);
if (load_defaults("my", (const char **)groups, argcp, argvp))
return 1;
defaults_argc= *argcp;
defaults_argv= *argvp;
remaining_argc= argc;
......
......@@ -24,7 +24,6 @@ main.wait_timeout @solaris # Bug#51244 2010-04-26 alik wait_timeou
rpl.rpl_heartbeat_basic # BUG#54820 2010-06-26 alik rpl.rpl_heartbeat_basic fails sporadically again
rpl.rpl_heartbeat_2slaves # BUG#43828 2009-10-22 luis fails sporadically
rpl.rpl_innodb_bug28430* # Bug#46029
rpl.rpl_killed_ddl @windows # Bug#47638 2010-01-20 alik The rpl_killed_ddl test fails on Windows
sys_vars.max_sp_recursion_depth_func @solaris # Bug#47791 2010-01-20 alik Several test cases fail on Solaris with error Thread stack overrun
sys_vars.slow_query_log_func @solaris # Bug#54819 2010-06-26 alik sys_vars.slow_query_log_func fails sporadically on Solaris 10
......
perl mysql-test-run.pl --timer --force --parallel=auto --experimental=collections/default.experimental --comment=n_mix --vardir=var-n_mix --mysqld=--binlog-format=mixed
perl mysql-test-run.pl --timer --force --parallel=auto --experimental=collections/default.experimental --comment=ps_row --vardir=var-ps_row --ps-protocol --mysqld=--binlog-format=row
perl mysql-test-run.pl --timer --force --parallel=auto --experimental=collections/default.experimental --comment=embedded --vardir=var-emebbed --embedded
perl mysql-test-run.pl --timer --force --parallel=auto --experimental=collections/default.experimental --comment=funcs_1 --vardir=var-funcs_1 --suite=funcs_1
perl mysql-test-run.pl --timer --force --parallel=auto --experimental=collections/default.experimental --comment=rpl_binlog_row --vardir=var-rpl_binlog_row --mysqld=--binlog-format=row --suite=rpl,binlog --skip-ndb
perl mysql-test-run.pl --timer --force --parallel=auto --comment=n_mix --vardir=var-n_mix --mysqld=--binlog-format=mixed --experimental=collections/default.experimental --skip-ndb --skip-test-list=collections/disabled-per-push.list
perl mysql-test-run.pl --timer --force --parallel=auto --comment=main_ps_row --vardir=var-main-ps_row --suite=main --ps-protocol --mysqld=--binlog-format=row --experimental=collections/default.experimental --skip-ndb --skip-test-list=collections/disabled-per-push.list
perl mysql-test-run.pl --timer --force --parallel=auto --comment=main_embedded --vardir=var-main_emebbed --suite=main --embedded --experimental=collections/default.experimental --skip-ndb
perl mysql-test-run.pl --timer --force --parallel=auto --comment=funcs_1 --vardir=var-funcs_1 --suite=funcs_1 --experimental=collections/default.experimental --skip-ndb
......@@ -177,8 +177,6 @@ sub collect_test_cases ($$$$) {
if ( $opt_reorder && !$quick_collect)
{
# Reorder the test cases in an order that will make them faster to run
my %sort_criteria;
# Make a mapping of test name to a string that represents how that test
# should be sorted among the other tests. Put the most important criterion
# first, then a sub-criterion, then sub-sub-criterion, etc.
......@@ -190,24 +188,31 @@ sub collect_test_cases ($$$$) {
# Append the criteria for sorting, in order of importance.
#
push(@criteria, "ndb=" . ($tinfo->{'ndb_test'} ? "A" : "B"));
push(@criteria, $tinfo->{template_path});
# Group test with equal options together.
# Ending with "~" makes empty sort later than filled
my $opts= $tinfo->{'master_opt'} ? $tinfo->{'master_opt'} : [];
push(@criteria, join("!", sort @{$opts}) . "~");
# Add slave opts if any
if ($tinfo->{'slave_opt'})
{
push(@criteria, join("!", sort @{$tinfo->{'slave_opt'}}));
}
# This sorts tests with force-restart *before* identical tests
push(@criteria, $tinfo->{force_restart} ? "force-restart" : "no-restart");
$sort_criteria{$tinfo->{name}} = join(" ", @criteria);
$tinfo->{criteria}= join(" ", @criteria);
}
@$cases = sort {
$sort_criteria{$a->{'name'}} . $a->{'name'} cmp
$sort_criteria{$b->{'name'}} . $b->{'name'}; } @$cases;
@$cases = sort {$a->{criteria} cmp $b->{criteria}; } @$cases;
# For debugging the sort-order
# foreach my $tinfo (@$cases)
# {
# print("$sort_criteria{$tinfo->{'name'}} -> \t$tinfo->{'name'}\n");
# my $tname= $tinfo->{name} . ' ' . $tinfo->{combination};
# my $crit= $tinfo->{criteria};
# print("$tname\n\t$crit\n");
# }
}
if (defined $print_testcases){
......
......@@ -704,22 +704,40 @@ sub run_test_server ($$$) {
next;
}
# Prefer same configuration, or just use next if --noreorder
if (!$opt_reorder or (defined $result and
$result->{template_path} eq $t->{template_path}))
{
#mtr_report("Test uses same config => good match");
# Test uses same config => good match
$next= splice(@$tests, $i, 1);
last;
}
# Second best choice is the first that does not fulfill
# any of the above conditions
if (!defined $second_best){
#mtr_report("Setting second_best to $i");
$second_best= $i;
}
# Smart allocation of next test within this thread.
if ($opt_reorder and $opt_parallel > 1 and defined $result)
{
my $wid= $result->{worker};
# Reserved for other thread, try next
next if (defined $t->{reserved} and $t->{reserved} != $wid);
if (! defined $t->{reserved})
{
# Force-restart not relevant when comparing *next* test
$t->{criteria} =~ s/force-restart$/no-restart/;
my $criteria= $t->{criteria};
# Reserve similar tests for this worker, but not too many
my $maxres= (@$tests - $i) / $opt_parallel + 1;
for (my $j= $i+1; $j <= $i + $maxres; $j++)
{
my $tt= $tests->[$j];
last unless defined $tt;
last if $tt->{criteria} ne $criteria;
$tt->{reserved}= $wid;
}
}
}
# At this point we have found next suitable test
$next= splice(@$tests, $i, 1);
last;
}
# Use second best choice if no other test has been found
......@@ -728,10 +746,12 @@ sub run_test_server ($$$) {
mtr_error("Internal error, second best too large($second_best)")
if $second_best > $#$tests;
$next= splice(@$tests, $second_best, 1);
delete $next->{reserved};
}
if ($next) {
#$next->print_test();
# We don't need this any more
delete $next->{criteria};
$next->write_test($sock, 'TESTCASE');
$running{$next->key()}= $next;
$num_ndb_tests++ if ($next->{ndb_test});
......@@ -816,6 +836,11 @@ sub run_worker ($) {
delete($test->{'comment'});
delete($test->{'logfile'});
# A sanity check. Should this happen often we need to look at it.
if (defined $test->{reserved} && $test->{reserved} != $thread_num) {
my $tres= $test->{reserved};
mtr_warning("Test reserved for w$tres picked up by w$thread_num");
}
$test->{worker} = $thread_num if $opt_parallel > 1;
run_testcase($test);
......@@ -894,7 +919,7 @@ sub command_line_setup {
'ssl|with-openssl' => \$opt_ssl,
'skip-ssl' => \$opt_skip_ssl,
'compress' => \$opt_compress,
'vs-config' => \$opt_vs_config,
'vs-config=s' => \$opt_vs_config,
# Max number of parallel threads to use
'parallel=s' => \$opt_parallel,
......@@ -4463,7 +4488,13 @@ sub mysqld_arguments ($$$) {
my $mysqld= shift;
my $extra_opts= shift;
my @defaults = grep(/^--defaults-file=/, @$extra_opts);
if (@defaults > 0) {
mtr_add_arg($args, pop(@defaults))
}
else {
mtr_add_arg($args, "--defaults-file=%s", $path_config_file);
}
# When mysqld is run by a root user(euid is 0), it will fail
# to start unless we specify what user to run as, see BUG#30630
......@@ -4499,6 +4530,9 @@ sub mysqld_arguments ($$$) {
my $found_skip_core= 0;
foreach my $arg ( @$extra_opts )
{
# Skip --defaults-file option since it's handled above.
next if $arg =~ /^--defaults-file/;
# Allow --skip-core-file to be set in <testname>-[master|slave].opt file
if ($arg eq "--skip-core-file")
{
......@@ -4732,17 +4766,6 @@ sub server_need_restart {
}
}
# Temporary re-enable the "always restart slave" hack
# this should be removed asap, but will require that each rpl
# testcase cleanup better after itself - ie. stop and reset
# replication
# Use the "#!use-slave-opt" marker to detect that this is a "slave"
# server
if ( $server->option("#!use-slave-opt") ){
mtr_verbose_restart($server, "Always restart slave(s)");
return 1;
}
my $is_mysqld= grep ($server eq $_, mysqlds());
if ($is_mysqld)
{
......@@ -5317,8 +5340,7 @@ sub gdb_arguments {
"break mysql_parse\n" .
"commands 1\n" .
"disable 1\n" .
"end\n" .
"run");
"end\n");
}
if ( $opt_manual_gdb )
......
......@@ -2040,6 +2040,20 @@ predicted_order hex(utf8_encoding)
100 E0B78AE2808DE0B6BA
101 E0B78AE2808DE0B6BB
DROP TABLE t1;
SET NAMES utf8 COLLATE utf8_sinhala_ci;
CREATE TABLE t1 (s1 VARCHAR(10) COLLATE utf8_sinhala_ci);
INSERT INTO t1 VALUES ('a'),('ae'),('af');
SELECT s1,hex(s1) FROM t1 ORDER BY s1;
s1 hex(s1)
a 61
ae 6165
af 6166
SELECT * FROM t1 ORDER BY s1;
s1
a
ae
af
DROP TABLE t1;
End of 5.4 tests
#
# Start of 5.5 tests
......
......@@ -141,7 +141,7 @@ DROP TABLE t1;
SELECT (CONVERT('0' USING latin1) IN (CHAR(COT('v') USING utf8),''));
ERROR 22003: DOUBLE value is out of range in 'cot('v')'
SET NAMES utf8 COLLATE utf8_latvian_ci ;
SELECT UPDATEXML(-73 * -2465717823867977728,@@global.slave_net_timeout,null);
SELECT UPDATEXML(-73 * -2465717823867977728,@@global.auto_increment_increment,null);
ERROR 22003: BIGINT value is out of range in '(-(73) * -(2465717823867977728))'
#
# End Bug#57882
......
......@@ -45,3 +45,227 @@ p1
max=1
drop procedure p1;
drop table t1;
CREATE TABLE slow (slow INT, general INT, master_heartbeat_period INT, ignore_server_ids INT);
INSERT INTO slow(slow, general, master_heartbeat_period, ignore_server_ids) VALUES (1,2,3,4), (5,6,7,8);
INSERT INTO slow(slow, general, master_heartbeat_period) VALUES (1,2,3), (5,6,7);
INSERT INTO slow(slow, general) VALUES (1,2), (5,6);
INSERT INTO slow(slow) VALUES (1), (5);
SELECT slow, general, master_heartbeat_period, ignore_server_ids FROM slow ORDER BY slow;
slow general master_heartbeat_period ignore_server_ids
1 2 3 4
1 2 3 NULL
1 2 NULL NULL
1 NULL NULL NULL
5 6 7 8
5 6 7 NULL
5 6 NULL NULL
5 NULL NULL NULL
SELECT slow, general, master_heartbeat_period FROM slow ORDER BY slow;
slow general master_heartbeat_period
1 2 3
1 2 3
1 2 NULL
1 NULL NULL
5 6 7
5 6 7
5 6 NULL
5 NULL NULL
SELECT slow, master_heartbeat_period FROM slow ORDER BY slow;
slow master_heartbeat_period
1 3
1 3
1 NULL
1 NULL
5 7
5 7
5 NULL
5 NULL
SELECT slow FROM slow ORDER BY slow;
slow
1
1
1
1
5
5
5
5
DROP TABLE slow;
CREATE TABLE general (slow INT, general INT, master_heartbeat_period INT, ignore_server_ids INT);
INSERT INTO general(slow, general, master_heartbeat_period, ignore_server_ids) VALUES (1,2,3,4), (5,6,7,8);
INSERT INTO general(slow, general, master_heartbeat_period) VALUES (1,2,3), (5,6,7);
INSERT INTO general(slow, general) VALUES (1,2), (5,6);
INSERT INTO general(slow) VALUES (1), (5);
SELECT slow, general, master_heartbeat_period, ignore_server_ids FROM general ORDER BY slow;
slow general master_heartbeat_period ignore_server_ids
1 2 3 4
1 2 3 NULL
1 2 NULL NULL
1 NULL NULL NULL
5 6 7 8
5 6 7 NULL
5 6 NULL NULL
5 NULL NULL NULL
SELECT slow, general, master_heartbeat_period FROM general ORDER BY slow;
slow general master_heartbeat_period
1 2 3
1 2 3
1 2 NULL
1 NULL NULL
5 6 7
5 6 7
5 6 NULL
5 NULL NULL
SELECT slow, master_heartbeat_period FROM general ORDER BY slow;
slow master_heartbeat_period
1 3
1 3
1 NULL
1 NULL
5 7
5 7
5 NULL
5 NULL
SELECT slow FROM general ORDER BY slow;
slow
1
1
1
1
5
5
5
5
DROP TABLE general;
CREATE TABLE master_heartbeat_period (slow INT, general INT, master_heartbeat_period INT, ignore_server_ids INT);
INSERT INTO master_heartbeat_period(slow, general, master_heartbeat_period, ignore_server_ids) VALUES (1,2,3,4), (5,6,7,8);
INSERT INTO master_heartbeat_period(slow, general, master_heartbeat_period) VALUES (1,2,3), (5,6,7);
INSERT INTO master_heartbeat_period(slow, general) VALUES (1,2), (5,6);
INSERT INTO master_heartbeat_period(slow) VALUES (1), (5);
SELECT slow, general, master_heartbeat_period, ignore_server_ids FROM master_heartbeat_period ORDER BY slow;
slow general master_heartbeat_period ignore_server_ids
1 2 3 4
1 2 3 NULL
1 2 NULL NULL
1 NULL NULL NULL
5 6 7 8
5 6 7 NULL
5 6 NULL NULL
5 NULL NULL NULL
SELECT slow, general, master_heartbeat_period FROM master_heartbeat_period ORDER BY slow;
slow general master_heartbeat_period
1 2 3
1 2 3
1 2 NULL
1 NULL NULL
5 6 7
5 6 7
5 6 NULL
5 NULL NULL
SELECT slow, master_heartbeat_period FROM master_heartbeat_period ORDER BY slow;
slow master_heartbeat_period
1 3
1 3
1 NULL
1 NULL
5 7
5 7
5 NULL
5 NULL
SELECT slow FROM master_heartbeat_period ORDER BY slow;
slow
1
1
1
1
5
5
5
5
DROP TABLE master_heartbeat_period;
CREATE TABLE ignore_server_ids (slow INT, general INT, master_heartbeat_period INT, ignore_server_ids INT);
INSERT INTO ignore_server_ids(slow, general, master_heartbeat_period, ignore_server_ids) VALUES (1,2,3,4), (5,6,7,8);
INSERT INTO ignore_server_ids(slow, general, master_heartbeat_period) VALUES (1,2,3), (5,6,7);
INSERT INTO ignore_server_ids(slow, general) VALUES (1,2), (5,6);
INSERT INTO ignore_server_ids(slow) VALUES (1), (5);
SELECT slow, general, master_heartbeat_period, ignore_server_ids FROM ignore_server_ids ORDER BY slow;
slow general master_heartbeat_period ignore_server_ids
1 2 3 4
1 2 3 NULL
1 2 NULL NULL
1 NULL NULL NULL
5 6 7 8
5 6 7 NULL
5 6 NULL NULL
5 NULL NULL NULL
SELECT slow, general, master_heartbeat_period FROM ignore_server_ids ORDER BY slow;
slow general master_heartbeat_period
1 2 3
1 2 3
1 2 NULL
1 NULL NULL
5 6 7
5 6 7
5 6 NULL
5 NULL NULL
SELECT slow, master_heartbeat_period FROM ignore_server_ids ORDER BY slow;
slow master_heartbeat_period
1 3
1 3
1 NULL
1 NULL
5 7
5 7
5 NULL
5 NULL
SELECT slow FROM ignore_server_ids ORDER BY slow;
slow
1
1
1
1
5
5
5
5
DROP TABLE ignore_server_ids;
CREATE TABLE t1 (slow INT, general INT, ignore_server_ids INT, master_heartbeat_period INT);
INSERT INTO t1 VALUES (1,2,3,4);
CREATE PROCEDURE p1()
BEGIN
DECLARE slow INT;
DECLARE general INT;
DECLARE ignore_server_ids INT;
DECLARE master_heartbeat_period INT;
SELECT max(t1.slow) INTO slow FROM t1;
SELECT max(t1.general) INTO general FROM t1;
SELECT max(t1.ignore_server_ids) INTO ignore_server_ids FROM t1;
SELECT max(t1.master_heartbeat_period) INTO master_heartbeat_period FROM t1;
SELECT slow, general, ignore_server_ids, master_heartbeat_period;
END|
CREATE PROCEDURE p2()
BEGIN
DECLARE n INT DEFAULT 2;
general: WHILE n > 0 DO
SET n = n -1;
END WHILE general;
SET n = 2;
slow: WHILE n > 0 DO
SET n = n -1;
END WHILE slow;
SET n = 2;
ignore_server_ids: WHILE n > 0 DO
SET n = n -1;
END WHILE ignore_server_ids;
SET n = 2;
master_heartbeat_period: WHILE n > 0 DO
SET n = n -1;
END WHILE master_heartbeat_period;
END|
CALL p1();
slow general ignore_server_ids master_heartbeat_period
1 2 3 4
call p2();
DROP PROCEDURE p1;
DROP PROCEDURE p2;
DROP TABLE t1;
......@@ -896,6 +896,16 @@ TIMESTAMP 1 1 SELECT SQL_NO_CACHE 'Bug#31700 - KEY', f1,f2,f3,SLEEP(1.1) FROM t1
TIMESTAMP 1 1 SELECT SQL_NO_CACHE 'Bug#31700 - PK', f1,f2,f3,SLEEP(1.1) FROM t1 WHERE f1=2
DROP TABLE t1;
TRUNCATE TABLE mysql.slow_log;
use mysql;
drop table if exists renamed_general_log;
drop table if exists renamed_slow_log;
RENAME TABLE general_log TO renamed_general_log;
ERROR HY000: Cannot rename 'general_log'. When logging enabled, rename to/from log table must rename two tables: the log table to an archive table and another table back to 'general_log'
RENAME TABLE slow_log TO renamed_slow_log;
ERROR HY000: Cannot rename 'slow_log'. When logging enabled, rename to/from log table must rename two tables: the log table to an archive table and another table back to 'slow_log'
use test;
flush tables with read lock;
unlock tables;
SET @@session.long_query_time= @old_long_query_time;
SET @@global.log_output= @old_log_output;
SET @@global.slow_query_log= @old_slow_query_log;
......
......@@ -19,6 +19,7 @@ The following options may be given as the first argument:
--auto-increment-offset[=#]
Offset added to Auto-increment columns. Used when
auto-increment-increment != 1
--autocommit Set default value for autocommit (0 or 1)
--automatic-sp-privileges
Creating and dropping stored procedures alters ACLs
(Defaults to on; use --skip-automatic-sp-privileges to disable.)
......
......@@ -19,6 +19,7 @@ The following options may be given as the first argument:
--auto-increment-offset[=#]
Offset added to Auto-increment columns. Used when
auto-increment-increment != 1
--autocommit Set default value for autocommit (0 or 1)
--automatic-sp-privileges
Creating and dropping stored procedures alters ACLs
(Defaults to on; use --skip-automatic-sp-privileges to disable.)
......
......@@ -75,4 +75,40 @@ CALL p1 ();
ERROR HY000: Trigger does not exist
DROP TABLE t1;
DROP PROCEDURE p1;
#
# Bug#54375: Error in stored procedure leaves connection
# in different default schema
#
SET @@SQL_MODE = 'STRICT_ALL_TABLES';
DROP DATABASE IF EXISTS db1;
CREATE DATABASE db1;
USE db1;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (c1 int NOT NULL PRIMARY KEY);
INSERT INTO t1 VALUES (1);
CREATE FUNCTION f1 (
some_value int
)
RETURNS smallint
DETERMINISTIC
BEGIN
INSERT INTO t1 SET c1 = some_value;
RETURN(LAST_INSERT_ID());
END$$
DROP DATABASE IF EXISTS db2;
CREATE DATABASE db2;
USE db2;
SELECT DATABASE();
DATABASE()
db2
SELECT db1.f1(1);
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
SELECT DATABASE();
DATABASE()
db2
USE test;
DROP FUNCTION db1.f1;
DROP TABLE db1.t1;
DROP DATABASE db1;
DROP DATABASE db2;
End of 5.1 tests
......@@ -5005,3 +5005,15 @@ SELECT * FROM t2 UNION SELECT * FROM t2
ORDER BY (SELECT * FROM t1 WHERE MATCH(a) AGAINST ('+abc' IN BOOLEAN MODE));
DROP TABLE t1,t2;
End of 5.1 tests
#
# Bug #57704: Cleanup code dies with void TABLE::set_keyread(bool):
# Assertion `file' failed.
#
CREATE TABLE t1 (a INT);
SELECT 1 FROM
(SELECT ROW(
(SELECT 1 FROM t1 RIGHT JOIN
(SELECT 1 FROM t1, t1 t2) AS d ON 1),
1) FROM t1) AS e;
ERROR 21000: Operand should contain 1 column(s)
DROP TABLE t1;
[mysqld]
open-files-limit=1024
character-set-server=latin1
connect-timeout=4711
log-bin-trust-function-creators=1
key_buffer_size=1M
sort_buffer=256K
max_heap_table_size=1M
loose-innodb_data_file_path=ibdata1:10M:autoextend
loose-innodb_buffer_pool_size=8M
loose-innodb_write_io_threads=2
loose-innodb_read_io_threads=2
loose-innodb_log_buffer_size=1M
loose-innodb_log_file_size=5M
loose-innodb_additional_mem_pool_size=1M
loose-innodb_log_files_in_group=2
slave-net-timeout=120
log-bin=mysqld-bin
loose-enable-performance-schema
loose-performance-schema-max-mutex-instances=10000
loose-performance-schema-max-rwlock-instances=10000
loose-performance-schema-max-table-instances=500
loose-performance-schema-max-table-handles=1000
binlog-direct-non-transactional-updates
[mysql]
default-character-set=latin1
[mysqlshow]
default-character-set=latin1
[mysqlimport]
default-character-set=latin1
[mysqlcheck]
default-character-set=latin1
[mysql_upgrade]
default-character-set=latin1
tmpdir=/home/bzr/bugs/b57108-5.5-bugteam/mysql-test/var/tmp
[mysqld.1]
#!run-master-sh
log-bin=master-bin
loose-enable-performance-schema
basedir=/home/bzr/bugs/b57108-5.5-bugteam
tmpdir=/home/bzr/bugs/b57108-5.5-bugteam/mysql-test/var/tmp/mysqld.1
character-sets-dir=/home/bzr/bugs/b57108-5.5-bugteam/sql/share/charsets
lc-messages-dir=/home/bzr/bugs/b57108-5.5-bugteam/sql/share/
datadir=/home/bzr/bugs/b57108-5.5-bugteam/mysql-test/var/mysqld.1/data
pid-file=/home/bzr/bugs/b57108-5.5-bugteam/mysql-test/var/run/mysqld.1.pid
#host=localhost
port=13000
socket=/home/bzr/bugs/b57108-5.5-bugteam/mysql-test/var/tmp/mysqld.1.sock
#log-error=/home/bzr/bugs/b57108-5.5-bugteam/mysql-test/var/log/mysqld.1.err
general_log=1
general_log_file=/home/bzr/bugs/b57108-5.5-bugteam/mysql-test/var/mysqld.1/mysqld.log
slow_query_log=1
slow_query_log_file=/home/bzr/bugs/b57108-5.5-bugteam/mysql-test/var/mysqld.1/mysqld-slow.log
#user=root
#password=
server-id=1
secure-file-priv=/home/bzr/bugs/b57108-5.5-bugteam/mysql-test/var
ssl-ca=/home/bzr/bugs/b57108-5.5-bugteam/mysql-test/std_data/cacert.pem
ssl-cert=/home/bzr/bugs/b57108-5.5-bugteam/mysql-test/std_data/server-cert.pem
ssl-key=/home/bzr/bugs/b57108-5.5-bugteam/mysql-test/std_data/server-key.pem
[mysqlbinlog]
disable-force-if-open
character-sets-dir=/home/bzr/bugs/b57108-5.5-bugteam/sql/share/charsets
[ENV]
MASTER_MYPORT=13000
MASTER_MYSOCK=/home/bzr/bugs/b57108-5.5-bugteam/mysql-test/var/tmp/mysqld.1.sock
[client]
password=
user=root
port=13000
host=localhost
socket=/home/bzr/bugs/b57108-5.5-bugteam/mysql-test/var/tmp/mysqld.1.sock
[mysqltest]
ssl-ca=/home/bzr/bugs/b57108-5.5-bugteam/mysql-test/std_data/cacert.pem
ssl-cert=/home/bzr/bugs/b57108-5.5-bugteam/mysql-test/std_data/client-cert.pem
ssl-key=/home/bzr/bugs/b57108-5.5-bugteam/mysql-test/std_data/client-key.pem
skip-ssl=1
[client.1]
password=
user=root
port=13000
host=localhost
socket=/home/bzr/bugs/b57108-5.5-bugteam/mysql-test/var/tmp/mysqld.1.sock
--max_binlog_size=4096 --default-storage-engine=MyISAM
--force-restart
INSTALL PLUGIN example SONAME 'ha_example.so';
SELECT @@global.connect_timeout AS connect_timeout, @@global.local_infile AS local_infile;
connect_timeout 4711
local_infile 1
UNINSTALL PLUGIN example;
--defaults-file=std_data/bug57108.cnf
$EXAMPLE_PLUGIN_OPT
--source include/not_windows_embedded.inc
--source include/have_example_plugin.inc
# Test that we can install a plugin despite the fact that we have
# switched directory after starting the server and am using a relative
# --defaults-file.
--replace_regex /\.dll/.so/
eval INSTALL PLUGIN example SONAME $HA_EXAMPLE_SO;
--query_vertical SELECT @@global.connect_timeout AS connect_timeout, @@global.local_infile AS local_infile
UNINSTALL PLUGIN example;
# Check for IBM i 6.1 or later
--disable_query_log
system uname -rv > $MYSQLTEST_VARDIR/tmp/version;
--disable_warnings
drop table if exists uname_vr;
--enable_warnings
create temporary table uname_vr (r int, v int);
--disable_warnings
eval LOAD DATA INFILE "$MYSQLTEST_VARDIR/tmp/version" into table uname_vr fields terminated by ' ';
--enable_warnings
let $ok = `select count(*) from uname_vr where v = 5 and r = 4`;
drop table uname_vr;
remove_file $MYSQLTEST_VARDIR/tmp/version;
--enable_query_log
if (!$ok)
{
skip "Need IBM i 5.4 or later";
}
# Check for IBM i 6.1 or later
--disable_query_log
system uname -rv > $MYSQLTEST_VARDIR/tmp/version;
--disable_warnings
drop table if exists uname_vr;
--enable_warnings
create temporary table uname_vr (r int, v int);
--disable_warnings
eval LOAD DATA INFILE "$MYSQLTEST_VARDIR/tmp/version" into table uname_vr fields terminated by ' ';
--enable_warnings
let $ok = `select count(*) from uname_vr where v > 5`;
drop table uname_vr;
remove_file $MYSQLTEST_VARDIR/tmp/version;
--enable_query_log
if (!$ok)
{
skip "Need IBM i 6.1 or later";
}
if (!`SELECT count(*) FROM information_schema.engines WHERE
(support = 'YES' OR support = 'DEFAULT') AND
engine = 'ibmdb2i'`)
{
skip Need ibmdb2i engine;
}
create schema `A12345_@$#`;
create table `A12345_@$#`.t1 (i int) engine=ibmdb2i;
show create table `A12345_@$#`.t1;
Table Create Table
t1 CREATE TABLE `t1` (
`i` int(11) DEFAULT NULL
) ENGINE=IBMDB2I DEFAULT CHARSET=latin1
select * from `A12345_@$#`.t1;
i
drop table `A12345_@$#`.t1;
drop schema `A12345_@$#`;
create table t1 (c char(10) collate utf8_swedish_ci, index(c)) engine=ibmdb2i;
drop table t1;
create table t1 (c char(10) collate ucs2_swedish_ci, index(c)) engine=ibmdb2i;
drop table t1;
create table t1 (c char(1) character set armscii8) engine=ibmdb2i;
ERROR HY000: Can't create table 'test.t1' (errno: 2504)
create table t1 (c char(1) character set eucjpms ) engine=ibmdb2i;
ERROR HY000: Can't create table 'test.t1' (errno: 2504)
create table ABC (i int) engine=ibmdb2i;
drop table ABC;
create table `1234567890ABC` (i int) engine=ibmdb2i;
drop table `1234567890ABC`;
create table `!@#$%` (i int) engine=ibmdb2i;
drop table `!@#$%`;
create table `ABCD#########` (i int) engine=ibmdb2i;
drop table `ABCD#########`;
create table `_` (i int) engine=ibmdb2i;
drop table `_`;
create table `abc##def` (i int) engine=ibmdb2i;
drop table `abc##def`;
set names utf8;
create table İ (s1 int) engine=ibmdb2i;
drop table İ;
create table İİ (s1 int) engine=ibmdb2i;
drop table İİ;
set names latin1;
drop table if exists t1;
create table t1 (c char(10), index(c)) collate ucs2_czech_ci engine=ibmdb2i;
insert into t1 values ("ch"),("h"),("i");
select * from t1 order by c;
c
h
ch
i
drop table t1;
create table t1 (c char(10), index(c)) collate utf8_czech_ci engine=ibmdb2i;
insert into t1 values ("ch"),("h"),("i");
select * from t1 order by c;
c
h
ch
i
drop table t1;
create table t1 (c char(10), index(c)) collate ucs2_danish_ci engine=ibmdb2i;
insert into t1 values("abc"),("abcd"),("aaaa");
select c from t1 order by c;
c
abc
abcd
aaaa
drop table t1;
create table t1 (c char(10), index(c)) collate utf8_danish_ci engine=ibmdb2i;
insert into t1 values("abc"),("abcd"),("aaaa");
select c from t1 order by c;
c
abc
abcd
aaaa
drop table t1;
drop table if exists t1;
create table t1 (c char(10), index(c)) charset macce engine=ibmdb2i;
insert into t1 values ("test");
select * from t1 order by c;
c
test
drop table t1;
set ibmdb2i_create_index_option=1;
drop schema if exists test1;
create schema test1;
use test1;
CREATE TABLE t1 (f int primary key, index(f)) engine=ibmdb2i;
drop table t1;
CREATE TABLE t1 (f char(10) collate utf8_bin primary key, index(f)) engine=ibmdb2i;
drop table t1;
CREATE TABLE t1 (f char(10) collate latin1_swedish_ci primary key, index(f)) engine=ibmdb2i;
drop table t1;
CREATE TABLE t1 (f char(10) collate latin1_swedish_ci primary key, i int, index i(i,f)) engine=ibmdb2i;
drop table t1;
create table fd (SQSSEQ CHAR(10)) engine=ibmdb2i;
select * from fd;
SQSSEQ
*HEX
*HEX
*HEX
*HEX
drop table fd;
create table ABC (i int) engine=ibmdb2i;
insert into ABC values(1);
create table abc (i int) engine=ibmdb2i;
insert into abc values (2);
select * from ABC;
i
1
drop table ABC;
drop table abc;
This diff is collapsed.
source suite/ibmdb2i/include/have_ibmdb2i.inc;
source include/have_case_sensitive_file_system.inc;
create schema `A12345_@$#`;
create table `A12345_@$#`.t1 (i int) engine=ibmdb2i;
show create table `A12345_@$#`.t1;
select * from `A12345_@$#`.t1;
drop table `A12345_@$#`.t1;
drop schema `A12345_@$#`;
source suite/ibmdb2i/include/have_ibmdb2i.inc;
source suite/ibmdb2i/include/have_i61.inc;
create table t1 (c char(10) collate utf8_swedish_ci, index(c)) engine=ibmdb2i;
drop table t1;
create table t1 (c char(10) collate ucs2_swedish_ci, index(c)) engine=ibmdb2i;
drop table t1;
--source suite/ibmdb2i/include/have_ibmdb2i.inc
--source suite/ibmdb2i/include/have_i54.inc
--error 1005
create table t1 (c char(1) character set armscii8) engine=ibmdb2i;
--error 1005
create table t1 (c char(1) character set eucjpms ) engine=ibmdb2i;
source suite/ibmdb2i/include/have_ibmdb2i.inc;
# Test RCDFMT generation for a variety of kinds of table names
create table ABC (i int) engine=ibmdb2i;
drop table ABC;
create table `1234567890ABC` (i int) engine=ibmdb2i;
drop table `1234567890ABC`;
create table `!@#$%` (i int) engine=ibmdb2i;
drop table `!@#$%`;
create table `ABCD#########` (i int) engine=ibmdb2i;
drop table `ABCD#########`;
create table `_` (i int) engine=ibmdb2i;
drop table `_`;
create table `abc##def` (i int) engine=ibmdb2i;
drop table `abc##def`;
set names utf8;
create table İ (s1 int) engine=ibmdb2i;
drop table İ;
create table İİ (s1 int) engine=ibmdb2i;
drop table İİ;
set names latin1;
source suite/ibmdb2i/include/have_ibmdb2i.inc;
source suite/ibmdb2i/include/have_i61.inc;
--disable_warnings
drop table if exists t1;
--enable_warnings
create table t1 (c char(10), index(c)) collate ucs2_czech_ci engine=ibmdb2i;
insert into t1 values ("ch"),("h"),("i");
select * from t1 order by c;
drop table t1;
create table t1 (c char(10), index(c)) collate utf8_czech_ci engine=ibmdb2i;
insert into t1 values ("ch"),("h"),("i");
select * from t1 order by c;
drop table t1;
create table t1 (c char(10), index(c)) collate ucs2_danish_ci engine=ibmdb2i;
insert into t1 values("abc"),("abcd"),("aaaa");
select c from t1 order by c;
drop table t1;
create table t1 (c char(10), index(c)) collate utf8_danish_ci engine=ibmdb2i;
insert into t1 values("abc"),("abcd"),("aaaa");
select c from t1 order by c;
drop table t1;
source suite/ibmdb2i/include/have_ibmdb2i.inc;
source suite/ibmdb2i/include/have_i61.inc;
--disable_warnings
drop table if exists t1;
--enable_warnings
create table t1 (c char(10), index(c)) charset macce engine=ibmdb2i;
insert into t1 values ("test");
select * from t1 order by c;
drop table t1;
source suite/ibmdb2i/include/have_ibmdb2i.inc;
# Confirm that ibmdb2i_create_index_option causes additional *HEX sorted indexes to be created for all non-binary keys.
set ibmdb2i_create_index_option=1;
--disable_warnings
drop schema if exists test1;
create schema test1;
use test1;
--enable_warnings
--disable_abort_on_error
--error 0,255
exec system "DLTF QGPL/FDOUT" > /dev/null;
--enable_abort_on_error
#No additional index because no string fields in key
CREATE TABLE t1 (f int primary key, index(f)) engine=ibmdb2i;
--error 255
exec system "DSPFD FILE(\"test1\"/PRIM0001) TYPE(*SEQ) OUTPUT(*OUTFILE) OUTFILE(QGPL/FDOUT) OUTMBR(*FIRST *ADD)" > /dev/null;
--error 255
exec system "DSPFD FILE(\"test1\"/\"f___H_t1\") TYPE(*SEQ) OUTPUT(*OUTFILE) OUTFILE(QGPL/FDOUT) OUTMBR(*FIRST *ADD)" > /dev/null;
drop table t1;
#No additional index because binary sorting
CREATE TABLE t1 (f char(10) collate utf8_bin primary key, index(f)) engine=ibmdb2i;
--error 255
exec system "DSPFD FILE(\"test1\"/PRIM0001) TYPE(*SEQ) OUTPUT(*OUTFILE) OUTFILE(QGPL/FDOUT) OUTMBR(*FIRST *ADD)" > /dev/null;
--error 255
exec system "DSPFD FILE(\"test1\"/\"f___H_t1\") TYPE(*SEQ) OUTPUT(*OUTFILE) OUTFILE(QGPL/FDOUT) OUTMBR(*FIRST *ADD)" > /dev/null;
drop table t1;
CREATE TABLE t1 (f char(10) collate latin1_swedish_ci primary key, index(f)) engine=ibmdb2i;
exec system "DSPFD FILE(\"test1\"/PRIM0001) TYPE(*SEQ) OUTPUT(*OUTFILE) OUTFILE(QGPL/FDOUT) OUTMBR(*FIRST *ADD)" > /dev/null;
exec system "DSPFD FILE(\"test1\"/\"f___H_t1\") TYPE(*SEQ) OUTPUT(*OUTFILE) OUTFILE(QGPL/FDOUT) OUTMBR(*FIRST *ADD)" > /dev/null;
drop table t1;
CREATE TABLE t1 (f char(10) collate latin1_swedish_ci primary key, i int, index i(i,f)) engine=ibmdb2i;
exec system "DSPFD FILE(\"test1\"/PRIM0001) TYPE(*SEQ) OUTPUT(*OUTFILE) OUTFILE(QGPL/FDOUT) OUTMBR(*FIRST *ADD)" > /dev/null;
exec system "DSPFD FILE(\"test1\"/\"i___H_t1\") TYPE(*SEQ) OUTPUT(*OUTFILE) OUTFILE(QGPL/FDOUT) OUTMBR(*FIRST *ADD)" > /dev/null;
drop table t1;
create table fd (SQSSEQ CHAR(10)) engine=ibmdb2i;
system system "CPYF FROMFILE(QGPL/FDOUT) TOFILE(\"test1\"/\"fd\") mbropt(*replace) fmtopt(*drop *map)" > /dev/null;
select * from fd;
drop table fd;
source suite/ibmdb2i/include/have_ibmdb2i.inc;
source include/have_case_sensitive_file_system.inc;
create table ABC (i int) engine=ibmdb2i;
insert into ABC values(1);
create table abc (i int) engine=ibmdb2i;
insert into abc values (2);
select * from ABC;
drop table ABC;
drop table abc;
source suite/ibmdb2i/include/have_ibmdb2i.inc;
source suite/ibmdb2i/include/have_i61.inc;
--disable_warnings
drop table if exists t1, ffd, fd;
--enable_warnings
--disable_abort_on_error
--error 0,255
exec system "DLTF QGPL/FFDOUT" > /dev/null;
--error 0,255
exec system "DLTF QGPL/FDOUT" > /dev/null;
--enable_abort_on_error
let $count= query_get_value(select count(*) from information_schema.COLLATIONS where COLLATION_NAME <> "binary", count(*),1);
while ($count)
{
let $collation = query_get_value(select COLLATION_NAME from information_schema.COLLATIONS where COLLATION_NAME <> "binary" order by COLLATION_NAME desc, COLLATION_NAME, $count);
error 0,1005,2504,2028;
eval CREATE TABLE t1 ($collation integer, c char(10), v varchar(20), index(c), index(v)) collate $collation engine=ibmdb2i;
if (!$mysql_errno)
{
insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb");
insert into t1 select * from t1;
explain select c,v from t1 force index(c) where c like "ab%";
explain select c,v from t1 force index(v) where v like "de%";
drop table t1;
eval create table t1 ($collation char(10) primary key) collate $collation engine=ibmdb2i;
system system "DSPFFD FILE(\"test\"/\"t1\") OUTPUT(*OUTFILE) OUTFILE(QGPL/FFDOUT) OUTMBR(*FIRST *ADD)" > /dev/null;
system system "DSPFD FILE(\"test\"/\"t1\") TYPE(*SEQ) OUTPUT(*OUTFILE) OUTFILE(QGPL/FDOUT) OUTMBR(*FIRST *ADD)" > /dev/null;
drop table t1;
}
dec $count;
}
create table ffd (WHCHD1 CHAR(20), WHCSID decimal(5,0)) engine=ibmdb2i;
system system "CPYF FROMFILE(QGPL/FFDOUT) TOFILE(\"test\"/\"ffd\") mbropt(*replace) fmtopt(*drop *map)" > /dev/null;
create table fd (SQSSEQ CHAR(10)) engine=ibmdb2i;
system system "CPYF FROMFILE(QGPL/FDOUT) TOFILE(\"test\"/\"fd\") mbropt(*replace) fmtopt(*drop *map)" > /dev/null;
create temporary table intermed (row integer key auto_increment, cs char(30), ccsid integer);
insert into intermed (cs, ccsid) select * from ffd;
create temporary table intermed2 (row integer key auto_increment, srtseq char(10));
insert into intermed2 (srtseq) select * from fd;
select ccsid, cs, srtseq from intermed inner join intermed2 on intermed.row = intermed2.row;
drop table ffd, fd;
......@@ -17,12 +17,12 @@
RESET MASTER;
select count(*) > 0 from performance_schema.SETUP_INSTRUMENTS;
select count(*) > 0 from performance_schema.setup_instruments;
update performance_schema.SETUP_INSTRUMENTS set enabled='NO'
update performance_schema.setup_instruments set enabled='NO'
where name like "wait/synch/rwlock/%";
select count(*) > 0 from performance_schema.EVENTS_WAITS_CURRENT;
select count(*) > 0 from performance_schema.events_waits_current;
--disable_warnings
drop table if exists test.t1;
......@@ -33,16 +33,16 @@ 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;
select thread_id from performance_schema.events_waits_current;
insert into test.t2
select name from performance_schema.SETUP_INSTRUMENTS
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'
update performance_schema.setup_instruments set enabled='YES'
where name like "wait/synch/rwlock/%";
--source include/show_binlog_events.inc
......
......@@ -15,7 +15,7 @@
# Tests for PERFORMANCE_SCHEMA
update performance_schema.SETUP_INSTRUMENTS set enabled='YES';
update performance_schema.setup_instruments set enabled='YES';
disconnect con1;
disconnect con2;
......
......@@ -32,48 +32,48 @@ drop table if exists test.t1;
## drop table performance_schema.t1;
##
## --error ER_DBACCESS_DENIED_ERROR
## create table performance_schema.SETUP_INSTRUMENTS(a int);
## create table performance_schema.setup_instruments(a int);
##
## --error ER_DBACCESS_DENIED_ERROR
## create table performance_schema.EVENTS_WAITS_CURRENT(a int);
## create table performance_schema.events_waits_current(a int);
##
## --error ER_DBACCESS_DENIED_ERROR
## create table performance_schema.FILE_INSTANCES(a int);
## create table performance_schema.file_instances(a int);
##
## --error ER_DBACCESS_DENIED_ERROR
## drop table performance_schema.SETUP_INSTRUMENTS;
## drop table performance_schema.setup_instruments;
##
## --error ER_DBACCESS_DENIED_ERROR
## drop table performance_schema.EVENTS_WAITS_CURRENT;
## drop table performance_schema.events_waits_current;
##
## --error ER_DBACCESS_DENIED_ERROR
## drop table performance_schema.FILE_INSTANCES;
## drop table performance_schema.file_instances;
--error ER_DBACCESS_DENIED_ERROR
rename table performance_schema.SETUP_INSTRUMENTS to test.t1;
rename table performance_schema.setup_instruments to test.t1;
--error ER_DBACCESS_DENIED_ERROR
rename table performance_schema.EVENTS_WAITS_CURRENT to test.t1;
rename table performance_schema.events_waits_current to test.t1;
--error ER_DBACCESS_DENIED_ERROR
rename table performance_schema.FILE_INSTANCES to test.t1;
rename table performance_schema.file_instances to test.t1;
--error ER_DBACCESS_DENIED_ERROR
rename table performance_schema.SETUP_INSTRUMENTS to performance_schema.t1;
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;
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;
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;
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;
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;
......@@ -87,108 +87,93 @@ do begin end;
--error ER_DBACCESS_DENIED_ERROR
create trigger performance_schema.bi_setup_instruments
before insert on performance_schema.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
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
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;
create table test.t1 like performance_schema.setup_instruments;
--error ER_WRONG_PERFSCHEMA_USAGE
create table test.t1 like performance_schema.EVENTS_WAITS_CURRENT;
create table test.t1 like performance_schema.events_waits_current;
--error ER_WRONG_PERFSCHEMA_USAGE
create table test.t1 like performance_schema.FILE_INSTANCES;
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
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
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
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;
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;
delete from performance_schema.events_waits_current;
--replace_result '\'file_instances' '\'FILE_INSTANCES'
--error ER_TABLEACCESS_DENIED_ERROR
delete from performance_schema.FILE_INSTANCES;
delete from performance_schema.file_instances;
lock table performance_schema.SETUP_INSTRUMENTS read;
lock table performance_schema.setup_instruments read;
unlock tables;
lock table performance_schema.SETUP_INSTRUMENTS write;
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;
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;
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;
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;
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 # 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.)
--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;
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;
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;
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;
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;
SELECT "can select" FROM performance_schema.file_summary_by_instance LIMIT 1;
--enable_abort_on_error
......@@ -19,23 +19,23 @@ 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';
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.THREADS
let $con1_THREAD_ID=`select thread_id from performance_schema.threads
where PROCESSLIST_ID = connection_id()`;
connect (con2, localhost, root, , );
let $con2_THREAD_ID=`select thread_id from performance_schema.THREADS
let $con2_THREAD_ID=`select thread_id from performance_schema.threads
where PROCESSLIST_ID = connection_id()`;
connect (con3, localhost, root, , );
let $con3_THREAD_ID=`select thread_id from performance_schema.THREADS
let $con3_THREAD_ID=`select thread_id from performance_schema.threads
where PROCESSLIST_ID = connection_id()`;
connection default;
......@@ -45,10 +45,10 @@ 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
from performance_schema.events_waits_history_long
where thread_id=? order by event_id;";
prepare stmt_dump_thread from
"select name from performance_schema.THREADS where thread_id=? ;";
"select name from performance_schema.threads where thread_id=? ;";
--enable_query_log
......@@ -17,31 +17,31 @@
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;
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_INSTANCE;
select * from performance_schema.EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME;
select * from performance_schema.EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME;
select * from performance_schema.FILE_INSTANCES;
select * from performance_schema.FILE_SUMMARY_BY_EVENT_NAME;
select * from performance_schema.FILE_SUMMARY_BY_INSTANCE;
select * from performance_schema.MUTEX_INSTANCES;
select * from performance_schema.PERFORMANCE_TIMERS;
select * from performance_schema.RWLOCK_INSTANCES;
select * from performance_schema.SETUP_CONSUMERS;
select * from performance_schema.SETUP_INSTRUMENTS;
select * from performance_schema.SETUP_TIMERS;
select * from performance_schema.THREADS;
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_instance;
select * from performance_schema.events_waits_summary_by_thread_by_event_name;
select * from performance_schema.events_waits_summary_global_by_event_name;
select * from performance_schema.file_instances;
select * from performance_schema.file_summary_by_event_name;
select * from performance_schema.file_summary_by_instance;
select * from performance_schema.mutex_instances;
select * from performance_schema.performance_timers;
select * from performance_schema.rwlock_instances;
select * from performance_schema.setup_consumers;
select * from performance_schema.setup_instruments;
select * from performance_schema.setup_timers;
select * from performance_schema.threads;
--enable_result_log
# This has a stable output, printing the result:
......
"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_GLOBAL_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
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_global_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';
update performance_schema.SETUP_CONSUMERS set enabled = 'NO';
update performance_schema.setup_instruments SET enabled = 'NO';
update performance_schema.setup_consumers 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)
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)
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)
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)
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_GLOBAL_BY_EVENT_NAME AS e
JOIN performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE AS i USING (EVENT_NAME)
FROM performance_schema.events_waits_summary_global_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_GLOBAL_BY_EVENT_NAME AS e
JOIN performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE AS i USING (EVENT_NAME)
FROM performance_schema.events_waits_summary_global_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_GLOBAL_BY_EVENT_NAME AS e
JOIN performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE AS i USING (EVENT_NAME)
FROM performance_schema.events_waits_summary_global_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_GLOBAL_BY_EVENT_NAME AS e
JOIN performance_schema.EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME AS t
FROM performance_schema.events_waits_summary_global_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_GLOBAL_BY_EVENT_NAME AS e
JOIN performance_schema.EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME AS t
FROM performance_schema.events_waits_summary_global_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))
......@@ -89,14 +89,14 @@ 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_GLOBAL_BY_EVENT_NAME AS e
JOIN performance_schema.EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME AS t
FROM performance_schema.events_waits_summary_global_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
update performance_schema.setup_consumers set enabled = 'YES';
update performance_schema.setup_instruments
set enabled = 'YES', timed = 'YES';
drop table test.t1;
set binlog_format=mixed;
RESET MASTER;
select count(*) > 0 from performance_schema.SETUP_INSTRUMENTS;
select count(*) > 0 from performance_schema.setup_instruments;
count(*) > 0
1
update performance_schema.SETUP_INSTRUMENTS set enabled='NO'
update performance_schema.setup_instruments set enabled='NO'
where name like "wait/synch/rwlock/%";
select count(*) > 0 from performance_schema.EVENTS_WAITS_CURRENT;
select count(*) > 0 from performance_schema.events_waits_current;
count(*) > 0
1
drop table if exists test.t1;
......@@ -13,18 +13,18 @@ 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;
select thread_id from performance_schema.events_waits_current;
insert into test.t2
select name from performance_schema.SETUP_INSTRUMENTS
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'
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 # 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
......@@ -43,7 +43,7 @@ master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */
master-bin.000001 # Query # # use `test`; DROP TABLE `t2` /* generated by server */
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (performance_schema.SETUP_INSTRUMENTS)
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;
select count(*) > 0 from performance_schema.setup_instruments;
count(*) > 0
1
update performance_schema.SETUP_INSTRUMENTS set enabled='NO'
update performance_schema.setup_instruments set enabled='NO'
where name like "wait/synch/rwlock/%";
select count(*) > 0 from performance_schema.EVENTS_WAITS_CURRENT;
select count(*) > 0 from performance_schema.events_waits_current;
count(*) > 0
1
drop table if exists test.t1;
......@@ -13,18 +13,18 @@ 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;
select thread_id from performance_schema.events_waits_current;
insert into test.t2
select name from performance_schema.SETUP_INSTRUMENTS
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'
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 # 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
......@@ -43,7 +43,7 @@ master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */
master-bin.000001 # Query # # use `test`; DROP TABLE `t2` /* generated by server */
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (performance_schema.SETUP_INSTRUMENTS)
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;
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
RESET MASTER;
select count(*) > 0 from performance_schema.SETUP_INSTRUMENTS;
select count(*) > 0 from performance_schema.setup_instruments;
count(*) > 0
1
update performance_schema.SETUP_INSTRUMENTS set enabled='NO'
update performance_schema.setup_instruments set enabled='NO'
where name like "wait/synch/rwlock/%";
Warnings:
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves.
select count(*) > 0 from performance_schema.EVENTS_WAITS_CURRENT;
select count(*) > 0 from performance_schema.events_waits_current;
count(*) > 0
1
drop table if exists test.t1;
......@@ -16,24 +16,24 @@ 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;
select thread_id from performance_schema.events_waits_current;
Warnings:
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves.
insert into test.t2
select name from performance_schema.SETUP_INSTRUMENTS
select name from performance_schema.setup_instruments
where name like "wait/synch/rwlock/%";
Warnings:
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves.
drop table test.t1;
drop table test.t2;
update performance_schema.SETUP_INSTRUMENTS set enabled='YES'
update performance_schema.setup_instruments set enabled='YES'
where name like "wait/synch/rwlock/%";
Warnings:
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves.
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 # Query # # use `test`; update performance_schema.SETUP_INSTRUMENTS set enabled='NO'
master-bin.000001 # Query # # use `test`; update performance_schema.setup_instruments set enabled='NO'
where name like "wait/synch/rwlock/%"
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `t1` /* generated by server */
......@@ -42,16 +42,16 @@ master-bin.000001 # Query # # use `test`; create table test.t1 (thread_id intege
master-bin.000001 # Query # # use `test`; create table test.t2 (name varchar(128))
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; insert into test.t1
select thread_id from performance_schema.EVENTS_WAITS_CURRENT
select thread_id from performance_schema.events_waits_current
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; insert into test.t2
select name from performance_schema.SETUP_INSTRUMENTS
select name from performance_schema.setup_instruments
where name like "wait/synch/rwlock/%"
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */
master-bin.000001 # Query # # use `test`; DROP TABLE `t2` /* generated by server */
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; update performance_schema.SETUP_INSTRUMENTS set enabled='YES'
master-bin.000001 # Query # # use `test`; update performance_schema.setup_instruments set enabled='YES'
where name like "wait/synch/rwlock/%"
master-bin.000001 # Query # # COMMIT
checksum table performance_schema.COND_INSTANCES;
checksum table performance_schema.EVENTS_WAITS_CURRENT;
checksum table performance_schema.EVENTS_WAITS_HISTORY;
checksum table performance_schema.EVENTS_WAITS_HISTORY_LONG;
checksum table performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE;
checksum table performance_schema.EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME;
checksum table performance_schema.EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME;
checksum table performance_schema.FILE_INSTANCES;
checksum table performance_schema.FILE_SUMMARY_BY_EVENT_NAME;
checksum table performance_schema.FILE_SUMMARY_BY_INSTANCE;
checksum table performance_schema.MUTEX_INSTANCES;
checksum table performance_schema.PERFORMANCE_TIMERS;
checksum table performance_schema.RWLOCK_INSTANCES;
checksum table performance_schema.SETUP_CONSUMERS;
checksum table performance_schema.SETUP_INSTRUMENTS;
checksum table performance_schema.SETUP_TIMERS;
checksum table performance_schema.THREADS;
checksum table performance_schema.COND_INSTANCES extended;
checksum table performance_schema.EVENTS_WAITS_CURRENT extended;
checksum table performance_schema.EVENTS_WAITS_HISTORY extended;
checksum table performance_schema.EVENTS_WAITS_HISTORY_LONG extended;
checksum table performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE extended;
checksum table performance_schema.EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME extended;
checksum table performance_schema.EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME extended;
checksum table performance_schema.FILE_INSTANCES extended;
checksum table performance_schema.FILE_SUMMARY_BY_EVENT_NAME extended;
checksum table performance_schema.FILE_SUMMARY_BY_INSTANCE extended;
checksum table performance_schema.MUTEX_INSTANCES extended;
checksum table performance_schema.PERFORMANCE_TIMERS extended;
checksum table performance_schema.RWLOCK_INSTANCES extended;
checksum table performance_schema.SETUP_CONSUMERS extended;
checksum table performance_schema.SETUP_INSTRUMENTS extended;
checksum table performance_schema.SETUP_TIMERS extended;
checksum table performance_schema.THREADS extended;
checksum table performance_schema.cond_instances;
checksum table performance_schema.events_waits_current;
checksum table performance_schema.events_waits_history;
checksum table performance_schema.events_waits_history_long;
checksum table performance_schema.events_waits_summary_by_instance;
checksum table performance_schema.events_waits_summary_by_thread_by_event_name;
checksum table performance_schema.events_waits_summary_global_by_event_name;
checksum table performance_schema.file_instances;
checksum table performance_schema.file_summary_by_event_name;
checksum table performance_schema.file_summary_by_instance;
checksum table performance_schema.mutex_instances;
checksum table performance_schema.performance_timers;
checksum table performance_schema.rwlock_instances;
checksum table performance_schema.setup_consumers;
checksum table performance_schema.setup_instruments;
checksum table performance_schema.setup_timers;
checksum table performance_schema.threads;
checksum table performance_schema.cond_instances extended;
checksum table performance_schema.events_waits_current extended;
checksum table performance_schema.events_waits_history extended;
checksum table performance_schema.events_waits_history_long extended;
checksum table performance_schema.events_waits_summary_by_instance extended;
checksum table performance_schema.events_waits_summary_by_thread_by_event_name extended;
checksum table performance_schema.events_waits_summary_global_by_event_name extended;
checksum table performance_schema.file_instances extended;
checksum table performance_schema.file_summary_by_event_name extended;
checksum table performance_schema.file_summary_by_instance extended;
checksum table performance_schema.mutex_instances extended;
checksum table performance_schema.performance_timers extended;
checksum table performance_schema.rwlock_instances extended;
checksum table performance_schema.setup_consumers extended;
checksum table performance_schema.setup_instruments extended;
checksum table performance_schema.setup_timers extended;
checksum table performance_schema.threads extended;
......@@ -3,26 +3,26 @@ Grants for root@localhost
GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION
GRANT PROXY 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
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
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 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'
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';
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;
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;
truncate table performance_schema.cond_instances;
ERROR HY000: Invalid performance_schema usage.
ALTER TABLE performance_schema.COND_INSTANCES ADD INDEX test_index(NAME);
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);
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;
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);
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);
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;
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);
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);
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;
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);
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);
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_INSTANCE add column foo integer;
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);
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);
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
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);
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);
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.EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME
alter table performance_schema.events_waits_summary_global_by_event_name
add column foo integer;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
truncate table performance_schema.EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME;
ALTER TABLE performance_schema.EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME
truncate table performance_schema.events_waits_summary_global_by_event_name;
ALTER TABLE performance_schema.events_waits_summary_global_by_event_name
ADD INDEX test_index(EVENT_NAME);
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
CREATE UNIQUE INDEX test_index
ON performance_schema.EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME(EVENT_NAME);
ON performance_schema.events_waits_summary_global_by_event_name(EVENT_NAME);
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
alter table performance_schema.FILE_INSTANCES add column foo integer;
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;
truncate table performance_schema.file_instances;
ERROR HY000: Invalid performance_schema usage.
ALTER TABLE performance_schema.FILE_INSTANCES ADD INDEX test_index(FILE_NAME);
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);
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;
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);
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);
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;
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);
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);
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;
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;
truncate table performance_schema.mutex_instances;
ERROR HY000: Invalid performance_schema usage.
ALTER TABLE performance_schema.MUTEX_INSTANCES ADD INDEX test_index(NAME);
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);
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;
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;
truncate table performance_schema.performance_timers;
ERROR HY000: Invalid performance_schema usage.
ALTER TABLE performance_schema.PERFORMANCE_TIMERS ADD INDEX test_index(TIMER_NAME);
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);
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.RWLOCK_INSTANCES add column foo integer;
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;
truncate table performance_schema.rwlock_instances;
ERROR HY000: Invalid performance_schema usage.
ALTER TABLE performance_schema.RWLOCK_INSTANCES ADD INDEX test_index(NAME);
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);
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;
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;
truncate table performance_schema.setup_consumers;
ERROR HY000: Invalid performance_schema usage.
ALTER TABLE performance_schema.SETUP_CONSUMERS ADD INDEX test_index(NAME);
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);
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;
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;
truncate table performance_schema.setup_instruments;
ERROR HY000: Invalid performance_schema usage.
ALTER TABLE performance_schema.SETUP_INSTRUMENTS ADD INDEX test_index(NAME);
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);
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_TIMERS add column foo integer;
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;
truncate table performance_schema.setup_timers;
ERROR HY000: Invalid performance_schema usage.
ALTER TABLE performance_schema.SETUP_TIMERS ADD INDEX test_index(NAME);
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);
CREATE UNIQUE INDEX test_index ON performance_schema.setup_timers(NAME);
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
alter table performance_schema.THREADS add column foo integer;
alter table performance_schema.threads add column foo integer;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
truncate table performance_schema.THREADS;
truncate table performance_schema.threads;
ERROR HY000: Invalid performance_schema usage.
ALTER TABLE performance_schema.THREADS ADD INDEX test_index(ID);
ALTER TABLE performance_schema.threads 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.THREADS(ID);
CREATE UNIQUE INDEX test_index ON performance_schema.threads(ID);
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
select * from performance_schema.COND_INSTANCES limit 1;
select * from performance_schema.cond_instances limit 1;
NAME OBJECT_INSTANCE_BEGIN
# #
select * from performance_schema.COND_INSTANCES
select * from performance_schema.cond_instances
where name='FOO';
NAME OBJECT_INSTANCE_BEGIN
insert into performance_schema.COND_INSTANCES
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
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
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'
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'
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
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
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
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
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
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
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'
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'
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
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
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
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
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
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
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
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
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'
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'
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
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
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
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
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
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
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
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
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'
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'
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_INSTANCE
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
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
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
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
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
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
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
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
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
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'
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'
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
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
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
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
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
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
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'
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'
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.EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME
select * from performance_schema.events_waits_summary_global_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_GLOBAL_BY_EVENT_NAME
select * from performance_schema.events_waits_summary_global_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_GLOBAL_BY_EVENT_NAME
insert into performance_schema.events_waits_summary_global_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_GLOBAL_BY_EVENT_NAME'
update performance_schema.EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME
ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'events_waits_summary_global_by_event_name'
update performance_schema.events_waits_summary_global_by_event_name
set count_star=12;
ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME'
update performance_schema.EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME
ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_waits_summary_global_by_event_name'
update performance_schema.events_waits_summary_global_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_GLOBAL_BY_EVENT_NAME'
delete from performance_schema.EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME
ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_waits_summary_global_by_event_name'
delete from performance_schema.events_waits_summary_global_by_event_name
where count_star=1;
ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME'
delete from performance_schema.EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME;
ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME'
LOCK TABLES performance_schema.EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME READ;
ERROR 42000: SELECT,LOCK TABL command denied to user 'root'@'localhost' for table 'EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME'
ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_waits_summary_global_by_event_name'
delete from performance_schema.events_waits_summary_global_by_event_name;
ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_waits_summary_global_by_event_name'
LOCK TABLES performance_schema.events_waits_summary_global_by_event_name READ;
ERROR 42000: SELECT,LOCK TABL command denied to user 'root'@'localhost' for table 'events_waits_summary_global_by_event_name'
UNLOCK TABLES;
LOCK TABLES performance_schema.EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME WRITE;
ERROR 42000: SELECT,LOCK TABL command denied to user 'root'@'localhost' for table 'EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME'
LOCK TABLES performance_schema.events_waits_summary_global_by_event_name WRITE;
ERROR 42000: SELECT,LOCK TABL command denied to user 'root'@'localhost' for table 'events_waits_summary_global_by_event_name'
UNLOCK TABLES;
select * from performance_schema.FILE_INSTANCES limit 1;
select * from performance_schema.file_instances limit 1;
FILE_NAME EVENT_NAME OPEN_COUNT
# # #
select * from performance_schema.FILE_INSTANCES
select * from performance_schema.file_instances
where file_name='FOO';
FILE_NAME EVENT_NAME OPEN_COUNT
insert into performance_schema.FILE_INSTANCES
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
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
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'
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'
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
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
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
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
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
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
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'
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'
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
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
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
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
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
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
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'
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'
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;
select * from performance_schema.mutex_instances limit 1;
NAME OBJECT_INSTANCE_BEGIN LOCKED_BY_THREAD_ID
# # #
select * from performance_schema.MUTEX_INSTANCES
select * from performance_schema.mutex_instances
where name='FOO';
NAME OBJECT_INSTANCE_BEGIN LOCKED_BY_THREAD_ID
insert into performance_schema.MUTEX_INSTANCES
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
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
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'
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'
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;
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
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
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
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
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'
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'
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.RWLOCK_INSTANCES limit 1;
select * from performance_schema.rwlock_instances limit 1;
NAME OBJECT_INSTANCE_BEGIN WRITE_LOCKED_BY_THREAD_ID READ_LOCKED_BY_COUNT
# # # #
select * from performance_schema.RWLOCK_INSTANCES
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
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
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
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'
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'
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;
select * from performance_schema.setup_consumers;
NAME ENABLED
events_waits_current YES
events_waits_history YES
......@@ -8,11 +8,11 @@ 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
select * from performance_schema.setup_consumers
where name='events_waits_current';
NAME ENABLED
events_waits_current YES
select * from performance_schema.SETUP_CONSUMERS
select * from performance_schema.setup_consumers
where enabled='YES';
NAME ENABLED
events_waits_current YES
......@@ -23,23 +23,23 @@ 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
select * from performance_schema.setup_consumers
where enabled='NO';
NAME ENABLED
insert into performance_schema.SETUP_CONSUMERS
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
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
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
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;
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;
LOCK TABLES performance_schema.setup_consumers WRITE;
UNLOCK TABLES;
select * from performance_schema.SETUP_INSTRUMENTS;
select * from performance_schema.SETUP_INSTRUMENTS
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;
......@@ -14,7 +14,7 @@ wait/synch/mutex/sql/LOCK_audit_mask 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
select * from performance_schema.SETUP_INSTRUMENTS
select * from performance_schema.setup_instruments
where name like 'Wait/Synch/Rwlock/sql/%'
and name not in ('wait/synch/rwlock/sql/CRYPTO_dynlock_value::lock')
order by name limit 10;
......@@ -29,7 +29,7 @@ wait/synch/rwlock/sql/MDL_context::LOCK_waiting_for YES YES
wait/synch/rwlock/sql/MDL_lock::rwlock YES YES
wait/synch/rwlock/sql/Query_cache_query::lock YES YES
wait/synch/rwlock/sql/THR_LOCK_servers YES YES
select * from performance_schema.SETUP_INSTRUMENTS
select * from performance_schema.setup_instruments
where name like 'Wait/Synch/Cond/sql/%'
and name not in (
'wait/synch/cond/sql/COND_handler_count',
......@@ -46,29 +46,29 @@ 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
wait/synch/cond/sql/Delayed_insert::cond_client YES YES
select * from performance_schema.SETUP_INSTRUMENTS
select * from performance_schema.setup_instruments
where name='Wait';
select * from performance_schema.SETUP_INSTRUMENTS
select * from performance_schema.setup_instruments
where enabled='YES';
insert into performance_schema.SETUP_INSTRUMENTS
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
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
update performance_schema.setup_instruments
set enabled='NO';
update performance_schema.SETUP_INSTRUMENTS
update performance_schema.setup_instruments
set timed='NO';
select * from performance_schema.SETUP_INSTRUMENTS;
update performance_schema.SETUP_INSTRUMENTS
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
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;
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;
LOCK TABLES performance_schema.setup_instruments WRITE;
UNLOCK TABLES;
select * from performance_schema.SETUP_TIMERS;
select * from performance_schema.setup_timers;
NAME TIMER_NAME
wait CYCLE
select * from performance_schema.SETUP_TIMERS
select * from performance_schema.setup_timers
where name='Wait';
NAME TIMER_NAME
wait CYCLE
select * from performance_schema.SETUP_TIMERS
select * from performance_schema.setup_timers
where timer_name='CYCLE';
NAME TIMER_NAME
wait CYCLE
insert into performance_schema.SETUP_TIMERS
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
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
update performance_schema.setup_timers
set timer_name='MILLISECOND';
select * from performance_schema.SETUP_TIMERS;
select * from performance_schema.setup_timers;
NAME TIMER_NAME
wait MILLISECOND
update performance_schema.SETUP_TIMERS
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
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;
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;
LOCK TABLES performance_schema.setup_timers WRITE;
UNLOCK TABLES;
select * from performance_schema.THREADS
select * from performance_schema.threads
where name like 'Thread/%' limit 1;
THREAD_ID PROCESSLIST_ID NAME
# # #
select * from performance_schema.THREADS
select * from performance_schema.threads
where name='FOO';
THREAD_ID PROCESSLIST_ID NAME
insert into performance_schema.THREADS
insert into performance_schema.threads
set name='FOO', thread_id=1, processlist_id=2;
ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'THREADS'
update performance_schema.THREADS
ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'threads'
update performance_schema.threads
set thread_id=12;
ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'THREADS'
update performance_schema.THREADS
ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'threads'
update performance_schema.threads
set thread_id=12 where name like "FOO";
ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'THREADS'
delete from performance_schema.THREADS
ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'threads'
delete from performance_schema.threads
where id=1;
ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'THREADS'
delete from performance_schema.THREADS;
ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'THREADS'
LOCK TABLES performance_schema.THREADS READ;
ERROR 42000: SELECT,LOCK TABL command denied to user 'root'@'localhost' for table 'THREADS'
ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'threads'
delete from performance_schema.threads;
ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'threads'
LOCK TABLES performance_schema.threads READ;
ERROR 42000: SELECT,LOCK TABL command denied to user 'root'@'localhost' for table 'threads'
UNLOCK TABLES;
LOCK TABLES performance_schema.THREADS WRITE;
ERROR 42000: SELECT,LOCK TABL command denied to user 'root'@'localhost' for table 'THREADS'
LOCK TABLES performance_schema.threads WRITE;
ERROR 42000: SELECT,LOCK TABL command denied to user 'root'@'localhost' for table 'threads'
UNLOCK TABLES;
UPDATE performance_schema.SETUP_INSTRUMENTS SET enabled = 'NO', timed = 'YES';
UPDATE performance_schema.SETUP_INSTRUMENTS SET enabled = 'YES'
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;
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
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;
......@@ -24,15 +24,15 @@ id b
2 initial value
3 initial value
SET @after_count = (SELECT SUM(TIMER_WAIT)
FROM performance_schema.EVENTS_WAITS_HISTORY_LONG
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';
UPDATE performance_schema.setup_instruments SET enabled='NO';
SET @before_count = (SELECT SUM(TIMER_WAIT)
FROM performance_schema.EVENTS_WAITS_HISTORY_LONG
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;
......@@ -43,40 +43,40 @@ id b
4 initial value
5 initial value
SET @after_count = (SELECT SUM(TIMER_WAIT)
FROM performance_schema.EVENTS_WAITS_HISTORY_LONG
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'
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;
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
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
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
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';
UPDATE performance_schema.setup_instruments SET timed = 'YES';
SELECT * FROM t1 WHERE id < 4;
id b
1 initial value
......@@ -87,16 +87,16 @@ 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
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_GLOBAL_BY_EVENT_NAME
FROM performance_schema.events_waits_summary_global_by_event_name
WHERE COUNT_STAR > 0
ORDER BY SUM_TIMER_WAIT DESC
LIMIT 10;
SELECT h.EVENT_NAME, SUM(h.TIMER_WAIT) TOTAL_WAIT
FROM performance_schema.EVENTS_WAITS_HISTORY_LONG h
INNER JOIN performance_schema.THREADS p USING (THREAD_ID)
FROM performance_schema.events_waits_history_long h
INNER JOIN performance_schema.threads p USING (THREAD_ID)
WHERE p.PROCESSLIST_ID = 1
GROUP BY h.EVENT_NAME
HAVING TOTAL_WAIT > 0;
UPDATE performance_schema.SETUP_INSTRUMENTS SET enabled = 'NO', timed = 'YES';
UPDATE performance_schema.SETUP_INSTRUMENTS SET enabled = 'YES'
UPDATE performance_schema.setup_instruments SET enabled = 'NO', timed = 'YES';
UPDATE performance_schema.setup_instruments SET enabled = 'YES'
WHERE name LIKE 'wait/synch/mutex/%'
OR name LIKE 'wait/synch/rwlock/%';
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;
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
FROM performance_schema.events_waits_history_long
WHERE (EVENT_NAME = 'wait/synch/mutex/sql/LOCK_open'));
SELECT * FROM t1;
id b
......@@ -26,21 +26,21 @@ id b
7 initial value
8 initial value
SET @after_count = (SELECT SUM(TIMER_WAIT)
FROM performance_schema.EVENTS_WAITS_HISTORY_LONG
FROM performance_schema.events_waits_history_long
WHERE (EVENT_NAME = 'wait/synch/mutex/sql/LOCK_open'));
SELECT IF((@after_count - @before_count) > 0, 'Success', 'Failure') test_fm1_timed;
test_fm1_timed
Success
UPDATE performance_schema.SETUP_INSTRUMENTS SET enabled = 'NO'
UPDATE performance_schema.setup_instruments SET enabled = 'NO'
WHERE NAME = 'wait/synch/mutex/sql/LOCK_open';
TRUNCATE TABLE performance_schema.EVENTS_WAITS_HISTORY_LONG;
TRUNCATE TABLE performance_schema.EVENTS_WAITS_HISTORY;
TRUNCATE TABLE performance_schema.EVENTS_WAITS_CURRENT;
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
FROM performance_schema.events_waits_history_long
WHERE (EVENT_NAME = 'wait/synch/mutex/sql/LOCK_open'));
SELECT * FROM t1;
id b
......@@ -53,19 +53,19 @@ id b
7 initial value
8 initial value
SET @after_count = (SELECT SUM(TIMER_WAIT)
FROM performance_schema.EVENTS_WAITS_HISTORY_LONG
FROM performance_schema.events_waits_history_long
WHERE (EVENT_NAME = 'wait/synch/mutex/sql/LOCK_open'));
SELECT IF((COALESCE(@after_count, 0) - COALESCE(@before_count, 0)) = 0, 'Success', 'Failure') test_fm2_timed;
test_fm2_timed
Success
TRUNCATE TABLE performance_schema.EVENTS_WAITS_HISTORY_LONG;
TRUNCATE TABLE performance_schema.EVENTS_WAITS_HISTORY;
TRUNCATE TABLE performance_schema.EVENTS_WAITS_CURRENT;
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
FROM performance_schema.events_waits_history_long
WHERE (EVENT_NAME = 'wait/synch/rwlock/sql/LOCK_grant'));
SELECT * FROM t1;
id b
......@@ -78,21 +78,21 @@ id b
7 initial value
8 initial value
SET @after_count = (SELECT SUM(TIMER_WAIT)
FROM performance_schema.EVENTS_WAITS_HISTORY_LONG
FROM performance_schema.events_waits_history_long
WHERE (EVENT_NAME = 'wait/synch/rwlock/sql/LOCK_grant'));
SELECT IF((@after_count - @before_count) > 0, 'Success', 'Failure') test_fm1_rw_timed;
test_fm1_rw_timed
Success
UPDATE performance_schema.SETUP_INSTRUMENTS SET enabled = 'NO'
UPDATE performance_schema.setup_instruments SET enabled = 'NO'
WHERE NAME = 'wait/synch/rwlock/sql/LOCK_grant';
TRUNCATE TABLE performance_schema.EVENTS_WAITS_HISTORY_LONG;
TRUNCATE TABLE performance_schema.EVENTS_WAITS_HISTORY;
TRUNCATE TABLE performance_schema.EVENTS_WAITS_CURRENT;
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
FROM performance_schema.events_waits_history_long
WHERE (EVENT_NAME = 'wait/synch/rwlock/sql/LOCK_grant'));
SELECT * FROM t1;
id b
......@@ -105,7 +105,7 @@ id b
7 initial value
8 initial value
SET @after_count = (SELECT SUM(TIMER_WAIT)
FROM performance_schema.EVENTS_WAITS_HISTORY_LONG
FROM performance_schema.events_waits_history_long
WHERE (EVENT_NAME = 'wait/synch/rwlock/sql/LOCK_grant'));
SELECT IF((COALESCE(@after_count, 0) - COALESCE(@before_count, 0)) = 0, 'Success', 'Failure') test_fm2_rw_timed;
test_fm2_rw_timed
......
......@@ -2,31 +2,31 @@ 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;
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';
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;
lock tables performance_schema.setup_instruments read;
select * from performance_schema.setup_instruments;
unlock tables;
lock tables performance_schema.SETUP_INSTRUMENTS write;
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
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';
update performance_schema.setup_instruments set enabled='NO';
update performance_schema.setup_instruments set enabled='YES';
unlock tables;
connection default;
drop user pfsuser@localhost;
......
SELECT EVENT_ID FROM performance_schema.EVENTS_WAITS_CURRENT
SELECT EVENT_ID FROM performance_schema.events_waits_current
WHERE THREAD_ID IN
(SELECT THREAD_ID FROM performance_schema.THREADS)
(SELECT THREAD_ID FROM performance_schema.threads)
AND EVENT_NAME IN
(SELECT NAME FROM performance_schema.SETUP_INSTRUMENTS
(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;
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'
......@@ -22,7 +22,7 @@ a b
1 3
2 4
drop table test.ghost;
select * from performance_schema.FILE_INSTANCES
select * from performance_schema.file_instances
where file_name like "%ghost%";
FILE_NAME EVENT_NAME OPEN_COUNT
select * from performance_schema.no_such_table;
......
update performance_schema.SETUP_INSTRUMENTS set enabled='NO';
update performance_schema.SETUP_INSTRUMENTS set enabled='YES'
update performance_schema.setup_instruments set enabled='NO';
update performance_schema.setup_instruments set enabled='YES'
where name like "wait/io/file/myisam/%";
update performance_schema.SETUP_CONSUMERS
update performance_schema.setup_consumers
set enabled='YES';
truncate table performance_schema.EVENTS_WAITS_HISTORY_LONG;
truncate table performance_schema.events_waits_history_long;
flush status;
drop table if exists test.no_index_tab;
create table test.no_index_tab ( a varchar(255), b int ) engine=myisam;
......@@ -14,7 +14,7 @@ select event_name,
left(source, locate(":", source)) as short_source,
operation, number_of_bytes,
substring(object_name, locate("no_index_tab", object_name)) as short_name
from performance_schema.EVENTS_WAITS_HISTORY_LONG
from performance_schema.events_waits_history_long
where operation not like "tell"
order by thread_id, event_id;
event_name short_source operation number_of_bytes short_name
......@@ -56,5 +56,5 @@ Performance_schema_table_handles_lost 0
Performance_schema_table_instances_lost 0
Performance_schema_thread_classes_lost 0
Performance_schema_thread_instances_lost 0
update performance_schema.SETUP_INSTRUMENTS set enabled='YES';
update performance_schema.setup_instruments set enabled='YES';
drop table test.no_index_tab;
update performance_schema.SETUP_INSTRUMENTS set enabled='NO';
update performance_schema.SETUP_CONSUMERS set enabled='YES';
update performance_schema.SETUP_INSTRUMENTS set enabled='YES'
update performance_schema.setup_instruments set enabled='NO';
update performance_schema.setup_consumers set enabled='YES';
update performance_schema.setup_instruments set enabled='YES'
where name like "wait/synch/mutex/mysys/THR_LOCK_myisam";
drop table if exists test.t1;
truncate table performance_schema.EVENTS_WAITS_CURRENT;
truncate table performance_schema.EVENTS_WAITS_HISTORY;
truncate table performance_schema.EVENTS_WAITS_HISTORY_LONG;
truncate table performance_schema.events_waits_current;
truncate table performance_schema.events_waits_history;
truncate table performance_schema.events_waits_history_long;
show variables like "thread_handling";
Variable_name Value
thread_handling no-threads
......@@ -17,27 +17,27 @@ show variables like "performance_schema_max_thread%";
Variable_name Value
performance_schema_max_thread_classes 50
performance_schema_max_thread_instances 10
select count(*) from performance_schema.THREADS
select count(*) from performance_schema.threads
where name like "thread/sql/main";
count(*)
1
select count(*) from performance_schema.THREADS
select count(*) from performance_schema.threads
where name like "thread/sql/OneConnection";
count(*)
0
select event_name, operation,
left(source, locate(":", source)) as short_source
from performance_schema.EVENTS_WAITS_CURRENT;
from performance_schema.events_waits_current;
event_name operation short_source
wait/synch/mutex/mysys/THR_LOCK_myisam lock mi_create.c:
select event_name, operation,
left(source, locate(":", source)) as short_source
from performance_schema.EVENTS_WAITS_HISTORY;
from performance_schema.events_waits_history;
event_name operation short_source
wait/synch/mutex/mysys/THR_LOCK_myisam lock mi_create.c:
select event_name, operation,
left(source, locate(":", source)) as short_source
from performance_schema.EVENTS_WAITS_HISTORY_LONG;
from performance_schema.events_waits_history_long;
event_name operation short_source
wait/synch/mutex/mysys/THR_LOCK_myisam lock mi_create.c:
drop table test.t1;
update performance_schema.SETUP_INSTRUMENTS set enabled='YES'
update performance_schema.setup_instruments set enabled='YES'
where name like "wait/synch/mutex/mysys/THR_LOCK_myisam";
drop table if exists test.t1;
drop table if exists test.t2;
drop table if exists test.t3;
truncate table performance_schema.EVENTS_WAITS_HISTORY_LONG;
truncate table performance_schema.events_waits_history_long;
show variables like "thread_handling";
Variable_name Value
thread_handling one-thread-per-connection
......@@ -35,4 +35,4 @@ thread/sql/one_connection
drop table test.t1;
drop table test.t2;
drop table test.t3;
update performance_schema.SETUP_INSTRUMENTS set enabled='YES';
update performance_schema.setup_instruments set enabled='YES';
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