mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
P_S 5.7.28
This commit is contained in:
@@ -43,10 +43,13 @@ insert into t2 select concat('dml_', table_name, '.test') from information_schem
|
||||
update t2 set test_name= replace(test_name, "events_waits_summary_", "ews_");
|
||||
update t2 set test_name= replace(test_name, "events_stages_summary_", "esgs_");
|
||||
update t2 set test_name= replace(test_name, "events_statements_summary_", "esms_");
|
||||
update t2 set test_name= replace(test_name, "events_transactions_summary_", "ets_");
|
||||
update t2 set test_name= replace(test_name, "file_summary_", "fs_");
|
||||
update t2 set test_name= replace(test_name, "objects_summary_", "os_");
|
||||
update t2 set test_name= replace(test_name, "table_io_waits_summary_", "tiws_");
|
||||
update t2 set test_name= replace(test_name, "table_lock_waits_summary_", "tlws_");
|
||||
update t2 set test_name= replace(test_name, "memory_summary_", "mems_");
|
||||
update t2 set test_name= replace(test_name, "user_variables_", "uvar_");
|
||||
|
||||
# Debug
|
||||
# select test_name as 'FOUND' from t1;
|
||||
|
||||
144
mysql-test/suite/perfschema/t/alter_table_progress.test
Normal file
144
mysql-test/suite/perfschema/t/alter_table_progress.test
Normal file
@@ -0,0 +1,144 @@
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
--source include/have_debug.inc
|
||||
--source include/have_debug_sync.inc
|
||||
|
||||
# Presence of the query cache changes query stages,
|
||||
# causing noise in the test output
|
||||
--source include/have_query_cache_disabled.inc
|
||||
|
||||
# Setup
|
||||
|
||||
connect (con1, localhost, root, , );
|
||||
|
||||
let $con1_THREAD_ID=`select thread_id from performance_schema.threads
|
||||
where PROCESSLIST_ID = connection_id()`;
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists t1;
|
||||
--enable_warnings
|
||||
|
||||
create table t1(a int) engine = myisam;
|
||||
|
||||
insert into t1 values (1), (2), (3), (4), (5);
|
||||
|
||||
--connection default
|
||||
|
||||
update performance_schema.threads
|
||||
set instrumented = 'NO'
|
||||
where processlist_id = connection_id();
|
||||
|
||||
truncate table performance_schema.events_statements_history_long;
|
||||
truncate table performance_schema.events_stages_history_long;
|
||||
|
||||
--disable_query_log
|
||||
eval select $con1_THREAD_ID into @con1_thread_id;
|
||||
--enable_query_log
|
||||
|
||||
--connection con1
|
||||
|
||||
# ALTER TABLE statement to inspect,
|
||||
# execution should instrument progress
|
||||
|
||||
SET DEBUG_SYNC='RESET';
|
||||
SET DEBUG_SYNC='copy_data_between_tables_before SIGNAL found_row WAIT_FOR wait_row EXECUTE 5';
|
||||
--send ALTER TABLE t1 engine = innodb;
|
||||
|
||||
--connection default
|
||||
|
||||
SET DEBUG_SYNC='now WAIT_FOR found_row';
|
||||
|
||||
# Find the statement id of the ALTER TABLE
|
||||
select event_id from performance_schema.events_statements_current
|
||||
where thread_id = @con1_thread_id into @con1_stmt_id;
|
||||
|
||||
# completed 0
|
||||
select EVENT_NAME, WORK_COMPLETED, WORK_ESTIMATED
|
||||
from performance_schema.events_stages_current
|
||||
where (thread_id = @con1_thread_id);
|
||||
|
||||
SET DEBUG_SYNC='now SIGNAL wait_row';
|
||||
|
||||
#======
|
||||
|
||||
SET DEBUG_SYNC='now WAIT_FOR found_row';
|
||||
|
||||
# completed 1
|
||||
select EVENT_NAME, WORK_COMPLETED, WORK_ESTIMATED
|
||||
from performance_schema.events_stages_current
|
||||
where (thread_id = @con1_thread_id);
|
||||
|
||||
SET DEBUG_SYNC='now SIGNAL wait_row';
|
||||
|
||||
#======
|
||||
|
||||
SET DEBUG_SYNC='now WAIT_FOR found_row';
|
||||
|
||||
# completed 2
|
||||
select EVENT_NAME, WORK_COMPLETED, WORK_ESTIMATED
|
||||
from performance_schema.events_stages_current
|
||||
where (thread_id = @con1_thread_id);
|
||||
|
||||
SET DEBUG_SYNC='now SIGNAL wait_row';
|
||||
|
||||
#======
|
||||
|
||||
SET DEBUG_SYNC='now WAIT_FOR found_row';
|
||||
|
||||
# completed 3
|
||||
select EVENT_NAME, WORK_COMPLETED, WORK_ESTIMATED
|
||||
from performance_schema.events_stages_current
|
||||
where (thread_id = @con1_thread_id);
|
||||
|
||||
SET DEBUG_SYNC='now SIGNAL wait_row';
|
||||
|
||||
#======
|
||||
|
||||
SET DEBUG_SYNC='now WAIT_FOR found_row';
|
||||
|
||||
# completed 4
|
||||
select EVENT_NAME, WORK_COMPLETED, WORK_ESTIMATED
|
||||
from performance_schema.events_stages_current
|
||||
where (thread_id = @con1_thread_id);
|
||||
|
||||
SET DEBUG_SYNC='now SIGNAL wait_row';
|
||||
|
||||
#======
|
||||
|
||||
--connection con1
|
||||
|
||||
# Complete the ALTER TABLE statement.
|
||||
--reap
|
||||
|
||||
# Make sure the ALTER TABLE cleanup is executed,
|
||||
# as the last stages are after writing back to the client,
|
||||
# and done asynchronously from the last 'reap'.
|
||||
select "After payload";
|
||||
|
||||
--connection default
|
||||
|
||||
--echo Dumping ALTER TABLE stages
|
||||
|
||||
# Print all stages for this ALTER TABLE statement
|
||||
select EVENT_NAME, WORK_COMPLETED, WORK_ESTIMATED
|
||||
from performance_schema.events_stages_history_long
|
||||
where (thread_id = @con1_thread_id)
|
||||
and (nesting_event_id = @con1_stmt_id)
|
||||
order by thread_id, event_id;
|
||||
|
||||
SET DEBUG_SYNC='RESET';
|
||||
|
||||
--connection con1
|
||||
|
||||
drop table t1;
|
||||
|
||||
--disconnect con1
|
||||
|
||||
--connection default
|
||||
|
||||
update performance_schema.threads
|
||||
set instrumented = 'YES'
|
||||
where processlist_id = connection_id();
|
||||
|
||||
74
mysql-test/suite/perfschema/t/bad_option.test
Normal file
74
mysql-test/suite/perfschema/t/bad_option.test
Normal file
@@ -0,0 +1,74 @@
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
# Check error handling for invalid server start options and values
|
||||
|
||||
# The current test unites and replaces all suite/perfschema/t/bad_option_*.test
|
||||
# which were developed by Marc.
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
let $error_log= $MYSQLTEST_VARDIR/log/my_restart.err;
|
||||
--error 0,1
|
||||
--remove_file $error_log
|
||||
let SEARCH_FILE= $error_log;
|
||||
# Stop the server
|
||||
let $restart_file= $MYSQLTEST_VARDIR/tmp/mysqld.1.expect;
|
||||
--exec echo "wait" > $restart_file
|
||||
--shutdown_server
|
||||
--source include/wait_until_disconnected.inc
|
||||
--error 1
|
||||
--exec $MYSQLD_CMD --loose-console --performance-schema-enabled=maybe > $error_log 2>&1
|
||||
# The server restart aborts
|
||||
# [ERROR] unknown variable 'performance-schema-enabled=maybe'
|
||||
let SEARCH_PATTERN= \[ERROR\] unknown variable 'performance-schema-enabled=maybe';
|
||||
--source include/search_pattern_in_file.inc
|
||||
--echo # Server start with invalid startup option value 'performance-schema-enabled=maybe' : pass
|
||||
|
||||
--remove_file $error_log
|
||||
--error 1
|
||||
--exec $MYSQLD_CMD --loose-console --performance-schema-max_=12 > $error_log 2>&1
|
||||
# The server restart aborts
|
||||
# [ERROR] unknown variable 'performance-schema-max_=12'
|
||||
let SEARCH_PATTERN= \[ERROR\] unknown variable 'performance-schema-max_=12';
|
||||
--source include/search_pattern_in_file.inc
|
||||
--echo # Server start with ambigous startup option 'performance-schema-max_=12' : pass
|
||||
# The important points is here:
|
||||
# 1. There is no option 'performance-schema-max_' or 'performance-schema-max-' at all.
|
||||
# 2. But we have many options where the name starts exact with this pattern.
|
||||
# 3. There is a value assigned.
|
||||
# 4. The server criticizes "variable" and not "option"!
|
||||
# This seems to be caused by 3. because "--performance-schema-unknown=ON" gets
|
||||
# a similar reaction.
|
||||
|
||||
--remove_file $error_log
|
||||
--error 1
|
||||
--exec $MYSQLD_CMD --loose-console --performance-schema-unknown_99 > $error_log 2>&1
|
||||
# The server restart aborts
|
||||
let SEARCH_PATTERN= \[ERROR\] unknown option '--performance-schema-unknown_99';
|
||||
--source include/search_pattern_in_file.inc
|
||||
--echo # Server start with invalid startup option '--performance-schema-unknown_99' : pass
|
||||
|
||||
--remove_file $error_log
|
||||
--error 1
|
||||
--exec $MYSQLD_CMD --loose-console --datadir=bad_option_h_param > $error_log 2>&1
|
||||
# The server restart aborts
|
||||
# [ERROR] failed to set datadir to /work/repo1/mysql-trunk2/bad_option_h_param/
|
||||
let SEARCH_PATTERN= \[ERROR\] failed to set datadir to .*bad_option_h_param;
|
||||
--source include/search_pattern_in_file.inc
|
||||
--echo # Server start with invalid startup option value '--datadir=bad_option_h_param' : pass
|
||||
# The important point is here:
|
||||
# There is no directory "bad_option_h_param".
|
||||
|
||||
--remove_file $error_log
|
||||
# Write file to make mysql-test-run.pl start up the server again
|
||||
--exec echo "restart" > $restart_file
|
||||
|
||||
# Turn on reconnect
|
||||
--enable_reconnect
|
||||
|
||||
# Call script that will poll the server waiting for it to be back online again
|
||||
--source include/wait_until_connected_again.inc
|
||||
|
||||
# Turn off reconnect again
|
||||
--disable_reconnect
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
# Check error handling for invalid server start options
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
--source include/kill_mysqld.inc
|
||||
|
||||
let $outfile= $MYSQLTEST_VARDIR/tmp/bad_option_1.txt;
|
||||
--disable_warnings
|
||||
--error 0,1
|
||||
--remove_file $outfile
|
||||
--enable_warnings
|
||||
--error 7
|
||||
--exec $MYSQLD_BOOTSTRAP_CMD --loose-console --performance-schema-enabled=maybe > $outfile 2>&1
|
||||
|
||||
perl;
|
||||
use strict;
|
||||
use warnings;
|
||||
my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/bad_option_1.txt";
|
||||
open(FILE, "<", $fname) or die;
|
||||
my @lines= <FILE>;
|
||||
# those must be in the file for the test to pass
|
||||
my @patterns=
|
||||
("unknown variable 'performance-schema-enabled=maybe'",
|
||||
"Aborting");
|
||||
foreach my $one_line (@lines)
|
||||
{
|
||||
foreach my $one_pattern (@patterns)
|
||||
{
|
||||
# print pattern, not line, to get a stable output
|
||||
print "Found: $one_pattern\n" if ($one_line =~ /$one_pattern/);
|
||||
}
|
||||
}
|
||||
close FILE;
|
||||
EOF
|
||||
--remove_file $outfile
|
||||
|
||||
--source include/start_mysqld.inc
|
||||
@@ -1,21 +0,0 @@
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
# Check error handling for ambiguous server start options
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
--source include/kill_mysqld.inc
|
||||
|
||||
let $outfile= $MYSQLTEST_VARDIR/tmp/bad_option_2.txt;
|
||||
--disable_warnings
|
||||
--error 0,1
|
||||
--remove_file $outfile
|
||||
--enable_warnings
|
||||
--error 3
|
||||
--exec $MYSQLD_BOOTSTRAP_CMD --loose-console --enable-getopt-prefix-matching --performance-schema-max_=12 > $outfile 2>&1
|
||||
--let SEARCH_PATTERN=ambiguous option '--performance-schema-max_=12'
|
||||
--let SEARCH_FILE=$outfile
|
||||
--source include/search_pattern_in_file.inc
|
||||
--remove_file $outfile
|
||||
|
||||
--source include/start_mysqld.inc
|
||||
@@ -1,39 +0,0 @@
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
# Check error handling for invalid server start options
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
--source include/kill_mysqld.inc
|
||||
|
||||
let $outfile= $MYSQLTEST_VARDIR/tmp/bad_option_3.txt;
|
||||
--disable_warnings
|
||||
--error 0,1
|
||||
--remove_file $outfile
|
||||
--enable_warnings
|
||||
--error 2
|
||||
--exec $MYSQLD_BOOTSTRAP_CMD --loose-console -a -x > $outfile 2>&1
|
||||
|
||||
perl;
|
||||
use strict;
|
||||
use warnings;
|
||||
my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/bad_option_3.txt";
|
||||
open(FILE, "<", $fname) or die;
|
||||
my @lines= <FILE>;
|
||||
# those must be in the file for the test to pass
|
||||
my @patterns=
|
||||
("unknown option '-x'",
|
||||
"Aborting");
|
||||
foreach my $one_line (@lines)
|
||||
{
|
||||
foreach my $one_pattern (@patterns)
|
||||
{
|
||||
# print pattern, not line, to get a stable output
|
||||
print "Found: $one_pattern\n" if ($one_line =~ /$one_pattern/);
|
||||
}
|
||||
}
|
||||
close FILE;
|
||||
EOF
|
||||
--remove_file $outfile
|
||||
|
||||
--source include/start_mysqld.inc
|
||||
@@ -1,39 +0,0 @@
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
# Check error handling for invalid server start options
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
--source include/kill_mysqld.inc
|
||||
|
||||
let $outfile= $MYSQLTEST_VARDIR/tmp/bad_option_4.txt;
|
||||
--disable_warnings
|
||||
--error 0,1
|
||||
--remove_file $outfile
|
||||
--enable_warnings
|
||||
--error 1
|
||||
--exec $MYSQLD_BOOTSTRAP_CMD --loose-console -a -h bad_option_h_param > $outfile 2>&1
|
||||
|
||||
perl;
|
||||
use strict;
|
||||
use warnings;
|
||||
my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/bad_option_4.txt";
|
||||
open(FILE, "<", $fname) or die;
|
||||
my @lines= <FILE>;
|
||||
# those must be in the file for the test to pass
|
||||
my @patterns=
|
||||
("Can't change dir to.*bad_option_h_param",
|
||||
"Aborting");
|
||||
foreach my $one_line (@lines)
|
||||
{
|
||||
foreach my $one_pattern (@patterns)
|
||||
{
|
||||
# print pattern, not line, to get a stable output
|
||||
print "Found: $one_pattern\n" if ($one_line =~ /$one_pattern/);
|
||||
}
|
||||
}
|
||||
close FILE;
|
||||
EOF
|
||||
--remove_file $outfile
|
||||
|
||||
--source include/start_mysqld.inc
|
||||
@@ -1,42 +0,0 @@
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
# Check error handling for invalid server start options
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
--source include/kill_mysqld.inc
|
||||
|
||||
let $outfile= $MYSQLTEST_VARDIR/tmp/bad_option_5.txt;
|
||||
--disable_warnings
|
||||
--error 0,1
|
||||
--remove_file $outfile
|
||||
--enable_warnings
|
||||
--error 2
|
||||
--exec $MYSQLD_BOOTSTRAP_CMD --loose-console -aXbroken > $outfile 2>&1
|
||||
|
||||
# -aXbroken should be parsed as -a -Xbroken, or --ansi -Xbroken,
|
||||
# therefore the -X option is what the server should complain about
|
||||
|
||||
perl;
|
||||
use strict;
|
||||
use warnings;
|
||||
my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/bad_option_5.txt";
|
||||
open(FILE, "<", $fname) or die;
|
||||
my @lines= <FILE>;
|
||||
# those must be in the file for the test to pass
|
||||
my @patterns=
|
||||
("unknown option '-X'",
|
||||
"Aborting");
|
||||
foreach my $one_line (@lines)
|
||||
{
|
||||
foreach my $one_pattern (@patterns)
|
||||
{
|
||||
# print pattern, not line, to get a stable output
|
||||
print "Found: $one_pattern\n" if ($one_line =~ /$one_pattern/);
|
||||
}
|
||||
}
|
||||
close FILE;
|
||||
EOF
|
||||
--remove_file $outfile
|
||||
|
||||
--source include/start_mysqld.inc
|
||||
148
mysql-test/suite/perfschema/t/batch_table_io_func.test
Normal file
148
mysql-test/suite/perfschema/t/batch_table_io_func.test
Normal file
@@ -0,0 +1,148 @@
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
UPDATE performance_schema.setup_instruments SET enabled = 'NO', timed = 'YES';
|
||||
|
||||
UPDATE performance_schema.setup_instruments SET enabled = 'YES'
|
||||
WHERE name in ('wait/io/table/sql/handler',
|
||||
'wait/lock/table/sql/handler');
|
||||
|
||||
--disable_warnings
|
||||
drop procedure if exists before_payload;
|
||||
drop procedure if exists after_payload;
|
||||
--enable_warnings
|
||||
|
||||
delimiter $$;
|
||||
|
||||
create procedure before_payload()
|
||||
begin
|
||||
TRUNCATE TABLE performance_schema.table_io_waits_summary_by_index_usage;
|
||||
TRUNCATE TABLE performance_schema.table_io_waits_summary_by_table;
|
||||
TRUNCATE TABLE performance_schema.events_waits_history_long;
|
||||
TRUNCATE TABLE performance_schema.events_waits_history;
|
||||
TRUNCATE TABLE performance_schema.events_waits_current;
|
||||
end
|
||||
$$
|
||||
|
||||
create procedure after_payload()
|
||||
begin
|
||||
select count(1) as number_seen,
|
||||
OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME, INDEX_NAME,
|
||||
OPERATION, NUMBER_OF_BYTES
|
||||
from performance_schema.events_waits_history_long
|
||||
where OBJECT_SCHEMA = "test"
|
||||
group by OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME, INDEX_NAME, OPERATION, NUMBER_OF_BYTES;
|
||||
|
||||
select OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME, INDEX_NAME,
|
||||
COUNT_STAR, COUNT_READ, COUNT_WRITE
|
||||
from performance_schema.table_io_waits_summary_by_index_usage
|
||||
where OBJECT_SCHEMA = "test"
|
||||
order by OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME, INDEX_NAME;
|
||||
|
||||
select OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME,
|
||||
COUNT_STAR, COUNT_READ, COUNT_WRITE
|
||||
from performance_schema.table_io_waits_summary_by_table
|
||||
where OBJECT_SCHEMA = "test"
|
||||
order by OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME;
|
||||
end
|
||||
$$
|
||||
|
||||
delimiter ;$$
|
||||
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists t1;
|
||||
drop table if exists t2;
|
||||
drop table if exists t3;
|
||||
--enable_warnings
|
||||
|
||||
create table t0(v int);
|
||||
create table t1(id1 int, a int);
|
||||
create table t2(id1 int, id2 int, b int);
|
||||
create table t3(id2 int, id3 int, c int);
|
||||
|
||||
insert into t0 values
|
||||
(0), (1), (2), (3), (4),
|
||||
(5), (6), (7), (8), (9);
|
||||
|
||||
insert into t1(id1, a)
|
||||
select v, 100*v from t0;
|
||||
|
||||
insert into t2(id1, id2, b)
|
||||
select X.v, 10*X.v + Y.v, 100*X.v + 10*Y.v
|
||||
from t0 X, t0 Y;
|
||||
|
||||
insert into t3(id2, id3, c)
|
||||
select 10*X.v + Y.v, 100*X.v + 10*Y.v + Z.v, 100*X.v + 10*Y.v + Z.v
|
||||
from t0 X, t0 Y, t0 Z;
|
||||
|
||||
analyze table t1;
|
||||
analyze table t2;
|
||||
analyze table t3;
|
||||
|
||||
select * from t1 order by a;
|
||||
|
||||
# Only dump a small part
|
||||
select * from t2
|
||||
where (b >= 180) and (b <= 220)
|
||||
order by b;
|
||||
|
||||
# Only dump a small part
|
||||
select * from t3
|
||||
where (c >= 587) and (c <= 612)
|
||||
order by c;
|
||||
|
||||
#
|
||||
# TEST 1 (join, no index)
|
||||
#
|
||||
|
||||
explain select t1.*, t2.*, t3.*
|
||||
from t1 join t2 using (id1) join t3 using (id2);
|
||||
|
||||
call before_payload();
|
||||
|
||||
# Payload query to analyse: should do batch io on t3
|
||||
|
||||
--disable_result_log
|
||||
select t1.*, t2.*, t3.*
|
||||
from t1 join t2 using (id1) join t3 using (id2);
|
||||
--enable_result_log
|
||||
|
||||
call after_payload();
|
||||
|
||||
#
|
||||
# TEST 2 (join, with index)
|
||||
#
|
||||
|
||||
alter table t1 add unique index(id1);
|
||||
alter table t2 add unique index(id2);
|
||||
alter table t2 add index(id1);
|
||||
alter table t3 add unique index(id3);
|
||||
alter table t3 add index(id2);
|
||||
|
||||
explain select t1.*, t2.*, t3.*
|
||||
from t1 join t2 using (id1) join t3 using (id2);
|
||||
|
||||
call before_payload();
|
||||
|
||||
# Payload query to analyse: should do batch io on t3
|
||||
|
||||
--disable_result_log
|
||||
select t1.*, t2.*, t3.*
|
||||
from t1 join t2 using (id1) join t3 using (id2);
|
||||
--enable_result_log
|
||||
|
||||
call after_payload();
|
||||
|
||||
# Cleanup
|
||||
|
||||
drop table t0;
|
||||
drop table t1;
|
||||
drop table t2;
|
||||
drop table t3;
|
||||
|
||||
drop procedure before_payload;
|
||||
drop procedure after_payload;
|
||||
|
||||
UPDATE performance_schema.setup_instruments SET enabled = 'YES', timed = 'YES';
|
||||
|
||||
@@ -27,6 +27,14 @@ checksum table performance_schema.events_statements_summary_by_host_by_event_nam
|
||||
checksum table performance_schema.events_statements_summary_by_thread_by_event_name;
|
||||
checksum table performance_schema.events_statements_summary_by_user_by_event_name;
|
||||
checksum table performance_schema.events_statements_summary_global_by_event_name;
|
||||
checksum table performance_schema.events_transactions_current;
|
||||
checksum table performance_schema.events_transactions_history;
|
||||
checksum table performance_schema.events_transactions_history_long;
|
||||
checksum table performance_schema.events_transactions_summary_by_account_by_event_name;
|
||||
checksum table performance_schema.events_transactions_summary_by_host_by_event_name;
|
||||
checksum table performance_schema.events_transactions_summary_by_thread_by_event_name;
|
||||
checksum table performance_schema.events_transactions_summary_by_user_by_event_name;
|
||||
checksum table performance_schema.events_transactions_summary_global_by_event_name;
|
||||
checksum table performance_schema.events_waits_current;
|
||||
checksum table performance_schema.events_waits_history;
|
||||
checksum table performance_schema.events_waits_history_long;
|
||||
@@ -73,6 +81,14 @@ checksum table performance_schema.events_statements_summary_by_host_by_event_nam
|
||||
checksum table performance_schema.events_statements_summary_by_thread_by_event_name extended;
|
||||
checksum table performance_schema.events_statements_summary_by_user_by_event_name extended;
|
||||
checksum table performance_schema.events_statements_summary_global_by_event_name extended;
|
||||
checksum table performance_schema.events_transactions_current extended;
|
||||
checksum table performance_schema.events_transactions_history extended;
|
||||
checksum table performance_schema.events_transactions_history_long extended;
|
||||
checksum table performance_schema.events_transactions_summary_by_account_by_event_name extended;
|
||||
checksum table performance_schema.events_transactions_summary_by_host_by_event_name extended;
|
||||
checksum table performance_schema.events_transactions_summary_by_thread_by_event_name extended;
|
||||
checksum table performance_schema.events_transactions_summary_by_user_by_event_name extended;
|
||||
checksum table performance_schema.events_transactions_summary_global_by_event_name extended;
|
||||
checksum table performance_schema.events_waits_current extended;
|
||||
checksum table performance_schema.events_waits_history extended;
|
||||
checksum table performance_schema.events_waits_history_long extended;
|
||||
|
||||
@@ -4,6 +4,6 @@
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
show variables like 'performance_schema_max_thread_classes';
|
||||
show variables like 'performance_schema_max_thread_instances';
|
||||
show global variables like 'performance_schema_max_thread_classes';
|
||||
show global variables like 'performance_schema_max_thread_instances';
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ SELECT COUNT(DISTINCT PROCESSLIST_ID)
|
||||
FROM performance_schema.session_connect_attrs;
|
||||
|
||||
connection non_privileged_user;
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
--echo # must return 1
|
||||
SELECT COUNT(DISTINCT PROCESSLIST_ID)
|
||||
FROM performance_schema.session_account_connect_attrs;
|
||||
|
||||
|
||||
98
mysql-test/suite/perfschema/t/connection_type_notwin.test
Normal file
98
mysql-test/suite/perfschema/t/connection_type_notwin.test
Normal file
@@ -0,0 +1,98 @@
|
||||
|
||||
--source include/not_windows.inc
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_debug.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
--echo "Default connection"
|
||||
|
||||
--vertical_results
|
||||
select NAME, PROCESSLIST_USER, PROCESSLIST_HOST, CONNECTION_TYPE
|
||||
from performance_schema.threads
|
||||
where PROCESSLIST_ID = connection_id();
|
||||
|
||||
create user 'root'@'santa.claus.ipv4.example.com';
|
||||
grant select on *.* to 'root'@'santa.claus.ipv4.example.com';
|
||||
create user 'rootssl'@'santa.claus.ipv4.example.com'
|
||||
require SSL;
|
||||
grant select on *.* to 'rootssl'@'santa.claus.ipv4.example.com';
|
||||
|
||||
set global debug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4";
|
||||
|
||||
# Setup
|
||||
# make sure we start with a clean slate. log_tables.test says this is OK.
|
||||
TRUNCATE TABLE mysql.general_log;
|
||||
|
||||
SET @old_log_output= @@global.log_output;
|
||||
SET @old_general_log= @@global.general_log;
|
||||
SET @old_general_log_file= @@global.general_log_file;
|
||||
|
||||
--replace_result $MYSQLTEST_VARDIR ...
|
||||
eval SET GLOBAL general_log_file = '$MYSQLTEST_VARDIR/log/rewrite_general_con.log';
|
||||
SET GLOBAL log_output = 'FILE,TABLE';
|
||||
SET GLOBAL general_log= 'ON';
|
||||
|
||||
connect(con1, localhost, root,,);
|
||||
|
||||
--echo "Connection con1"
|
||||
|
||||
select NAME, PROCESSLIST_USER, PROCESSLIST_HOST, CONNECTION_TYPE
|
||||
from performance_schema.threads
|
||||
where PROCESSLIST_ID = connection_id();
|
||||
|
||||
--disconnect con1
|
||||
|
||||
connect(con2, "127.0.0.1", root,,test,$MASTER_MYPORT,);
|
||||
|
||||
--echo "Connection con2"
|
||||
|
||||
select NAME, PROCESSLIST_USER, PROCESSLIST_HOST, CONNECTION_TYPE
|
||||
from performance_schema.threads
|
||||
where PROCESSLIST_ID = connection_id();
|
||||
|
||||
--disconnect con2
|
||||
|
||||
connect(con3, "127.0.0.1", rootssl,,test,$MASTER_MYPORT,,SSL);
|
||||
|
||||
--echo "Connection con3"
|
||||
|
||||
select NAME, PROCESSLIST_USER, PROCESSLIST_HOST, CONNECTION_TYPE
|
||||
from performance_schema.threads
|
||||
where PROCESSLIST_ID = connection_id();
|
||||
|
||||
--disconnect con3
|
||||
|
||||
--connection default
|
||||
|
||||
SET GLOBAL general_log= 'OFF';
|
||||
|
||||
# show general-logging to file is correct
|
||||
CREATE TABLE test_log (argument TEXT);
|
||||
--replace_result $MYSQLTEST_VARDIR ...
|
||||
eval LOAD DATA LOCAL INFILE '$MYSQLTEST_VARDIR/log/rewrite_general_con.log'
|
||||
INTO TABLE test_log FIELDS TERMINATED BY '\n' LINES TERMINATED BY '\n';
|
||||
|
||||
select user_host, command_type, argument from mysql.general_log
|
||||
where command_type = "Connect";
|
||||
|
||||
select substring(argument, locate("Connect", argument)) from test_log
|
||||
where argument like "%Connect%on test%";
|
||||
|
||||
|
||||
DROP TABLE test_log;
|
||||
|
||||
--remove_file $MYSQLTEST_VARDIR/log/rewrite_general_con.log
|
||||
|
||||
SET GLOBAL general_log_file= @old_general_log_file;
|
||||
SET GLOBAL general_log= @old_general_log;
|
||||
SET GLOBAL log_output= @old_log_output;
|
||||
|
||||
--horizontal_results
|
||||
|
||||
set global debug= default;
|
||||
revoke select on *.* from 'root'@'santa.claus.ipv4.example.com';
|
||||
drop user 'root'@'santa.claus.ipv4.example.com';
|
||||
revoke select on *.* from 'rootssl'@'santa.claus.ipv4.example.com';
|
||||
drop user 'rootssl'@'santa.claus.ipv4.example.com';
|
||||
|
||||
|
||||
96
mysql-test/suite/perfschema/t/connection_type_win.test
Normal file
96
mysql-test/suite/perfschema/t/connection_type_win.test
Normal file
@@ -0,0 +1,96 @@
|
||||
|
||||
--source include/windows.inc
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_debug.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
--echo "Default connection"
|
||||
|
||||
--vertical_results
|
||||
select NAME, PROCESSLIST_USER, PROCESSLIST_HOST, CONNECTION_TYPE
|
||||
from performance_schema.threads
|
||||
where PROCESSLIST_ID = connection_id();
|
||||
|
||||
create user 'root'@'santa.claus.ipv4.example.com';
|
||||
grant select on *.* to 'root'@'santa.claus.ipv4.example.com';
|
||||
create user 'rootssl'@'santa.claus.ipv4.example.com'
|
||||
require SSL;
|
||||
grant select on *.* to 'rootssl'@'santa.claus.ipv4.example.com';
|
||||
|
||||
set global debug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4";
|
||||
|
||||
# Setup
|
||||
# make sure we start with a clean slate. log_tables.test says this is OK.
|
||||
TRUNCATE TABLE mysql.general_log;
|
||||
|
||||
SET @old_log_output= @@global.log_output;
|
||||
SET @old_general_log= @@global.general_log;
|
||||
SET @old_general_log_file= @@global.general_log_file;
|
||||
|
||||
--replace_result $MYSQLTEST_VARDIR ...
|
||||
eval SET GLOBAL general_log_file = '$MYSQLTEST_VARDIR/log/rewrite_general_con.log';
|
||||
SET GLOBAL log_output = 'FILE,TABLE';
|
||||
SET GLOBAL general_log= 'ON';
|
||||
|
||||
connect(con1, localhost, root,,);
|
||||
|
||||
--echo "Connection con1"
|
||||
|
||||
select NAME, PROCESSLIST_USER, PROCESSLIST_HOST, CONNECTION_TYPE
|
||||
from performance_schema.threads
|
||||
where PROCESSLIST_ID = connection_id();
|
||||
|
||||
--disconnect con1
|
||||
|
||||
connect(con2, "127.0.0.1", root,,test,$MASTER_MYPORT,);
|
||||
|
||||
--echo "Connection con2"
|
||||
|
||||
select NAME, PROCESSLIST_USER, PROCESSLIST_HOST, CONNECTION_TYPE
|
||||
from performance_schema.threads
|
||||
where PROCESSLIST_ID = connection_id();
|
||||
|
||||
--disconnect con2
|
||||
|
||||
connect(con3, "127.0.0.1", rootssl,,test,$MASTER_MYPORT,,SSL);
|
||||
|
||||
--echo "Connection con3"
|
||||
|
||||
select NAME, PROCESSLIST_USER, PROCESSLIST_HOST, CONNECTION_TYPE
|
||||
from performance_schema.threads
|
||||
where PROCESSLIST_ID = connection_id();
|
||||
|
||||
--disconnect con3
|
||||
|
||||
--connection default
|
||||
|
||||
SET GLOBAL general_log= 'OFF';
|
||||
|
||||
# show general-logging to file is correct
|
||||
CREATE TABLE test_log (argument TEXT);
|
||||
--replace_result $MYSQLTEST_VARDIR ...
|
||||
eval LOAD DATA LOCAL INFILE '$MYSQLTEST_VARDIR/log/rewrite_general_con.log'
|
||||
INTO TABLE test_log FIELDS TERMINATED BY '\n' LINES TERMINATED BY '\n';
|
||||
|
||||
select user_host, command_type, argument from mysql.general_log
|
||||
where command_type = "Connect";
|
||||
|
||||
select substring(argument, locate("Connect", argument)) from test_log
|
||||
where argument like "%Connect%on test%";
|
||||
|
||||
|
||||
DROP TABLE test_log;
|
||||
|
||||
--remove_file $MYSQLTEST_VARDIR/log/rewrite_general_con.log
|
||||
|
||||
SET GLOBAL general_log_file= @old_general_log_file;
|
||||
SET GLOBAL general_log= @old_general_log;
|
||||
SET GLOBAL log_output= @old_log_output;
|
||||
|
||||
--horizontal_results
|
||||
|
||||
set global debug= default;
|
||||
revoke select on *.* from 'root'@'santa.claus.ipv4.example.com';
|
||||
drop user 'root'@'santa.claus.ipv4.example.com';
|
||||
revoke select on *.* from 'rootssl'@'santa.claus.ipv4.example.com';
|
||||
drop user 'rootssl'@'santa.claus.ipv4.example.com';
|
||||
21
mysql-test/suite/perfschema/t/ddl_esms_by_program.test
Normal file
21
mysql-test/suite/perfschema/t/ddl_esms_by_program.test
Normal file
@@ -0,0 +1,21 @@
|
||||
# This line and the line below is a temporary line for tests that do not need MyISAM in future, but need to be kept for tests that need it.
|
||||
--source include/have_myisam.inc
|
||||
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
alter table performance_schema.events_statements_summary_by_program
|
||||
add column foo integer;
|
||||
|
||||
truncate table performance_schema.events_statements_summary_by_program;
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
ALTER TABLE performance_schema.events_statements_summary_by_program ADD INDEX test_index(OBJECT_NAME);
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
CREATE UNIQUE INDEX test_index
|
||||
ON performance_schema.events_statements_summary_by_program(OBJECT_NAME);
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
alter table performance_schema.events_transactions_summary_by_account_by_event_name
|
||||
add column foo integer;
|
||||
|
||||
truncate table performance_schema.events_transactions_summary_by_account_by_event_name;
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
ALTER TABLE performance_schema.events_transactions_summary_by_account_by_event_name
|
||||
ADD INDEX test_index(USERNAME);
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
CREATE UNIQUE INDEX test_index
|
||||
ON performance_schema.events_transactions_summary_by_account_by_event_name(USERNAME);
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
alter table performance_schema.events_transactions_summary_by_host_by_event_name
|
||||
add column foo integer;
|
||||
|
||||
truncate table performance_schema.events_transactions_summary_by_host_by_event_name;
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
ALTER TABLE performance_schema.events_transactions_summary_by_host_by_event_name
|
||||
ADD INDEX test_index(HOSTNAME);
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
CREATE UNIQUE INDEX test_index
|
||||
ON performance_schema.events_transactions_summary_by_host_by_event_name(HOSTNAME);
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
alter table performance_schema.events_transactions_summary_by_thread_by_event_name
|
||||
add column foo integer;
|
||||
|
||||
truncate table performance_schema.events_transactions_summary_by_thread_by_event_name;
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
ALTER TABLE performance_schema.events_transactions_summary_by_thread_by_event_name ADD INDEX test_index(THREAD_ID);
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
CREATE UNIQUE INDEX test_index
|
||||
ON performance_schema.events_transactions_summary_by_thread_by_event_name(THREAD_ID);
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
alter table performance_schema.events_transactions_summary_by_user_by_event_name
|
||||
add column foo integer;
|
||||
|
||||
truncate table performance_schema.events_transactions_summary_by_user_by_event_name;
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
ALTER TABLE performance_schema.events_transactions_summary_by_user_by_event_name
|
||||
ADD INDEX test_index(USERNAME);
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
CREATE UNIQUE INDEX test_index
|
||||
ON performance_schema.events_transactions_summary_by_user_by_event_name(USERNAME);
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
alter table performance_schema.events_transactions_summary_global_by_event_name
|
||||
add column foo integer;
|
||||
|
||||
truncate table performance_schema.events_transactions_summary_global_by_event_name;
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
ALTER TABLE performance_schema.events_transactions_summary_global_by_event_name
|
||||
ADD INDEX test_index(EVENT_NAME);
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
CREATE UNIQUE INDEX test_index
|
||||
ON performance_schema.events_transactions_summary_global_by_event_name(EVENT_NAME);
|
||||
|
||||
@@ -14,3 +14,8 @@ ALTER TABLE performance_schema.events_stages_current ADD INDEX test_index(EVENT_
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
CREATE UNIQUE INDEX test_index ON performance_schema.events_stages_current(EVENT_ID);
|
||||
|
||||
--disable_query_log
|
||||
# Checking if the column WORK_COMPLETED and WORK_ESTIMATED exists
|
||||
select * from information_schema.columns where TABLE_NAME = 'events_stages_current' and column_name in ('WORK_COMPLETED','WORK_ESTIMATED')
|
||||
and table_schema='performance_schema';
|
||||
--enable_query_log
|
||||
|
||||
@@ -14,3 +14,8 @@ ALTER TABLE performance_schema.events_stages_history ADD INDEX test_index(EVENT_
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
CREATE UNIQUE INDEX test_index ON performance_schema.events_stages_history(EVENT_ID);
|
||||
|
||||
--disable_query_log
|
||||
# Checking if the column WORK_COMPLETED and WORK_ESTIMATED exists
|
||||
select * from information_schema.columns where TABLE_NAME ='events_stages_history' and column_name in ('WORK_COMPLETED','WORK_ESTIMATED')
|
||||
and table_schema='performance_schema';
|
||||
--enable_query_log
|
||||
|
||||
@@ -14,3 +14,8 @@ ALTER TABLE performance_schema.events_stages_history_long ADD INDEX test_index(E
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
CREATE UNIQUE INDEX test_index ON performance_schema.events_stages_history_long(EVENT_ID);
|
||||
|
||||
--disable_query_log
|
||||
# Checking if the column WORK_COMPLETED and WORK_ESTIMATED exists
|
||||
select * from information_schema.columns where TABLE_NAME ='events_stages_history_long' and column_name in ('WORK_COMPLETED','WORK_ESTIMATED')
|
||||
and table_schema='performance_schema';
|
||||
--enable_query_log
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
alter table performance_schema.events_transactions_current add column foo integer;
|
||||
|
||||
truncate table performance_schema.events_transactions_current;
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
ALTER TABLE performance_schema.events_transactions_current ADD INDEX test_index(EVENT_ID);
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
CREATE UNIQUE INDEX test_index ON performance_schema.events_transactions_current(EVENT_ID);
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
alter table performance_schema.events_transactions_history add column foo integer;
|
||||
|
||||
truncate table performance_schema.events_transactions_history;
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
ALTER TABLE performance_schema.events_transactions_history ADD INDEX test_index(EVENT_ID);
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
CREATE UNIQUE INDEX test_index ON performance_schema.events_transactions_history(EVENT_ID);
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
alter table performance_schema.events_transactions_history_long add column foo integer;
|
||||
|
||||
truncate table performance_schema.events_transactions_history_long;
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
ALTER TABLE performance_schema.events_transactions_history_long ADD INDEX test_index(EVENT_ID);
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
CREATE UNIQUE INDEX test_index ON performance_schema.events_transactions_history_long(EVENT_ID);
|
||||
|
||||
19
mysql-test/suite/perfschema/t/ddl_global_status.test
Normal file
19
mysql-test/suite/perfschema/t/ddl_global_status.test
Normal file
@@ -0,0 +1,19 @@
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
alter table performance_schema.global_status
|
||||
add column foo integer;
|
||||
|
||||
truncate table performance_schema.global_status;
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
ALTER TABLE performance_schema.global_status
|
||||
ADD INDEX test_index(VARIABLE_NAME);
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
CREATE UNIQUE INDEX test_index
|
||||
ON performance_schema.global_status(VARIABLE_NAME);
|
||||
|
||||
20
mysql-test/suite/perfschema/t/ddl_global_variables.test
Normal file
20
mysql-test/suite/perfschema/t/ddl_global_variables.test
Normal file
@@ -0,0 +1,20 @@
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
alter table performance_schema.global_variables
|
||||
add column foo integer;
|
||||
|
||||
-- error ER_WRONG_PERFSCHEMA_USAGE
|
||||
truncate table performance_schema.global_variables;
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
ALTER TABLE performance_schema.global_variables
|
||||
ADD INDEX test_index(VARIABLE_NAME);
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
CREATE UNIQUE INDEX test_index
|
||||
ON performance_schema.global_variables(VARIABLE_NAME);
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
alter table performance_schema.memory_summary_by_account_by_event_name
|
||||
add column foo integer;
|
||||
|
||||
truncate table performance_schema.memory_summary_by_account_by_event_name;
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
ALTER TABLE performance_schema.memory_summary_by_account_by_event_name
|
||||
ADD INDEX test_index(USERNAME);
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
CREATE UNIQUE INDEX test_index
|
||||
ON performance_schema.memory_summary_by_account_by_event_name(USERNAME);
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
alter table performance_schema.memory_summary_by_host_by_event_name
|
||||
add column foo integer;
|
||||
|
||||
truncate table performance_schema.memory_summary_by_host_by_event_name;
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
ALTER TABLE performance_schema.memory_summary_by_host_by_event_name
|
||||
ADD INDEX test_index(USERNAME);
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
CREATE UNIQUE INDEX test_index
|
||||
ON performance_schema.memory_summary_by_host_by_event_name(USERNAME);
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
alter table performance_schema.memory_summary_by_thread_by_event_name
|
||||
add column foo integer;
|
||||
|
||||
truncate table performance_schema.memory_summary_by_thread_by_event_name;
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
ALTER TABLE performance_schema.memory_summary_by_thread_by_event_name
|
||||
ADD INDEX test_index(USERNAME);
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
CREATE UNIQUE INDEX test_index
|
||||
ON performance_schema.memory_summary_by_thread_by_event_name(USERNAME);
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
alter table performance_schema.memory_summary_by_user_by_event_name
|
||||
add column foo integer;
|
||||
|
||||
truncate table performance_schema.memory_summary_by_user_by_event_name;
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
ALTER TABLE performance_schema.memory_summary_by_user_by_event_name
|
||||
ADD INDEX test_index(USERNAME);
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
CREATE UNIQUE INDEX test_index
|
||||
ON performance_schema.memory_summary_by_user_by_event_name(USERNAME);
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
alter table performance_schema.memory_summary_global_by_event_name
|
||||
add column foo integer;
|
||||
|
||||
truncate table performance_schema.memory_summary_global_by_event_name;
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
ALTER TABLE performance_schema.memory_summary_global_by_event_name
|
||||
ADD INDEX test_index(USERNAME);
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
CREATE UNIQUE INDEX test_index
|
||||
ON performance_schema.memory_summary_global_by_event_name(USERNAME);
|
||||
|
||||
17
mysql-test/suite/perfschema/t/ddl_metadata_locks.test
Normal file
17
mysql-test/suite/perfschema/t/ddl_metadata_locks.test
Normal file
@@ -0,0 +1,17 @@
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
alter table performance_schema.metadata_locks add column foo integer;
|
||||
|
||||
-- error ER_WRONG_PERFSCHEMA_USAGE
|
||||
truncate table performance_schema.metadata_locks;
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
ALTER TABLE performance_schema.metadata_locks ADD INDEX test_index(TIMER_NAME);
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
CREATE UNIQUE INDEX test_index ON performance_schema.metadata_locks(TIMER_NAME);
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
# This line and the line below is a temporary line for tests that do not need MyISAM in future, but need to be kept for tests that need it.
|
||||
--source include/have_myisam.inc
|
||||
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
alter table performance_schema.prepared_statements_instances
|
||||
add column foo integer;
|
||||
|
||||
truncate table performance_schema.prepared_statements_instances;
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
ALTER TABLE performance_schema.prepared_statements_instances ADD INDEX test_index(OWNER_OBJECT_NAME);
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
CREATE UNIQUE INDEX test_index
|
||||
ON performance_schema.prepared_statements_instances(OWNER_OBJECT_NAME);
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
# This test verifies the correct behaviour in case of invalid
|
||||
# usage of DDLs on the table replication_applier_configuration
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
ALTER TABLE performance_schema.replication_applier_configuration
|
||||
ADD COLUMN foo integer;
|
||||
|
||||
-- error ER_WRONG_PERFSCHEMA_USAGE
|
||||
TRUNCATE TABLE performance_schema.replication_applier_configuration;
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
ALTER TABLE performance_schema.replication_applier_configuration
|
||||
ADD INDEX test_index(desired_delay);
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
CREATE UNIQUE INDEX test_index ON
|
||||
performance_schema.replication_applier_configuration(desired_delay);
|
||||
@@ -0,0 +1,22 @@
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
# This test verifies the correct behaviour in case of invalid
|
||||
# usage of DDLs on the table replication_applier_status
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
ALTER TABLE performance_schema.replication_applier_status
|
||||
ADD COLUMN foo integer;
|
||||
|
||||
-- error ER_WRONG_PERFSCHEMA_USAGE
|
||||
TRUNCATE TABLE performance_schema.replication_applier_status;
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
ALTER TABLE performance_schema.replication_applier_status
|
||||
ADD INDEX test_index(remaining_delay);
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
CREATE UNIQUE INDEX test_index ON
|
||||
performance_schema.replication_applier_status(remaining_delay);
|
||||
@@ -0,0 +1,22 @@
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
# This test verifies the correct behaviour in case of invalid
|
||||
# usage of DDLs on the table replication_applier_status_by_coordinator
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
ALTER TABLE performance_schema.replication_applier_status_by_coordinator
|
||||
ADD COLUMN foo integer;
|
||||
|
||||
-- error ER_WRONG_PERFSCHEMA_USAGE
|
||||
TRUNCATE TABLE performance_schema.replication_applier_status_by_coordinator;
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
ALTER TABLE performance_schema.replication_applier_status_by_coordinator
|
||||
ADD INDEX test_index(thread_id);
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
CREATE UNIQUE INDEX test_index ON
|
||||
performance_schema.replication_applier_status_by_coordinator(thread_id);
|
||||
@@ -0,0 +1,22 @@
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
# This test verifies the correct behaviour in case of invalid
|
||||
# usage of DDLs on the table replication_applier_status_by_worker.
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
ALTER TABLE performance_schema.replication_applier_status_by_worker
|
||||
add column foo integer;
|
||||
|
||||
-- error ER_WRONG_PERFSCHEMA_USAGE
|
||||
TRUNCATE TABLE performance_schema.replication_applier_status_by_worker;
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
ALTER TABLE performance_schema.replication_applier_status_by_worker
|
||||
ADD INDEX test_index(worker_id);
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
CREATE UNIQUE INDEX test_index ON
|
||||
performance_schema.replication_applier_status_by_worker(worker_id);
|
||||
@@ -0,0 +1,22 @@
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
# This test verifies the correct behaviour in case of invalid
|
||||
# usage of DDLs on the table replication_connection_configuration.
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
ALTER TABLE performance_schema.replication_connection_configuration
|
||||
ADD COLUMN foo integer;
|
||||
|
||||
-- error ER_WRONG_PERFSCHEMA_USAGE
|
||||
TRUNCATE TABLE performance_schema.replication_connection_configuration;
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
ALTER TABLE performance_schema.replication_connection_configuration
|
||||
ADD INDEX test_index(HOST);
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
CREATE UNIQUE INDEX test_index
|
||||
ON performance_schema.replication_connection_configuration(HOST);
|
||||
@@ -0,0 +1,22 @@
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
# This test verifies the correct behaviour in case of invalid
|
||||
# usage of DDLs on the table replication_connection_status.
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
ALTER TABLE performance_schema.replication_connection_status
|
||||
ADD COLUMN foo integer;
|
||||
|
||||
-- error ER_WRONG_PERFSCHEMA_USAGE
|
||||
TRUNCATE TABLE performance_schema.replication_connection_status;
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
ALTER TABLE performance_schema.replication_connection_status
|
||||
ADD INDEX test_index(Thread_Id);
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
CREATE UNIQUE INDEX test_index
|
||||
ON performance_schema.replication_connection_status(Thread_Id);
|
||||
@@ -0,0 +1,21 @@
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
# This test verifies the correct behaviour in case of invalid
|
||||
# Usage of DDLs on the table replication_group_member_stats.
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
--error ER_DBACCESS_DENIED_ERROR
|
||||
ALTER TABLE performance_schema.replication_group_member_stats
|
||||
ADD COLUMN foo INTEGER;
|
||||
|
||||
--error ER_WRONG_PERFSCHEMA_USAGE
|
||||
TRUNCATE TABLE performance_schema.replication_group_member_stats;
|
||||
|
||||
--error ER_DBACCESS_DENIED_ERROR
|
||||
ALTER TABLE performance_schema.replication_group_member_stats
|
||||
ADD INDEX test_index(Member_Id);
|
||||
|
||||
--error ER_DBACCESS_DENIED_ERROR
|
||||
CREATE UNIQUE INDEX test_index
|
||||
ON performance_schema.replication_group_member_stats(Member_Id);
|
||||
@@ -0,0 +1,22 @@
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
# This test verifies the correct behaviour in case of invalid
|
||||
# usage of DDLs on the table replication_group_members.
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
--error ER_DBACCESS_DENIED_ERROR
|
||||
ALTER TABLE performance_schema.replication_group_members
|
||||
ADD COLUMN foo INTEGER;
|
||||
|
||||
--error ER_WRONG_PERFSCHEMA_USAGE
|
||||
TRUNCATE TABLE performance_schema.replication_group_members;
|
||||
|
||||
--error ER_DBACCESS_DENIED_ERROR
|
||||
ALTER TABLE performance_schema.replication_group_members
|
||||
ADD INDEX test_index(Member_Id);
|
||||
|
||||
--error ER_DBACCESS_DENIED_ERROR
|
||||
CREATE UNIQUE INDEX test_index
|
||||
ON performance_schema.replication_group_members(Member_Id);
|
||||
20
mysql-test/suite/perfschema/t/ddl_session_status.test
Normal file
20
mysql-test/suite/perfschema/t/ddl_session_status.test
Normal file
@@ -0,0 +1,20 @@
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
alter table performance_schema.session_status
|
||||
add column foo integer;
|
||||
|
||||
-- error ER_WRONG_PERFSCHEMA_USAGE
|
||||
truncate table performance_schema.session_status;
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
ALTER TABLE performance_schema.session_status
|
||||
ADD INDEX test_index(VARIABLE_NAME);
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
CREATE UNIQUE INDEX test_index
|
||||
ON performance_schema.session_status(VARIABLE_NAME);
|
||||
|
||||
20
mysql-test/suite/perfschema/t/ddl_session_variables.test
Normal file
20
mysql-test/suite/perfschema/t/ddl_session_variables.test
Normal file
@@ -0,0 +1,20 @@
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
alter table performance_schema.session_variables
|
||||
add column foo integer;
|
||||
|
||||
-- error ER_WRONG_PERFSCHEMA_USAGE
|
||||
truncate table performance_schema.session_variables;
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
ALTER TABLE performance_schema.session_variables
|
||||
ADD INDEX test_index(VARIABLE_NAME);
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
CREATE UNIQUE INDEX test_index
|
||||
ON performance_schema.session_variables(VARIABLE_NAME);
|
||||
|
||||
@@ -27,3 +27,5 @@ ALTER TABLE performance_schema.setup_actors ADD INDEX test_index(HOST);
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
CREATE UNIQUE INDEX test_index ON performance_schema.setup_actors(HOST);
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
ALTER TABLE performance_schema.setup_actors ADD KEY ENA(ENABLED);
|
||||
|
||||
19
mysql-test/suite/perfschema/t/ddl_status_by_account.test
Normal file
19
mysql-test/suite/perfschema/t/ddl_status_by_account.test
Normal file
@@ -0,0 +1,19 @@
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
alter table performance_schema.status_by_account
|
||||
add column foo integer;
|
||||
|
||||
truncate table performance_schema.status_by_account;
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
ALTER TABLE performance_schema.status_by_account
|
||||
ADD INDEX test_index(VARIABLE_NAME);
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
CREATE UNIQUE INDEX test_index
|
||||
ON performance_schema.status_by_account(VARIABLE_NAME);
|
||||
|
||||
19
mysql-test/suite/perfschema/t/ddl_status_by_host.test
Normal file
19
mysql-test/suite/perfschema/t/ddl_status_by_host.test
Normal file
@@ -0,0 +1,19 @@
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
alter table performance_schema.status_by_host
|
||||
add column foo integer;
|
||||
|
||||
truncate table performance_schema.status_by_host;
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
ALTER TABLE performance_schema.status_by_host
|
||||
ADD INDEX test_index(VARIABLE_NAME);
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
CREATE UNIQUE INDEX test_index
|
||||
ON performance_schema.status_by_host(VARIABLE_NAME);
|
||||
|
||||
19
mysql-test/suite/perfschema/t/ddl_status_by_thread.test
Normal file
19
mysql-test/suite/perfschema/t/ddl_status_by_thread.test
Normal file
@@ -0,0 +1,19 @@
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
alter table performance_schema.status_by_thread
|
||||
add column foo integer;
|
||||
|
||||
truncate table performance_schema.status_by_thread;
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
ALTER TABLE performance_schema.status_by_thread
|
||||
ADD INDEX test_index(VARIABLE_NAME);
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
CREATE UNIQUE INDEX test_index
|
||||
ON performance_schema.status_by_thread(VARIABLE_NAME);
|
||||
|
||||
19
mysql-test/suite/perfschema/t/ddl_status_by_user.test
Normal file
19
mysql-test/suite/perfschema/t/ddl_status_by_user.test
Normal file
@@ -0,0 +1,19 @@
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
alter table performance_schema.status_by_user
|
||||
add column foo integer;
|
||||
|
||||
truncate table performance_schema.status_by_user;
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
ALTER TABLE performance_schema.status_by_user
|
||||
ADD INDEX test_index(VARIABLE_NAME);
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
CREATE UNIQUE INDEX test_index
|
||||
ON performance_schema.status_by_user(VARIABLE_NAME);
|
||||
|
||||
17
mysql-test/suite/perfschema/t/ddl_table_handles.test
Normal file
17
mysql-test/suite/perfschema/t/ddl_table_handles.test
Normal file
@@ -0,0 +1,17 @@
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
alter table performance_schema.table_handles add column foo integer;
|
||||
|
||||
-- error ER_WRONG_PERFSCHEMA_USAGE
|
||||
truncate table performance_schema.table_handles;
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
ALTER TABLE performance_schema.table_handles ADD INDEX test_index(TIMER_NAME);
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
CREATE UNIQUE INDEX test_index ON performance_schema.table_handles(TIMER_NAME);
|
||||
|
||||
20
mysql-test/suite/perfschema/t/ddl_uvar_by_thread.test
Normal file
20
mysql-test/suite/perfschema/t/ddl_uvar_by_thread.test
Normal file
@@ -0,0 +1,20 @@
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
alter table performance_schema.user_variables_by_thread
|
||||
add column foo integer;
|
||||
|
||||
-- error ER_WRONG_PERFSCHEMA_USAGE
|
||||
truncate table performance_schema.user_variables_by_thread;
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
ALTER TABLE performance_schema.user_variables_by_thread
|
||||
ADD INDEX test_index(VARIABLE_NAME);
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
CREATE UNIQUE INDEX test_index
|
||||
ON performance_schema.user_variables_by_thread(VARIABLE_NAME);
|
||||
|
||||
20
mysql-test/suite/perfschema/t/ddl_variables_by_thread.test
Normal file
20
mysql-test/suite/perfschema/t/ddl_variables_by_thread.test
Normal file
@@ -0,0 +1,20 @@
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
alter table performance_schema.variables_by_thread
|
||||
add column foo integer;
|
||||
|
||||
-- error ER_WRONG_PERFSCHEMA_USAGE
|
||||
truncate table performance_schema.variables_by_thread;
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
ALTER TABLE performance_schema.variables_by_thread
|
||||
ADD INDEX test_index(VARIABLE_NAME);
|
||||
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
CREATE UNIQUE INDEX test_index
|
||||
ON performance_schema.variables_by_thread(VARIABLE_NAME);
|
||||
|
||||
@@ -24,7 +24,7 @@ SELECT SCHEMA_NAME, DIGEST_TEXT, COUNT_STAR, SUM_ROWS_AFFECTED, SUM_WARNINGS,
|
||||
|
||||
|
||||
# Expect no digest
|
||||
SHOW VARIABLES LIKE "performance_schema_digests_size";
|
||||
SHOW GLOBAL VARIABLES LIKE "performance_schema_digests_size";
|
||||
SELECT COUNT(*) FROM performance_schema.events_statements_summary_by_digest;
|
||||
|
||||
# Cleanup for Digest
|
||||
|
||||
@@ -9,3 +9,4 @@
|
||||
# Do not use any TAB characters for whitespace.
|
||||
#
|
||||
##############################################################################
|
||||
# perfschema.pfs_ccccccc : Bug#nnnnnnnn 2014-09-10 Anitha Frequent failures on PB2
|
||||
|
||||
44
mysql-test/suite/perfschema/t/dml_esms_by_program.test
Normal file
44
mysql-test/suite/perfschema/t/dml_esms_by_program.test
Normal file
@@ -0,0 +1,44 @@
|
||||
# This line and the line below is a temporary line for tests that do not need MyISAM in future, but need to be kept for tests that need it.
|
||||
--source include/have_myisam.inc
|
||||
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
#--disable_result_log
|
||||
select * from performance_schema.events_statements_summary_by_program
|
||||
where object_name like 'XXYYZZ%' limit 1;
|
||||
|
||||
select * from performance_schema.events_statements_summary_by_program
|
||||
where object_name='XXYYZZ';
|
||||
#--enable_result_log
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
insert into performance_schema.events_statements_summary_by_program
|
||||
set object_name='XXYYZZ', count_star=1, sum_timer_wait=2, min_timer_wait=3,
|
||||
avg_timer_wait=4, max_timer_wait=5;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
update performance_schema.events_statements_summary_by_program
|
||||
set count_star=12;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
update performance_schema.events_statements_summary_by_program
|
||||
set count_star=12 where object_name like "XXYYZZ";
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
delete from performance_schema.events_statements_summary_by_program
|
||||
where count_star=1;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
delete from performance_schema.events_statements_summary_by_program;
|
||||
|
||||
-- error ER_TABLEACCESS_DENIED_ERROR
|
||||
LOCK TABLES performance_schema.events_statements_summary_by_program READ;
|
||||
UNLOCK TABLES;
|
||||
|
||||
-- error ER_TABLEACCESS_DENIED_ERROR
|
||||
LOCK TABLES performance_schema.events_statements_summary_by_program WRITE;
|
||||
UNLOCK TABLES;
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
--disable_result_log
|
||||
select * from performance_schema.events_transactions_summary_by_account_by_event_name
|
||||
where event_name in ('transaction') limit 1;
|
||||
|
||||
select * from performance_schema.events_transactions_summary_by_account_by_event_name
|
||||
where event_name='FOO';
|
||||
--enable_result_log
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
insert into performance_schema.events_transactions_summary_by_account_by_event_name
|
||||
set event_name='FOO', user='BAR', host='BAZ',
|
||||
count_star=1, sum_timer_wait=2, min_timer_wait=3,
|
||||
avg_timer_wait=4, max_timer_wait=5;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
update performance_schema.events_transactions_summary_by_account_by_event_name
|
||||
set count_star=12;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
update performance_schema.events_transactions_summary_by_account_by_event_name
|
||||
set count_star=12 where event_name like "FOO";
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
delete from performance_schema.events_transactions_summary_by_account_by_event_name
|
||||
where count_star=1;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
delete from performance_schema.events_transactions_summary_by_account_by_event_name;
|
||||
|
||||
-- error ER_TABLEACCESS_DENIED_ERROR
|
||||
LOCK TABLES performance_schema.events_transactions_summary_by_account_by_event_name READ;
|
||||
UNLOCK TABLES;
|
||||
|
||||
-- error ER_TABLEACCESS_DENIED_ERROR
|
||||
LOCK TABLES performance_schema.events_transactions_summary_by_account_by_event_name WRITE;
|
||||
UNLOCK TABLES;
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
--disable_result_log
|
||||
select * from performance_schema.events_transactions_summary_by_host_by_event_name
|
||||
where event_name in ('transaction') limit 1;
|
||||
|
||||
select * from performance_schema.events_transactions_summary_by_host_by_event_name
|
||||
where event_name='FOO';
|
||||
--enable_result_log
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
insert into performance_schema.events_transactions_summary_by_host_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 ER_TABLEACCESS_DENIED_ERROR
|
||||
update performance_schema.events_transactions_summary_by_host_by_event_name
|
||||
set count_star=12;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
update performance_schema.events_transactions_summary_by_host_by_event_name
|
||||
set count_star=12 where event_name like "FOO";
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
delete from performance_schema.events_transactions_summary_by_host_by_event_name
|
||||
where count_star=1;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
delete from performance_schema.events_transactions_summary_by_host_by_event_name;
|
||||
|
||||
-- error ER_TABLEACCESS_DENIED_ERROR
|
||||
LOCK TABLES performance_schema.events_transactions_summary_by_host_by_event_name READ;
|
||||
UNLOCK TABLES;
|
||||
|
||||
-- error ER_TABLEACCESS_DENIED_ERROR
|
||||
LOCK TABLES performance_schema.events_transactions_summary_by_host_by_event_name WRITE;
|
||||
UNLOCK TABLES;
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
--disable_result_log
|
||||
select * from performance_schema.events_transactions_summary_by_thread_by_event_name
|
||||
where event_name in ('transaction') limit 1;
|
||||
|
||||
select * from performance_schema.events_transactions_summary_by_thread_by_event_name
|
||||
where event_name='FOO';
|
||||
--enable_result_log
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
insert into performance_schema.events_transactions_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 ER_TABLEACCESS_DENIED_ERROR
|
||||
update performance_schema.events_transactions_summary_by_thread_by_event_name
|
||||
set count_star=12;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
update performance_schema.events_transactions_summary_by_thread_by_event_name
|
||||
set count_star=12 where event_name like "FOO";
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
delete from performance_schema.events_transactions_summary_by_thread_by_event_name
|
||||
where count_star=1;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
delete from performance_schema.events_transactions_summary_by_thread_by_event_name;
|
||||
|
||||
-- error ER_TABLEACCESS_DENIED_ERROR
|
||||
LOCK TABLES performance_schema.events_transactions_summary_by_thread_by_event_name READ;
|
||||
UNLOCK TABLES;
|
||||
|
||||
-- error ER_TABLEACCESS_DENIED_ERROR
|
||||
LOCK TABLES performance_schema.events_transactions_summary_by_thread_by_event_name WRITE;
|
||||
UNLOCK TABLES;
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
--disable_result_log
|
||||
select * from performance_schema.events_transactions_summary_by_user_by_event_name
|
||||
where event_name in ('transaction') limit 1;
|
||||
|
||||
select * from performance_schema.events_transactions_summary_by_user_by_event_name
|
||||
where event_name='FOO';
|
||||
--enable_result_log
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
insert into performance_schema.events_transactions_summary_by_user_by_event_name
|
||||
set event_name='FOO', user='BAR',
|
||||
count_star=1, sum_timer_wait=2, min_timer_wait=3,
|
||||
avg_timer_wait=4, max_timer_wait=5;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
update performance_schema.events_transactions_summary_by_user_by_event_name
|
||||
set count_star=12;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
update performance_schema.events_transactions_summary_by_user_by_event_name
|
||||
set count_star=12 where event_name like "FOO";
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
delete from performance_schema.events_transactions_summary_by_user_by_event_name
|
||||
where count_star=1;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
delete from performance_schema.events_transactions_summary_by_user_by_event_name;
|
||||
|
||||
-- error ER_TABLEACCESS_DENIED_ERROR
|
||||
LOCK TABLES performance_schema.events_transactions_summary_by_user_by_event_name READ;
|
||||
UNLOCK TABLES;
|
||||
|
||||
-- error ER_TABLEACCESS_DENIED_ERROR
|
||||
LOCK TABLES performance_schema.events_transactions_summary_by_user_by_event_name WRITE;
|
||||
UNLOCK TABLES;
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
--disable_result_log
|
||||
select * from performance_schema.events_transactions_summary_global_by_event_name
|
||||
where event_name in ('transaction') limit 1;
|
||||
|
||||
select * from performance_schema.events_transactions_summary_global_by_event_name
|
||||
where event_name='FOO';
|
||||
--enable_result_log
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
insert into performance_schema.events_transactions_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 ER_TABLEACCESS_DENIED_ERROR
|
||||
update performance_schema.events_transactions_summary_global_by_event_name
|
||||
set count_star=12;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
update performance_schema.events_transactions_summary_global_by_event_name
|
||||
set count_star=12 where event_name like "FOO";
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
delete from performance_schema.events_transactions_summary_global_by_event_name
|
||||
where count_star=1;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
delete from performance_schema.events_transactions_summary_global_by_event_name;
|
||||
|
||||
-- error ER_TABLEACCESS_DENIED_ERROR
|
||||
LOCK TABLES performance_schema.events_transactions_summary_global_by_event_name READ;
|
||||
UNLOCK TABLES;
|
||||
|
||||
-- error ER_TABLEACCESS_DENIED_ERROR
|
||||
LOCK TABLES performance_schema.events_transactions_summary_global_by_event_name WRITE;
|
||||
UNLOCK TABLES;
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
--disable_result_log
|
||||
select * from performance_schema.events_transactions_current
|
||||
where event_name in ('transaction') limit 1;
|
||||
|
||||
select * from performance_schema.events_transactions_current
|
||||
where event_name='FOO';
|
||||
--enable_result_log
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
insert into performance_schema.events_transactions_current
|
||||
set thread_id='1', event_id=1,
|
||||
event_name='FOO', timer_start=1, timer_end=2, timer_wait=3;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
update performance_schema.events_transactions_current
|
||||
set timer_start=12;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
update performance_schema.events_transactions_current
|
||||
set timer_start=12 where thread_id=0;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
delete from performance_schema.events_transactions_current
|
||||
where thread_id=1;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
delete from performance_schema.events_transactions_current;
|
||||
|
||||
-- error ER_TABLEACCESS_DENIED_ERROR
|
||||
LOCK TABLES performance_schema.events_transactions_current READ;
|
||||
UNLOCK TABLES;
|
||||
|
||||
-- error ER_TABLEACCESS_DENIED_ERROR
|
||||
LOCK TABLES performance_schema.events_transactions_current WRITE;
|
||||
UNLOCK TABLES;
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
--disable_result_log
|
||||
select * from performance_schema.events_transactions_history
|
||||
where event_name in ('transaction') limit 1;
|
||||
|
||||
select * from performance_schema.events_transactions_history
|
||||
where event_name='FOO';
|
||||
|
||||
select * from performance_schema.events_transactions_history
|
||||
where event_name in ('transaction') order by timer_wait limit 1;
|
||||
|
||||
select * from performance_schema.events_transactions_history
|
||||
where event_name in ('transaction') order by timer_wait desc limit 1;
|
||||
--enable_result_log
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
insert into performance_schema.events_transactions_history
|
||||
set thread_id='1', event_id=1,
|
||||
event_name='FOO', timer_start=1, timer_end=2, timer_wait=3;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
update performance_schema.events_transactions_history
|
||||
set timer_start=12;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
update performance_schema.events_transactions_history
|
||||
set timer_start=12 where thread_id=0;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
delete from performance_schema.events_transactions_history
|
||||
where thread_id=1;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
delete from performance_schema.events_transactions_history;
|
||||
|
||||
-- error ER_TABLEACCESS_DENIED_ERROR
|
||||
LOCK TABLES performance_schema.events_transactions_history READ;
|
||||
UNLOCK TABLES;
|
||||
|
||||
-- error ER_TABLEACCESS_DENIED_ERROR
|
||||
LOCK TABLES performance_schema.events_transactions_history WRITE;
|
||||
UNLOCK TABLES;
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
--disable_result_log
|
||||
select * from performance_schema.events_transactions_history_long
|
||||
where event_name in ('transaction') limit 1;
|
||||
|
||||
select * from performance_schema.events_transactions_history_long
|
||||
where event_name='FOO';
|
||||
|
||||
select * from performance_schema.events_transactions_history_long
|
||||
where event_name in ('transaction') order by timer_wait limit 1;
|
||||
|
||||
select * from performance_schema.events_transactions_history_long
|
||||
where event_name in ('transaction') order by timer_wait desc limit 1;
|
||||
--enable_result_log
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
insert into performance_schema.events_transactions_history_long
|
||||
set thread_id='1', event_id=1,
|
||||
event_name='FOO', timer_start=1, timer_end=2, timer_wait=3;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
update performance_schema.events_transactions_history_long
|
||||
set timer_start=12;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
update performance_schema.events_transactions_history_long
|
||||
set timer_start=12 where thread_id=0;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
delete from performance_schema.events_transactions_history_long
|
||||
where thread_id=1;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
delete from performance_schema.events_transactions_history_long;
|
||||
|
||||
-- error ER_TABLEACCESS_DENIED_ERROR
|
||||
LOCK TABLES performance_schema.events_transactions_history_long READ;
|
||||
UNLOCK TABLES;
|
||||
|
||||
-- error ER_TABLEACCESS_DENIED_ERROR
|
||||
LOCK TABLES performance_schema.events_transactions_history_long WRITE;
|
||||
UNLOCK TABLES;
|
||||
|
||||
@@ -33,3 +33,62 @@ UNLOCK TABLES;
|
||||
LOCK TABLES performance_schema.file_instances WRITE;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--echo ###
|
||||
--echo ### Bug#26152751: INNODB LEAKS MEMORY, PERFORMANCE_SCHEMA FILE_INSTANCES
|
||||
--echo ### #SQL-IB3129987-252773.IBD
|
||||
--echo ###
|
||||
|
||||
CREATE DATABASE db_26152751;
|
||||
USE db_26152751;
|
||||
|
||||
SELECT FILE_NAME FROM performance_schema.file_instances WHERE FILE_NAME LIKE "%t_db_26152751%";
|
||||
|
||||
CREATE TABLE t_db_26152751 (a INT) ENGINE=MYISAM;
|
||||
|
||||
--replace_regex /.*\/t_db_26152751/t_db_26152751/
|
||||
SELECT FILE_NAME FROM performance_schema.file_instances WHERE FILE_NAME LIKE "%t_db_26152751%";
|
||||
|
||||
RENAME TABLE t_db_26152751 to t_db_26152751_new;
|
||||
|
||||
--replace_regex /.*\/t_db_26152751/t_db_26152751/
|
||||
SELECT FILE_NAME FROM performance_schema.file_instances WHERE FILE_NAME LIKE "%t_db_26152751%";
|
||||
|
||||
RENAME TABLE t_db_26152751_new to t_db_26152751;
|
||||
|
||||
--replace_regex /.*\/t_db_26152751/t_db_26152751/
|
||||
SELECT FILE_NAME FROM performance_schema.file_instances WHERE FILE_NAME LIKE "%t_db_26152751%";
|
||||
|
||||
ALTER TABLE t_db_26152751 ADD COLUMN b INT;
|
||||
|
||||
--replace_regex /.*\/t_db_26152751/t_db_26152751/
|
||||
SELECT FILE_NAME FROM performance_schema.file_instances WHERE FILE_NAME LIKE "%t_db_26152751%";
|
||||
|
||||
DROP TABLE t_db_26152751;
|
||||
|
||||
SELECT FILE_NAME FROM performance_schema.file_instances WHERE FILE_NAME LIKE "%t_db_26152751%";
|
||||
|
||||
CREATE TABLE t_db_26152751 (a INT) ENGINE=INNODB;
|
||||
|
||||
--replace_regex /.*\/t_db_26152751/t_db_26152751/
|
||||
SELECT FILE_NAME FROM performance_schema.file_instances WHERE FILE_NAME LIKE "%t_db_26152751%";
|
||||
|
||||
RENAME TABLE t_db_26152751 to t_db_26152751_new;
|
||||
|
||||
--replace_regex /.*\/t_db_26152751/t_db_26152751/
|
||||
SELECT FILE_NAME FROM performance_schema.file_instances WHERE FILE_NAME LIKE "%t_db_26152751%";
|
||||
|
||||
RENAME TABLE t_db_26152751_new to t_db_26152751;
|
||||
|
||||
--replace_regex /.*\/t_db_26152751/t_db_26152751/
|
||||
SELECT FILE_NAME FROM performance_schema.file_instances WHERE FILE_NAME LIKE "%t_db_26152751%";
|
||||
|
||||
ALTER TABLE t_db_26152751 ADD COLUMN b INT;
|
||||
|
||||
--replace_regex /.*\/t_db_26152751/t_db_26152751/
|
||||
SELECT FILE_NAME FROM performance_schema.file_instances WHERE FILE_NAME LIKE "%t_db_26152751%";
|
||||
|
||||
DROP TABLE t_db_26152751;
|
||||
|
||||
SELECT FILE_NAME FROM performance_schema.file_instances WHERE FILE_NAME LIKE "%t_db_26152751%";
|
||||
|
||||
DROP DATABASE db_26152751;
|
||||
|
||||
36
mysql-test/suite/perfschema/t/dml_global_status.test
Normal file
36
mysql-test/suite/perfschema/t/dml_global_status.test
Normal file
@@ -0,0 +1,36 @@
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
--disable_result_log
|
||||
select * from performance_schema.global_status
|
||||
where variable_name like 'bytes_%' limit 1;
|
||||
|
||||
select * from performance_schema.global_status
|
||||
where variable_name='FOO';
|
||||
--enable_result_log
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
insert into performance_schema.global_status
|
||||
set variable_name='FOO', variable_value='BAR';
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
update performance_schema.global_status
|
||||
set variable_name='FOO', variable_value='BAR';
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
delete from performance_schema.global_status
|
||||
where variable_name <> 'FOO';
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
delete from performance_schema.global_status;
|
||||
|
||||
-- error ER_TABLEACCESS_DENIED_ERROR
|
||||
LOCK TABLES performance_schema.global_status READ;
|
||||
UNLOCK TABLES;
|
||||
|
||||
-- error ER_TABLEACCESS_DENIED_ERROR
|
||||
LOCK TABLES performance_schema.global_status WRITE;
|
||||
UNLOCK TABLES;
|
||||
|
||||
36
mysql-test/suite/perfschema/t/dml_global_variables.test
Normal file
36
mysql-test/suite/perfschema/t/dml_global_variables.test
Normal file
@@ -0,0 +1,36 @@
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
--disable_result_log
|
||||
select * from performance_schema.global_variables
|
||||
where variable_name like 'autocommit%' limit 1;
|
||||
|
||||
select * from performance_schema.global_variables
|
||||
where variable_name='FOO';
|
||||
--enable_result_log
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
insert into performance_schema.global_variables
|
||||
set variable_name='FOO', variable_value='BAR';
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
update performance_schema.global_variables
|
||||
set variable_name='FOO', variable_value='BAR';
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
delete from performance_schema.global_variables
|
||||
where variable_name <> 'FOO';
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
delete from performance_schema.global_variables;
|
||||
|
||||
-- error ER_TABLEACCESS_DENIED_ERROR
|
||||
LOCK TABLES performance_schema.global_variables READ;
|
||||
UNLOCK TABLES;
|
||||
|
||||
-- error ER_TABLEACCESS_DENIED_ERROR
|
||||
LOCK TABLES performance_schema.global_variables WRITE;
|
||||
UNLOCK TABLES;
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
--disable_result_log
|
||||
select * from performance_schema.memory_summary_by_account_by_event_name
|
||||
where event_name like 'memory/%' limit 1;
|
||||
|
||||
select * from performance_schema.memory_summary_by_account_by_event_name
|
||||
where event_name='FOO';
|
||||
--enable_result_log
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
insert into performance_schema.memory_summary_by_account_by_event_name
|
||||
set event_name='FOO', user='BAR', host='BAZ',
|
||||
count_alloc=1, count_free=2, sum_number_of_bytes_alloc=3,
|
||||
sum_number_of_bytes_free=4, low_count_used=5;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
update performance_schema.memory_summary_by_account_by_event_name
|
||||
set count_alloc=12;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
update performance_schema.memory_summary_by_account_by_event_name
|
||||
set count_alloc=12 where event_name like "FOO";
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
delete from performance_schema.memory_summary_by_account_by_event_name
|
||||
where count_alloc=1;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
delete from performance_schema.memory_summary_by_account_by_event_name;
|
||||
|
||||
-- error ER_TABLEACCESS_DENIED_ERROR
|
||||
LOCK TABLES performance_schema.memory_summary_by_account_by_event_name READ;
|
||||
UNLOCK TABLES;
|
||||
|
||||
-- error ER_TABLEACCESS_DENIED_ERROR
|
||||
LOCK TABLES performance_schema.memory_summary_by_account_by_event_name WRITE;
|
||||
UNLOCK TABLES;
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
--disable_result_log
|
||||
select * from performance_schema.memory_summary_by_host_by_event_name
|
||||
where event_name like 'memory/%' limit 1;
|
||||
|
||||
select * from performance_schema.memory_summary_by_host_by_event_name
|
||||
where event_name='FOO';
|
||||
--enable_result_log
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
insert into performance_schema.memory_summary_by_host_by_event_name
|
||||
set event_name='FOO', host='BAZ',
|
||||
count_alloc=1, count_free=2, sum_number_of_bytes_alloc=3,
|
||||
sum_number_of_bytes_free=4, low_count_used=5;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
update performance_schema.memory_summary_by_host_by_event_name
|
||||
set count_alloc=12;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
update performance_schema.memory_summary_by_host_by_event_name
|
||||
set count_alloc=12 where event_name like "FOO";
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
delete from performance_schema.memory_summary_by_host_by_event_name
|
||||
where count_alloc=1;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
delete from performance_schema.memory_summary_by_host_by_event_name;
|
||||
|
||||
-- error ER_TABLEACCESS_DENIED_ERROR
|
||||
LOCK TABLES performance_schema.memory_summary_by_host_by_event_name READ;
|
||||
UNLOCK TABLES;
|
||||
|
||||
-- error ER_TABLEACCESS_DENIED_ERROR
|
||||
LOCK TABLES performance_schema.memory_summary_by_host_by_event_name WRITE;
|
||||
UNLOCK TABLES;
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
--disable_result_log
|
||||
select * from performance_schema.memory_summary_by_thread_by_event_name
|
||||
where event_name like 'memory/%' limit 1;
|
||||
|
||||
select * from performance_schema.memory_summary_by_thread_by_event_name
|
||||
where event_name='FOO';
|
||||
--enable_result_log
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
insert into performance_schema.memory_summary_by_thread_by_event_name
|
||||
set event_name='FOO', thread_id=12,
|
||||
count_alloc=1, count_free=2, sum_number_of_bytes_alloc=3,
|
||||
sum_number_of_bytes_free=4, low_count_used=5;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
update performance_schema.memory_summary_by_thread_by_event_name
|
||||
set count_alloc=12;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
update performance_schema.memory_summary_by_thread_by_event_name
|
||||
set count_alloc=12 where event_name like "FOO";
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
delete from performance_schema.memory_summary_by_thread_by_event_name
|
||||
where count_alloc=1;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
delete from performance_schema.memory_summary_by_thread_by_event_name;
|
||||
|
||||
-- error ER_TABLEACCESS_DENIED_ERROR
|
||||
LOCK TABLES performance_schema.memory_summary_by_thread_by_event_name READ;
|
||||
UNLOCK TABLES;
|
||||
|
||||
-- error ER_TABLEACCESS_DENIED_ERROR
|
||||
LOCK TABLES performance_schema.memory_summary_by_thread_by_event_name WRITE;
|
||||
UNLOCK TABLES;
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
--disable_result_log
|
||||
select * from performance_schema.memory_summary_by_user_by_event_name
|
||||
where event_name like 'memory/%' limit 1;
|
||||
|
||||
select * from performance_schema.memory_summary_by_user_by_event_name
|
||||
where event_name='FOO';
|
||||
--enable_result_log
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
insert into performance_schema.memory_summary_by_user_by_event_name
|
||||
set event_name='FOO', user='BAR',
|
||||
count_alloc=1, count_free=2, sum_number_of_bytes_alloc=3,
|
||||
sum_number_of_bytes_free=4, low_count_used=5;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
update performance_schema.memory_summary_by_user_by_event_name
|
||||
set count_alloc=12;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
update performance_schema.memory_summary_by_user_by_event_name
|
||||
set count_alloc=12 where event_name like "FOO";
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
delete from performance_schema.memory_summary_by_user_by_event_name
|
||||
where count_alloc=1;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
delete from performance_schema.memory_summary_by_user_by_event_name;
|
||||
|
||||
-- error ER_TABLEACCESS_DENIED_ERROR
|
||||
LOCK TABLES performance_schema.memory_summary_by_user_by_event_name READ;
|
||||
UNLOCK TABLES;
|
||||
|
||||
-- error ER_TABLEACCESS_DENIED_ERROR
|
||||
LOCK TABLES performance_schema.memory_summary_by_user_by_event_name WRITE;
|
||||
UNLOCK TABLES;
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
--disable_result_log
|
||||
select * from performance_schema.memory_summary_global_by_event_name
|
||||
where event_name like 'memory/%' limit 1;
|
||||
|
||||
select * from performance_schema.memory_summary_global_by_event_name
|
||||
where event_name='FOO';
|
||||
--enable_result_log
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
insert into performance_schema.memory_summary_global_by_event_name
|
||||
set event_name='FOO',
|
||||
count_alloc=1, count_free=2, sum_number_of_bytes_alloc=3,
|
||||
sum_number_of_bytes_free=4, low_count_used=5;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
update performance_schema.memory_summary_global_by_event_name
|
||||
set count_alloc=12;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
update performance_schema.memory_summary_global_by_event_name
|
||||
set count_alloc=12 where event_name like "FOO";
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
delete from performance_schema.memory_summary_global_by_event_name
|
||||
where count_alloc=1;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
delete from performance_schema.memory_summary_global_by_event_name;
|
||||
|
||||
-- error ER_TABLEACCESS_DENIED_ERROR
|
||||
LOCK TABLES performance_schema.memory_summary_global_by_event_name READ;
|
||||
UNLOCK TABLES;
|
||||
|
||||
-- error ER_TABLEACCESS_DENIED_ERROR
|
||||
LOCK TABLES performance_schema.memory_summary_global_by_event_name WRITE;
|
||||
UNLOCK TABLES;
|
||||
|
||||
35
mysql-test/suite/perfschema/t/dml_metadata_locks.test
Normal file
35
mysql-test/suite/perfschema/t/dml_metadata_locks.test
Normal file
@@ -0,0 +1,35 @@
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
--disable_result_log
|
||||
select * from performance_schema.metadata_locks;
|
||||
--enable_result_log
|
||||
|
||||
select * from performance_schema.metadata_locks
|
||||
where object_name='foo';
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
insert into performance_schema.metadata_locks
|
||||
set object_name='FOO', owner_thread_id=1;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
update performance_schema.metadata_locks
|
||||
set owner_thread_id=12 where object_name='foo';
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
delete from performance_schema.metadata_locks;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
delete from performance_schema.metadata_locks
|
||||
where timer_name='CYCLE';
|
||||
|
||||
-- error ER_TABLEACCESS_DENIED_ERROR
|
||||
LOCK TABLES performance_schema.metadata_locks READ;
|
||||
UNLOCK TABLES;
|
||||
|
||||
-- error ER_TABLEACCESS_DENIED_ERROR
|
||||
LOCK TABLES performance_schema.metadata_locks WRITE;
|
||||
UNLOCK TABLES;
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
# This line and the line below is a temporary line for tests that do not need MyISAM in future, but need to be kept for tests that need it.
|
||||
--source include/have_myisam.inc
|
||||
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
#--disable_result_log
|
||||
select * from performance_schema.prepared_statements_instances
|
||||
where owner_object_name like 'XXYYZZ%' limit 1;
|
||||
|
||||
select * from performance_schema.prepared_statements_instances
|
||||
where owner_object_name='XXYYZZ';
|
||||
#--enable_result_log
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
insert into performance_schema.prepared_statements_instances
|
||||
set owner_object_name='XXYYZZ', count_execute=1, sum_timer_execute=2,
|
||||
min_timer_execute=3, avg_timer_execute=4, max_timer_execute=5;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
update performance_schema.prepared_statements_instances set count_execute=12;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
update performance_schema.prepared_statements_instances
|
||||
set count_execute=12 where owner_object_name like "XXYYZZ";
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
delete from performance_schema.prepared_statements_instances
|
||||
where count_execute=1;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
delete from performance_schema.prepared_statements_instances;
|
||||
|
||||
-- error ER_TABLEACCESS_DENIED_ERROR
|
||||
LOCK TABLES performance_schema.prepared_statements_instances READ;
|
||||
UNLOCK TABLES;
|
||||
|
||||
-- error ER_TABLEACCESS_DENIED_ERROR
|
||||
LOCK TABLES performance_schema.prepared_statements_instances WRITE;
|
||||
UNLOCK TABLES;
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
# This test verifies the correct behaviour in case of invalid
|
||||
# usage of DMLs on the table replication_applier_configuration.
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
--disable_result_log
|
||||
SELECT * FROM performance_schema.replication_applier_configuration
|
||||
LIMIT 1;
|
||||
|
||||
sELECT * FROM performance_schema.replication_applier_configuration
|
||||
WHERE desired_delay=12;
|
||||
--enable_result_log
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
INSERT INTO performance_schema.replication_applier_configuration
|
||||
SET desired_delay=2;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
UPDATE performance_schema.replication_applier_configuration
|
||||
SET desired_delay=12 WHERE desired_delay=2;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
DELETE FROM performance_schema.replication_applier_configuration
|
||||
WHERE desired_delay=12;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
DELETE FROM performance_schema.replication_applier_configuration;
|
||||
|
||||
-- error ER_TABLEACCESS_DENIED_ERROR
|
||||
LOCK TABLES performance_schema.replication_applier_configuration READ;
|
||||
UNLOCK TABLES;
|
||||
|
||||
-- error ER_TABLEACCESS_DENIED_ERROR
|
||||
LOCK TABLES performance_schema.replication_applier_configuration WRITE;
|
||||
UNLOCK TABLES;
|
||||
@@ -0,0 +1,42 @@
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
# This test verifies the correct behaviour in case of invalid
|
||||
# usage of DMLs on the table replication_applier_status.
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
--disable_result_log
|
||||
SELECT * FROM performance_schema.replication_applier_status
|
||||
LIMIT 1;
|
||||
|
||||
SELECT * FROM performance_schema.replication_applier_status
|
||||
WHERE service_state='YES' OR remaining_delay=12;
|
||||
--enable_result_log
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
INSERT INTO performance_schema.replication_applier_status
|
||||
SET service_state='YES', remaining_delay=12;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
UPDATE performance_schema.replication_applier_status
|
||||
SET remaining_delay=12;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
UPDATE performance_schema.replication_applier_status
|
||||
SET remaining_delay=12 WHERE service_state='YES';
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
DELETE FROM performance_schema.replication_applier_status
|
||||
WHERE service_state='YES';
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
DELETE FROM performance_schema.replication_applier_status;
|
||||
|
||||
-- error ER_TABLEACCESS_DENIED_ERROR
|
||||
LOCK TABLES performance_schema.replication_applier_status READ;
|
||||
UNLOCK TABLES;
|
||||
|
||||
-- error ER_TABLEACCESS_DENIED_ERROR
|
||||
LOCK TABLES performance_schema.replication_applier_status WRITE;
|
||||
UNLOCK TABLES;
|
||||
@@ -0,0 +1,43 @@
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
# This test verifies the correct behaviour in case of invalid
|
||||
# usage of DMLs on the table replication_applier_status_by_coordinator
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
--disable_result_log
|
||||
SELECT * FROM performance_schema.replication_applier_status_by_coordinator
|
||||
LIMIT 1;
|
||||
|
||||
SELECT * FROM performance_schema.replication_applier_status_by_coordinator
|
||||
WHERE service_state='YES' or last_error_message='ERROR';
|
||||
--enable_result_log
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
INSERT INTO performance_schema.replication_applier_status_by_coordinator
|
||||
SET service_state='YES', last_error_message='ERROR', thread_id=2,
|
||||
last_error_number=1234;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
UPDATE performance_schema.replication_applier_status_by_coordinator
|
||||
SET last_error_number=1234;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
UPDATE performance_schema.replication_applier_status_by_coordinator
|
||||
SET last_error_number=1234 where service_state like "YES";
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
DELETE FROM performance_schema.replication_applier_status_by_coordinator
|
||||
WHERE thread_id=1;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
DELETE FROM performance_schema.replication_applier_status_by_coordinator;
|
||||
|
||||
-- error ER_TABLEACCESS_DENIED_ERROR
|
||||
LOCK TABLES performance_schema.replication_applier_status_by_coordinator READ;
|
||||
UNLOCK TABLES;
|
||||
|
||||
-- error ER_TABLEACCESS_DENIED_ERROR
|
||||
LOCK TABLES performance_schema.replication_applier_status_by_coordinator WRITE;
|
||||
UNLOCK TABLES;
|
||||
@@ -0,0 +1,43 @@
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
# This test verifies the correct behaviour in case of invalid
|
||||
# usage of DMLs on the table replication_applier_status_by_worker.
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
--disable_result_log
|
||||
SELECT * FROM performance_schema.replication_applier_status_by_worker
|
||||
LIMIT 1;
|
||||
|
||||
SELECT * FROM performance_schema.replication_applier_status_by_worker
|
||||
WHERE service_state='YES' OR last_error_message='ERROR';
|
||||
--enable_result_log
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
INSERT INTO performance_schema.replication_applier_status_by_worker
|
||||
SET service_state='YES', last_error_message='ERROR',
|
||||
worker_id=1, thread_id=2, last_error_number=1234;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
UPDATE performance_schema.replication_applier_status_by_worker
|
||||
SET worker_id=12;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
UPDATE performance_schema.replication_applier_status_by_worker
|
||||
SET worker_d=12 where service_state like "YES";
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
DELETE FROM performance_schema.replication_applier_status_by_worker
|
||||
WHERE worker_id=1;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
DELETE FROM performance_schema.replication_applier_status_by_worker;
|
||||
|
||||
-- error ER_TABLEACCESS_DENIED_ERROR
|
||||
LOCK TABLES performance_schema.replication_applier_status_by_worker READ;
|
||||
UNLOCK TABLES;
|
||||
|
||||
-- error ER_TABLEACCESS_DENIED_ERROR
|
||||
LOCK TABLES performance_schema.replication_applier_status_by_worker WRITE;
|
||||
UNLOCK TABLES;
|
||||
@@ -0,0 +1,43 @@
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
# This test verifies the correct behaviour in case of invalid
|
||||
# usage of DMLs on the table replication_connection_configuration.
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
--disable_result_log
|
||||
SELECT * FROM performance_schema.replication_connection_configuration
|
||||
LIMIT 1;
|
||||
|
||||
SELECT * FROM performance_schema.replication_connection_configuration
|
||||
WHERE user='FOO' or host='BAR';
|
||||
--enable_result_log
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
INSERT INTO performance_schema.replication_connection_configuration
|
||||
SET user='FOO', host='BAR',
|
||||
port=1, connection_retry_count=2;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
UPDATE performance_schema.replication_connection_configuration
|
||||
SET connection_retry_interval=12;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
UPDATE performance_schema.replication_connection_configuration
|
||||
SET connection_retry_interval=12 WHERE host LIKE "FOO";
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
DELETE FROM performance_schema.replication_connection_configuration
|
||||
WHERE connection_retry_count=1;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
DELETE FROM performance_schema.replication_connection_configuration;
|
||||
|
||||
-- error ER_TABLEACCESS_DENIED_ERROR
|
||||
LOCK TABLES performance_schema.replication_connection_configuration READ;
|
||||
UNLOCK TABLES;
|
||||
|
||||
-- error ER_TABLEACCESS_DENIED_ERROR
|
||||
LOCK TABLES performance_schema.replication_connection_configuration WRITE;
|
||||
UNLOCK TABLES;
|
||||
@@ -0,0 +1,43 @@
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
# This test verifies the correct behaviour in case of invalid
|
||||
# usage of DMLs on the table replication_connection_status.
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
--disable_result_log
|
||||
SELECT * FROM performance_schema.replication_connection_status
|
||||
LIMIT 1;
|
||||
|
||||
SELECT * FROM performance_schema.replication_connection_status
|
||||
WHERE received_transaction_set='FOO' OR last_error_message='BAR';
|
||||
--enable_result_log
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
INSERT INTO performance_schema.replication_connection_status
|
||||
SET received_transaction_set='FOO', last_error_message='BAR',
|
||||
thread_id=1, last_error_number=2;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
UPDATE performance_schema.replication_connection_status
|
||||
SET last_error_number=12;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
UPDATE performance_schema.replication_connection_status
|
||||
SET thread_id=12 WHERE received_transaction_set like "FOO";
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
DELETE FROM performance_schema.replication_connection_status
|
||||
WHERE last_error_number=1;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
DELETE FROM performance_schema.replication_connection_status;
|
||||
|
||||
-- error ER_TABLEACCESS_DENIED_ERROR
|
||||
LOCK TABLES performance_schema.replication_connection_status READ;
|
||||
UNLOCK TABLES;
|
||||
|
||||
-- error ER_TABLEACCESS_DENIED_ERROR
|
||||
LOCK TABLES performance_schema.replication_connection_status WRITE;
|
||||
UNLOCK TABLES;
|
||||
@@ -0,0 +1,38 @@
|
||||
# This test verifies the correct behaviour in case of invalid
|
||||
# usage of DMLs on the table replication_group_member_stats
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
SELECT * FROM performance_schema.replication_group_member_stats
|
||||
LIMIT 1;
|
||||
|
||||
SELECT * FROM performance_schema.replication_group_member_stats
|
||||
WHERE channel_name='FOO';
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
INSERT INTO performance_schema.replication_group_member_stats
|
||||
SET channel_name='FOO', node_id=1;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
UPDATE performance_schema.replication_group_member_stats
|
||||
SET member_id=12;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
UPDATE performance_schema.replication_group_member_stats
|
||||
SET member_id=12 WHERE group_name LIKE "FOO";
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
DELETE FROM performance_schema.replication_group_member_stats
|
||||
WHERE member_id=1;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
DELETE FROM performance_schema.replication_group_member_stats;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
LOCK TABLES performance_schema.replication_group_member_stats READ;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
LOCK TABLES performance_schema.replication_group_member_stats WRITE;
|
||||
UNLOCK TABLES;
|
||||
@@ -0,0 +1,40 @@
|
||||
# This test verifies the correct behaviour in case of invalid
|
||||
# usage of DMLs on the table replication_group_members.
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
--disable_result_log
|
||||
SELECT * FROM performance_schema.replication_group_members
|
||||
LIMIT 1;
|
||||
|
||||
SELECT * FROM performance_schema.replication_group_members
|
||||
WHERE channel_name='FOO';
|
||||
--enable_result_log
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
INSERT INTO performance_schema.replication_group_members
|
||||
SET channel_name='FOO', member_id=1;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
UPDATE performance_schema.replication_group_members
|
||||
SET member_id=12;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
UPDATE performance_schema.replication_group_members
|
||||
SET member_id=12 WHERE channel_name LIKE "FOO";
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
DELETE FROM performance_schema.replication_group_members
|
||||
WHERE member_id=1;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
DELETE FROM performance_schema.replication_group_members;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
LOCK TABLES performance_schema.replication_group_members READ;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
LOCK TABLES performance_schema.replication_group_members WRITE;
|
||||
UNLOCK TABLES;
|
||||
36
mysql-test/suite/perfschema/t/dml_session_status.test
Normal file
36
mysql-test/suite/perfschema/t/dml_session_status.test
Normal file
@@ -0,0 +1,36 @@
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
--disable_result_log
|
||||
select * from performance_schema.session_status
|
||||
where variable_name like 'bytes_%' limit 1;
|
||||
|
||||
select * from performance_schema.session_status
|
||||
where variable_name='FOO';
|
||||
--enable_result_log
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
insert into performance_schema.session_status
|
||||
set variable_name='FOO', variable_value='BAR';
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
update performance_schema.session_status
|
||||
set variable_name='FOO', variable_value='BAR';
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
delete from performance_schema.session_status
|
||||
where variable_name <> 'FOO';
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
delete from performance_schema.session_status;
|
||||
|
||||
-- error ER_TABLEACCESS_DENIED_ERROR
|
||||
LOCK TABLES performance_schema.session_status READ;
|
||||
UNLOCK TABLES;
|
||||
|
||||
-- error ER_TABLEACCESS_DENIED_ERROR
|
||||
LOCK TABLES performance_schema.session_status WRITE;
|
||||
UNLOCK TABLES;
|
||||
|
||||
36
mysql-test/suite/perfschema/t/dml_session_variables.test
Normal file
36
mysql-test/suite/perfschema/t/dml_session_variables.test
Normal file
@@ -0,0 +1,36 @@
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
--disable_result_log
|
||||
select * from performance_schema.session_variables
|
||||
where variable_name like 'bytes_%' limit 1;
|
||||
|
||||
select * from performance_schema.session_variables
|
||||
where variable_name='FOO';
|
||||
--enable_result_log
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
insert into performance_schema.session_variables
|
||||
set variable_name='FOO', variable_value='BAR';
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
update performance_schema.session_variables
|
||||
set variable_name='FOO', variable_value='BAR';
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
delete from performance_schema.session_variables
|
||||
where variable_name <> 'FOO';
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
delete from performance_schema.session_variables;
|
||||
|
||||
-- error ER_TABLEACCESS_DENIED_ERROR
|
||||
LOCK TABLES performance_schema.session_variables READ;
|
||||
UNLOCK TABLES;
|
||||
|
||||
-- error ER_TABLEACCESS_DENIED_ERROR
|
||||
LOCK TABLES performance_schema.session_variables WRITE;
|
||||
UNLOCK TABLES;
|
||||
|
||||
@@ -10,6 +10,16 @@ drop table if exists test.setup_actors;
|
||||
# Save the setup
|
||||
create table test.setup_actors as
|
||||
select * from performance_schema.setup_actors;
|
||||
|
||||
# Inserting Duplicate values in the table should
|
||||
# throw error
|
||||
--error ER_DUP_KEY
|
||||
insert into performance_schema.setup_actors
|
||||
values ('%','%','%','YES', 'YES');
|
||||
--error ER_DUP_KEY
|
||||
insert into performance_schema.setup_actors
|
||||
values ('%','%','%','NO', 'NO');
|
||||
|
||||
truncate table performance_schema.setup_actors;
|
||||
|
||||
select * from performance_schema.setup_actors;
|
||||
@@ -29,6 +39,16 @@ insert into performance_schema.setup_actors
|
||||
insert into performance_schema.setup_actors
|
||||
set user='%', host='%';
|
||||
|
||||
# Insert with wrong value for ENABLED column
|
||||
--error 1265
|
||||
insert into performance_schema.setup_actors
|
||||
values ('localhost', 'user1', '%', 'NO%', 'NO');
|
||||
|
||||
# Insert with wrong value for HISTORY column
|
||||
--error 1265
|
||||
insert into performance_schema.setup_actors
|
||||
values ('localhost', 'user1', '%', 'NO', 'KO');
|
||||
|
||||
select * from performance_schema.setup_actors
|
||||
order by USER, HOST;
|
||||
|
||||
@@ -44,6 +64,44 @@ update performance_schema.setup_actors
|
||||
update performance_schema.setup_actors
|
||||
set role='ILLEGAL';
|
||||
|
||||
# update on ENABLED column is allowed
|
||||
update performance_schema.setup_actors
|
||||
set ENABLED='YES';
|
||||
|
||||
# update on HISTORY column is allowed
|
||||
update performance_schema.setup_actors
|
||||
set HISTORY='YES';
|
||||
|
||||
# update on ENABLED column with wrong values
|
||||
#throws error
|
||||
--error 1265
|
||||
update performance_schema.setup_actors
|
||||
set ENABLED='';
|
||||
|
||||
--error 1265
|
||||
update performance_schema.setup_actors
|
||||
set ENABLED='YESS';
|
||||
|
||||
--error 1265
|
||||
update performance_schema.setup_actors
|
||||
set ENABLED='NO%';
|
||||
|
||||
--error ER_BAD_NULL_ERROR
|
||||
update performance_schema.setup_actors
|
||||
set ENABLED=NULL;
|
||||
|
||||
--error 1265
|
||||
update performance_schema.setup_actors
|
||||
set HISTORY='YESS';
|
||||
|
||||
--error 1265
|
||||
update performance_schema.setup_actors
|
||||
set HISTORY='NO%';
|
||||
|
||||
--error ER_BAD_NULL_ERROR
|
||||
update performance_schema.setup_actors
|
||||
set HISTORY=NULL;
|
||||
|
||||
select * from performance_schema.setup_actors
|
||||
order by USER, HOST;
|
||||
|
||||
@@ -64,6 +122,17 @@ UNLOCK TABLES;
|
||||
LOCK TABLES performance_schema.setup_actors WRITE;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--echo #
|
||||
--echo # WL#2284: Increase the length of a user name
|
||||
--echo #
|
||||
|
||||
insert into performance_schema.setup_actors
|
||||
set user='user_name_len_22_01234', host='localhost';
|
||||
|
||||
delete from performance_schema.setup_actors
|
||||
where user = 'user_name_len_22_01234' and host = 'localhost';
|
||||
|
||||
|
||||
# Restore the setup
|
||||
truncate table performance_schema.setup_actors;
|
||||
insert into performance_schema.setup_actors
|
||||
|
||||
@@ -33,12 +33,17 @@ select * from performance_schema.setup_instruments
|
||||
|
||||
# COND_handler_count is dependent on the build (Windows only)
|
||||
# DEBUG_SYNC::cond is dependent on the build (DEBUG only)
|
||||
# COND_main_thread_in_use is dependent on the build (non Windows)
|
||||
# COND_start_signal_handler is dependent on the build (non Windows)
|
||||
|
||||
select * from performance_schema.setup_instruments
|
||||
where name like 'Wait/Synch/Cond/sql/%'
|
||||
and name not in (
|
||||
'wait/synch/cond/sql/COND_open',
|
||||
'wait/synch/cond/sql/COND_handler_count',
|
||||
'wait/synch/cond/sql/DEBUG_SYNC::cond')
|
||||
'wait/synch/cond/sql/DEBUG_SYNC::cond',
|
||||
'wait/synch/cond/sql/COND_socket_listener_active',
|
||||
'wait/synch/cond/sql/COND_start_signal_handler')
|
||||
order by name limit 10;
|
||||
|
||||
--disable_result_log
|
||||
@@ -92,9 +97,7 @@ UNLOCK TABLES;
|
||||
UPDATE performance_schema.setup_instruments SET timed='NO'
|
||||
ORDER BY RAND();
|
||||
|
||||
# MTR is configured to start with everything set to ON,
|
||||
# so we need to restore it after the previous update
|
||||
--disable_query_log
|
||||
update performance_schema.setup_instruments set timed='YES';
|
||||
--enable_query_log
|
||||
# Test cleanup
|
||||
|
||||
update performance_schema.setup_instruments
|
||||
set enabled='YES', TIMED='YES';
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
--disable_warnings
|
||||
drop table if exists test.setup_objects;
|
||||
--enable_warnings
|
||||
|
||||
SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
|
||||
# Save the setup
|
||||
create table test.setup_objects as
|
||||
select * from performance_schema.setup_objects;
|
||||
@@ -93,4 +93,4 @@ truncate table performance_schema.setup_objects;
|
||||
insert into performance_schema.setup_objects
|
||||
select * from test.setup_objects;
|
||||
drop table test.setup_objects;
|
||||
|
||||
SET sql_mode = default;
|
||||
|
||||
@@ -11,6 +11,8 @@ update performance_schema.setup_timers
|
||||
set timer_name='NANOSECOND' where name="stage";
|
||||
update performance_schema.setup_timers
|
||||
set timer_name='NANOSECOND' where name="statement";
|
||||
update performance_schema.setup_timers
|
||||
set timer_name='MICROSECOND' where name="transaction";
|
||||
update performance_schema.setup_timers
|
||||
set timer_name='MICROSECOND' where name="idle";
|
||||
|
||||
@@ -59,6 +61,8 @@ update performance_schema.setup_timers
|
||||
set timer_name='NANOSECOND' where name="stage";
|
||||
update performance_schema.setup_timers
|
||||
set timer_name='NANOSECOND' where name="statement";
|
||||
update performance_schema.setup_timers
|
||||
set timer_name='MICROSECOND' where name="transaction";
|
||||
update performance_schema.setup_timers
|
||||
set timer_name='MICROSECOND' where name="idle";
|
||||
|
||||
|
||||
40
mysql-test/suite/perfschema/t/dml_status_by_account.test
Normal file
40
mysql-test/suite/perfschema/t/dml_status_by_account.test
Normal file
@@ -0,0 +1,40 @@
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
--disable_result_log
|
||||
select * from performance_schema.status_by_account
|
||||
where variable_name like 'bytes_%' limit 1;
|
||||
|
||||
select * from performance_schema.status_by_account
|
||||
where variable_name='FOO';
|
||||
--enable_result_log
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
insert into performance_schema.status_by_account
|
||||
set user='USER', host='HOST', variable_name='FOO', variable_value='BAR';
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
update performance_schema.status_by_account
|
||||
set variable_name='FOO', variable_value='BAR';
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
update performance_schema.status_by_account
|
||||
set variable_name='FOO' where user <> 'USER';
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
delete from performance_schema.status_by_account
|
||||
where user <> 'USER';
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
delete from performance_schema.status_by_account;
|
||||
|
||||
-- error ER_TABLEACCESS_DENIED_ERROR
|
||||
LOCK TABLES performance_schema.status_by_account READ;
|
||||
UNLOCK TABLES;
|
||||
|
||||
-- error ER_TABLEACCESS_DENIED_ERROR
|
||||
LOCK TABLES performance_schema.status_by_account WRITE;
|
||||
UNLOCK TABLES;
|
||||
|
||||
40
mysql-test/suite/perfschema/t/dml_status_by_host.test
Normal file
40
mysql-test/suite/perfschema/t/dml_status_by_host.test
Normal file
@@ -0,0 +1,40 @@
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
--disable_result_log
|
||||
select * from performance_schema.status_by_host
|
||||
where variable_name like 'bytes_%' limit 1;
|
||||
|
||||
select * from performance_schema.status_by_host
|
||||
where variable_name='FOO';
|
||||
--enable_result_log
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
insert into performance_schema.status_by_host
|
||||
set host='HOST', variable_name='FOO', variable_value='BAR';
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
update performance_schema.status_by_host
|
||||
set variable_name='FOO', variable_value='BAR';
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
update performance_schema.status_by_host
|
||||
set variable_name='FOO' where host <> 'HOST';
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
delete from performance_schema.status_by_host
|
||||
where host <> 'HOST';
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
delete from performance_schema.status_by_host;
|
||||
|
||||
-- error ER_TABLEACCESS_DENIED_ERROR
|
||||
LOCK TABLES performance_schema.status_by_host READ;
|
||||
UNLOCK TABLES;
|
||||
|
||||
-- error ER_TABLEACCESS_DENIED_ERROR
|
||||
LOCK TABLES performance_schema.status_by_host WRITE;
|
||||
UNLOCK TABLES;
|
||||
|
||||
40
mysql-test/suite/perfschema/t/dml_status_by_thread.test
Normal file
40
mysql-test/suite/perfschema/t/dml_status_by_thread.test
Normal file
@@ -0,0 +1,40 @@
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
--disable_result_log
|
||||
select * from performance_schema.status_by_thread
|
||||
where variable_name like 'bytes_%' limit 1;
|
||||
|
||||
select * from performance_schema.status_by_thread
|
||||
where variable_name='FOO';
|
||||
--enable_result_log
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
insert into performance_schema.status_by_thread
|
||||
set thread_id=1, variable_name='FOO', variable_value='BAR';
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
update performance_schema.status_by_thread
|
||||
set variable_name='FOO', variable_value='BAR';
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
update performance_schema.status_by_thread
|
||||
set variable_name='FOO' where thread_id=0;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
delete from performance_schema.status_by_thread
|
||||
where thread_id=1;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
delete from performance_schema.status_by_thread;
|
||||
|
||||
-- error ER_TABLEACCESS_DENIED_ERROR
|
||||
LOCK TABLES performance_schema.status_by_thread READ;
|
||||
UNLOCK TABLES;
|
||||
|
||||
-- error ER_TABLEACCESS_DENIED_ERROR
|
||||
LOCK TABLES performance_schema.status_by_thread WRITE;
|
||||
UNLOCK TABLES;
|
||||
|
||||
40
mysql-test/suite/perfschema/t/dml_status_by_user.test
Normal file
40
mysql-test/suite/perfschema/t/dml_status_by_user.test
Normal file
@@ -0,0 +1,40 @@
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
--disable_result_log
|
||||
select * from performance_schema.status_by_user
|
||||
where variable_name like 'bytes_%' limit 1;
|
||||
|
||||
select * from performance_schema.status_by_user
|
||||
where variable_name='FOO';
|
||||
--enable_result_log
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
insert into performance_schema.status_by_user
|
||||
set user='USER', variable_name='FOO', variable_value='BAR';
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
update performance_schema.status_by_user
|
||||
set variable_name='FOO', variable_value='BAR';
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
update performance_schema.status_by_user
|
||||
set variable_name='FOO' where user <> 'USER';
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
delete from performance_schema.status_by_user
|
||||
where user <> 'USER';
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
delete from performance_schema.status_by_user;
|
||||
|
||||
-- error ER_TABLEACCESS_DENIED_ERROR
|
||||
LOCK TABLES performance_schema.status_by_user READ;
|
||||
UNLOCK TABLES;
|
||||
|
||||
-- error ER_TABLEACCESS_DENIED_ERROR
|
||||
LOCK TABLES performance_schema.status_by_user WRITE;
|
||||
UNLOCK TABLES;
|
||||
|
||||
35
mysql-test/suite/perfschema/t/dml_table_handles.test
Normal file
35
mysql-test/suite/perfschema/t/dml_table_handles.test
Normal file
@@ -0,0 +1,35 @@
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
--disable_result_log
|
||||
select * from performance_schema.table_handles;
|
||||
--enable_result_log
|
||||
|
||||
select * from performance_schema.table_handles
|
||||
where object_name='foo';
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
insert into performance_schema.table_handles
|
||||
set object_name='FOO', owner_event_id=1;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
update performance_schema.table_handles
|
||||
set owner_event_id=12 where object_name='foo';
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
delete from performance_schema.table_handles;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
delete from performance_schema.table_handles
|
||||
where timer_name='CYCLE';
|
||||
|
||||
-- error ER_TABLEACCESS_DENIED_ERROR
|
||||
LOCK TABLES performance_schema.table_handles READ;
|
||||
UNLOCK TABLES;
|
||||
|
||||
-- error ER_TABLEACCESS_DENIED_ERROR
|
||||
LOCK TABLES performance_schema.table_handles WRITE;
|
||||
UNLOCK TABLES;
|
||||
|
||||
48
mysql-test/suite/perfschema/t/dml_uvar_by_thread.test
Normal file
48
mysql-test/suite/perfschema/t/dml_uvar_by_thread.test
Normal file
@@ -0,0 +1,48 @@
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
--disable_result_log
|
||||
select * from performance_schema.user_variables_by_thread
|
||||
where variable_name like 'foo%' limit 1;
|
||||
|
||||
select * from performance_schema.user_variables_by_thread
|
||||
where variable_name='FOO';
|
||||
--enable_result_log
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
insert into performance_schema.user_variables_by_thread
|
||||
set thread_id=12, variable_name='foo', variable_value='bar';
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
update performance_schema.user_variables_by_thread
|
||||
set thread_id=12;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
update performance_schema.user_variables_by_thread
|
||||
set thread_id=12 where variable_name like "FOO";
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
delete from performance_schema.user_variables_by_thread
|
||||
where thread_id=1;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
delete from performance_schema.user_variables_by_thread;
|
||||
|
||||
-- error ER_TABLEACCESS_DENIED_ERROR
|
||||
LOCK TABLES performance_schema.user_variables_by_thread READ;
|
||||
UNLOCK TABLES;
|
||||
|
||||
-- error ER_TABLEACCESS_DENIED_ERROR
|
||||
LOCK TABLES performance_schema.user_variables_by_thread WRITE;
|
||||
UNLOCK TABLES;
|
||||
|
||||
DELIMITER |;
|
||||
-- error ER_DBACCESS_DENIED_ERROR
|
||||
CREATE TRIGGER test_uvar_trigger
|
||||
AFTER INSERT ON performance_schema.user_variables_by_thread
|
||||
FOR EACH ROW BEGIN
|
||||
set @a='OK';
|
||||
END|
|
||||
DELIMITER ;|
|
||||
40
mysql-test/suite/perfschema/t/dml_variables_by_thread.test
Normal file
40
mysql-test/suite/perfschema/t/dml_variables_by_thread.test
Normal file
@@ -0,0 +1,40 @@
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
--disable_result_log
|
||||
select * from performance_schema.variables_by_thread
|
||||
where variable_name like 'autocommit%' limit 1;
|
||||
|
||||
select * from performance_schema.variables_by_thread
|
||||
where variable_name='FOO';
|
||||
--enable_result_log
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
insert into performance_schema.variables_by_thread
|
||||
set thread_id=1, variable_name='FOO', variable_value='BAR';
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
update performance_schema.variables_by_thread
|
||||
set variable_name='FOO', variable_value='BAR';
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
update performance_schema.variables_by_thread
|
||||
set variable_name='FOO' where thread_id=0;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
delete from performance_schema.variables_by_thread
|
||||
where thread_id=1;
|
||||
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
delete from performance_schema.variables_by_thread;
|
||||
|
||||
-- error ER_TABLEACCESS_DENIED_ERROR
|
||||
LOCK TABLES performance_schema.variables_by_thread READ;
|
||||
UNLOCK TABLES;
|
||||
|
||||
-- error ER_TABLEACCESS_DENIED_ERROR
|
||||
LOCK TABLES performance_schema.variables_by_thread WRITE;
|
||||
UNLOCK TABLES;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
# Tests for the performance schema
|
||||
#
|
||||
|
||||
--source ../include/event_aggregate_setup.inc
|
||||
--source ../include/event_aggregate_load.inc
|
||||
--source ../include/event_aggregate_cleanup.inc
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
# Tests for the performance schema
|
||||
#
|
||||
|
||||
--source ../include/event_aggregate_setup.inc
|
||||
--source ../include/event_aggregate_load.inc
|
||||
--source ../include/event_aggregate_cleanup.inc
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
# Tests for the performance schema
|
||||
#
|
||||
|
||||
--source ../include/event_aggregate_setup.inc
|
||||
--source ../include/event_aggregate_load.inc
|
||||
--source ../include/event_aggregate_cleanup.inc
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
# Tests for the performance schema
|
||||
#
|
||||
|
||||
--source ../include/event_aggregate_setup.inc
|
||||
--source ../include/event_aggregate_load.inc
|
||||
--source ../include/event_aggregate_cleanup.inc
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
# Tests for the performance schema
|
||||
#
|
||||
|
||||
--source ../include/event_aggregate_setup.inc
|
||||
--source ../include/event_aggregate_load.inc
|
||||
--source ../include/event_aggregate_cleanup.inc
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user