mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
null-merge from perfschema-5.6 merge tree
(only new files and small style changes are accepted)
This commit is contained in:
2
mysql-test/suite/perfschema/t/binlog_edge_mix-master.opt
Normal file
2
mysql-test/suite/perfschema/t/binlog_edge_mix-master.opt
Normal file
@ -0,0 +1,2 @@
|
||||
--log-bin
|
||||
--binlog-ignore-db=my_local_db
|
10
mysql-test/suite/perfschema/t/binlog_edge_mix.test
Normal file
10
mysql-test/suite/perfschema/t/binlog_edge_mix.test
Normal file
@ -0,0 +1,10 @@
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
--source include/have_log_bin.inc
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
set binlog_format=mixed;
|
||||
|
||||
--source ../include/binlog_edge_common.inc
|
||||
|
2
mysql-test/suite/perfschema/t/binlog_edge_row-master.opt
Normal file
2
mysql-test/suite/perfschema/t/binlog_edge_row-master.opt
Normal file
@ -0,0 +1,2 @@
|
||||
--log-bin
|
||||
--binlog-ignore-db=my_local_db
|
10
mysql-test/suite/perfschema/t/binlog_edge_row.test
Normal file
10
mysql-test/suite/perfschema/t/binlog_edge_row.test
Normal file
@ -0,0 +1,10 @@
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
--source include/have_log_bin.inc
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
set binlog_format=row;
|
||||
|
||||
--source ../include/binlog_edge_common.inc
|
||||
|
@ -0,0 +1,2 @@
|
||||
--log-bin
|
||||
--binlog-ignore-db=my_local_db
|
10
mysql-test/suite/perfschema/t/binlog_edge_stmt.test
Normal file
10
mysql-test/suite/perfschema/t/binlog_edge_stmt.test
Normal file
@ -0,0 +1,10 @@
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
--source include/have_log_bin.inc
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
set binlog_format=statement;
|
||||
|
||||
--source ../include/binlog_edge_common.inc
|
||||
|
2
mysql-test/suite/perfschema/t/binlog_ok_mix-master.opt
Normal file
2
mysql-test/suite/perfschema/t/binlog_ok_mix-master.opt
Normal file
@ -0,0 +1,2 @@
|
||||
--log-bin
|
||||
--binlog-ignore-db=my_local_db
|
10
mysql-test/suite/perfschema/t/binlog_ok_mix.test
Normal file
10
mysql-test/suite/perfschema/t/binlog_ok_mix.test
Normal file
@ -0,0 +1,10 @@
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
--source include/have_log_bin.inc
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
set binlog_format=mixed;
|
||||
|
||||
--source ../include/binlog_ok_common.inc
|
||||
|
2
mysql-test/suite/perfschema/t/binlog_ok_row-master.opt
Normal file
2
mysql-test/suite/perfschema/t/binlog_ok_row-master.opt
Normal file
@ -0,0 +1,2 @@
|
||||
--log-bin
|
||||
--binlog-ignore-db=my_local_db
|
10
mysql-test/suite/perfschema/t/binlog_ok_row.test
Normal file
10
mysql-test/suite/perfschema/t/binlog_ok_row.test
Normal file
@ -0,0 +1,10 @@
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
--source include/have_log_bin.inc
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
set binlog_format=row;
|
||||
|
||||
--source ../include/binlog_ok_common.inc
|
||||
|
2
mysql-test/suite/perfschema/t/binlog_ok_stmt-master.opt
Normal file
2
mysql-test/suite/perfschema/t/binlog_ok_stmt-master.opt
Normal file
@ -0,0 +1,2 @@
|
||||
--log-bin
|
||||
--binlog-ignore-db=my_local_db
|
10
mysql-test/suite/perfschema/t/binlog_ok_stmt.test
Normal file
10
mysql-test/suite/perfschema/t/binlog_ok_stmt.test
Normal file
@ -0,0 +1,10 @@
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
--source include/have_log_bin.inc
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
set binlog_format=statement;
|
||||
|
||||
--source ../include/binlog_ok_common.inc
|
||||
|
@ -0,0 +1,2 @@
|
||||
$PLUGIN_AUTH_OPT
|
||||
$PLUGIN_AUTH_LOAD
|
1
mysql-test/suite/perfschema/t/query_cache-master.opt
Normal file
1
mysql-test/suite/perfschema/t/query_cache-master.opt
Normal file
@ -0,0 +1 @@
|
||||
--query_cache_type=1
|
1
mysql-test/suite/perfschema/t/relaylog-slave.opt
Normal file
1
mysql-test/suite/perfschema/t/relaylog-slave.opt
Normal file
@ -0,0 +1 @@
|
||||
--force-restart
|
91
mysql-test/suite/perfschema/t/rpl_gtid_func.test
Normal file
91
mysql-test/suite/perfschema/t/rpl_gtid_func.test
Normal file
@ -0,0 +1,91 @@
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
--source ../include/no_protocol.inc
|
||||
|
||||
-- source include/master-slave.inc
|
||||
|
||||
connection master;
|
||||
--echo **** On Master ****
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists test.marker;
|
||||
--enable_warnings
|
||||
|
||||
create table test.marker(a int) engine=innodb;
|
||||
insert into test.marker values (1);
|
||||
select * from test.marker;
|
||||
|
||||
truncate table performance_schema.events_waits_history_long;
|
||||
truncate table performance_schema.events_statements_summary_by_digest;
|
||||
|
||||
update performance_schema.setup_instruments
|
||||
set enabled='YES', timed='YES';
|
||||
|
||||
sync_slave_with_master;
|
||||
--echo **** On Slave ****
|
||||
|
||||
truncate table performance_schema.events_waits_history_long;
|
||||
truncate table performance_schema.events_statements_summary_by_digest;
|
||||
|
||||
update performance_schema.setup_instruments
|
||||
set enabled='YES', timed='NO';
|
||||
|
||||
connection master;
|
||||
--echo **** On Master ****
|
||||
|
||||
select * from performance_schema.setup_instruments
|
||||
where timed='NO';
|
||||
|
||||
select "This better be in the master" as in_master_digest;
|
||||
|
||||
insert into performance_schema.setup_objects
|
||||
values ('TABLE', 'master', 'foo', 'YES', 'YES');
|
||||
|
||||
select * from performance_schema.setup_objects
|
||||
order by object_type, object_schema, object_name;
|
||||
|
||||
select digest, digest_text, count_star
|
||||
from performance_schema.events_statements_summary_by_digest
|
||||
where digest_text like "%in_%_digest%";
|
||||
|
||||
insert into test.marker values (2);
|
||||
|
||||
sync_slave_with_master;
|
||||
--echo **** On Slave ****
|
||||
|
||||
select * from test.marker;
|
||||
|
||||
select * from performance_schema.setup_instruments
|
||||
where timed='YES';
|
||||
|
||||
select "This better be in the slave" as in_slave_digest;
|
||||
|
||||
insert into performance_schema.setup_objects
|
||||
values ('TABLE', 'slave', 'foo', 'YES', 'YES');
|
||||
|
||||
select * from performance_schema.setup_objects
|
||||
order by object_type, object_schema, object_name;
|
||||
|
||||
select digest, digest_text, count_star
|
||||
from performance_schema.events_statements_summary_by_digest
|
||||
where digest_text like "%in_%_digest%";
|
||||
|
||||
connection master;
|
||||
--echo **** On Master ****
|
||||
delete from performance_schema.setup_objects
|
||||
where object_schema='master';
|
||||
sync_slave_with_master;
|
||||
--echo **** On Slave ****
|
||||
|
||||
delete from performance_schema.setup_objects
|
||||
where object_schema='slave';
|
||||
select * from performance_schema.setup_objects;
|
||||
|
||||
--disable_query_log
|
||||
--disable_warnings
|
||||
connection master;
|
||||
drop table test.marker;
|
||||
sync_slave_with_master;
|
||||
--enable_warnings
|
||||
--enable_query_log
|
||||
--source include/rpl_end.inc
|
34
mysql-test/suite/perfschema/t/sizing_default.cnf
Normal file
34
mysql-test/suite/perfschema/t/sizing_default.cnf
Normal file
@ -0,0 +1,34 @@
|
||||
|
||||
!include include/default_mysqld_autosize.cnf
|
||||
|
||||
[mysqld.1]
|
||||
|
||||
# Default values used in the server, out of the box
|
||||
table_definition_cache=400
|
||||
table_open_cache=400
|
||||
max_connections=151
|
||||
open_files_limit=1024
|
||||
|
||||
# Automated sizing for everything
|
||||
|
||||
loose-performance-schema-accounts-size=-1
|
||||
loose-performance-schema-digests-size=-1
|
||||
loose-performance-schema-hosts-size=-1
|
||||
loose-performance-schema-users-size=-1
|
||||
|
||||
loose-performance-schema-events-waits-history-size=-1
|
||||
loose-performance-schema-events-waits-history-long-size=-1
|
||||
loose-performance-schema-events-stages-history-size=-1
|
||||
loose-performance-schema-events-stages-history-long-size=-1
|
||||
loose-performance-schema-events-statements-history-size=-1
|
||||
loose-performance-schema-events-statements-history-long-size=-1
|
||||
|
||||
loose-performance-schema-max-mutex-instances=-1
|
||||
loose-performance-schema-max-rwlock-instances=-1
|
||||
loose-performance-schema-max-cond-instances=-1
|
||||
loose-performance-schema-max-file-instances=-1
|
||||
loose-performance-schema-max-socket-instances=-1
|
||||
loose-performance-schema-max-thread-instances=-1
|
||||
loose-performance-schema-max-table-instances=-1
|
||||
loose-performance-schema-max-table-handles=-1
|
||||
|
9
mysql-test/suite/perfschema/t/sizing_default.test
Normal file
9
mysql-test/suite/perfschema/t/sizing_default.test
Normal file
@ -0,0 +1,9 @@
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
--source include/have_64bit.inc
|
||||
--source include/not_valgrind.inc
|
||||
--source ../include/have_aligned_memory.inc
|
||||
|
||||
--source ../include/sizing_auto.inc
|
||||
|
3
mysql-test/suite/perfschema/t/sizing_growth-master.opt
Normal file
3
mysql-test/suite/perfschema/t/sizing_growth-master.opt
Normal file
@ -0,0 +1,3 @@
|
||||
--force-restart
|
||||
--innodb_file_per_table=1
|
||||
|
478
mysql-test/suite/perfschema/t/sizing_growth.test
Normal file
478
mysql-test/suite/perfschema/t/sizing_growth.test
Normal file
@ -0,0 +1,478 @@
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
#
|
||||
# Important note:
|
||||
# this test is extremely sensitive to how threads are running inside the server,
|
||||
# so it has it's own -master.opt file, to enforce it runs alone in mysqld
|
||||
#
|
||||
|
||||
# Setup
|
||||
|
||||
flush status;
|
||||
flush tables;
|
||||
|
||||
# Remove to debug
|
||||
--disable_result_log
|
||||
|
||||
# Make sure the internal server caches are all full
|
||||
select * from performance_schema.mutex_instances;
|
||||
select * from performance_schema.rwlock_instances;
|
||||
select * from performance_schema.cond_instances;
|
||||
select * from performance_schema.file_instances;
|
||||
|
||||
select count(*) from performance_schema.mutex_instances
|
||||
into @v0_mutex_instances;
|
||||
|
||||
select count(*) from performance_schema.rwlock_instances
|
||||
into @v0_rwlock_instances;
|
||||
|
||||
select count(*) from performance_schema.cond_instances
|
||||
into @v0_cond_instances;
|
||||
|
||||
select count(*) from performance_schema.file_instances
|
||||
into @v0_file_instances;
|
||||
|
||||
select count(*) from performance_schema.mutex_instances
|
||||
into @v1_mutex_instances;
|
||||
|
||||
select count(*) from performance_schema.rwlock_instances
|
||||
into @v1_rwlock_instances;
|
||||
|
||||
select count(*) from performance_schema.cond_instances
|
||||
into @v1_cond_instances;
|
||||
|
||||
select count(*) from performance_schema.file_instances
|
||||
into @v1_file_instances;
|
||||
|
||||
select count(name), name from performance_schema.mutex_instances
|
||||
group by name;
|
||||
|
||||
select count(name), name from performance_schema.rwlock_instances
|
||||
group by name;
|
||||
|
||||
select count(name), name from performance_schema.cond_instances
|
||||
group by name;
|
||||
|
||||
select count(event_name), event_name from performance_schema.file_instances
|
||||
group by event_name;
|
||||
|
||||
begin;
|
||||
create table test.t1(a int) engine = innodb;
|
||||
create table test.t2(a int) engine = innodb;
|
||||
create table test.t3(a int) engine = innodb;
|
||||
create table test.t4(a int) engine = innodb;
|
||||
create table test.t5(a int) engine = innodb;
|
||||
create table test.t6(a int) engine = innodb;
|
||||
create table test.t7(a int) engine = innodb;
|
||||
create table test.t8(a int) engine = innodb;
|
||||
create table test.t9(a int) engine = innodb;
|
||||
create table test.t10(a int) engine = innodb;
|
||||
|
||||
# Make sure there is at least 1 table handle,
|
||||
# to fully initialize the storage engine share if needed.
|
||||
select * from test.t1;
|
||||
select * from test.t2;
|
||||
select * from test.t3;
|
||||
select * from test.t4;
|
||||
select * from test.t5;
|
||||
select * from test.t6;
|
||||
select * from test.t7;
|
||||
select * from test.t8;
|
||||
select * from test.t9;
|
||||
select * from test.t10;
|
||||
commit;
|
||||
|
||||
select count(*) from performance_schema.mutex_instances
|
||||
into @v2_mutex_instances;
|
||||
|
||||
select count(*) from performance_schema.rwlock_instances
|
||||
into @v2_rwlock_instances;
|
||||
|
||||
select count(*) from performance_schema.cond_instances
|
||||
into @v2_cond_instances;
|
||||
|
||||
select count(*) from performance_schema.file_instances
|
||||
into @v2_file_instances;
|
||||
|
||||
select count(name), name from performance_schema.mutex_instances
|
||||
group by name;
|
||||
|
||||
select count(name), name from performance_schema.rwlock_instances
|
||||
group by name;
|
||||
|
||||
select count(name), name from performance_schema.cond_instances
|
||||
group by name;
|
||||
|
||||
select count(event_name), event_name from performance_schema.file_instances
|
||||
group by event_name;
|
||||
|
||||
select @v2_mutex_instances, @v1_mutex_instances, @v0_mutex_instances;
|
||||
select @v2_rwlock_instances, @v1_rwlock_instances, @v0_rwlock_instances;
|
||||
select @v2_cond_instances, @v1_cond_instances, @v0_cond_instances;
|
||||
select @v2_file_instances, @v1_file_instances, @v0_file_instances;
|
||||
|
||||
select round((@v2_mutex_instances - @v1_mutex_instances) / 10)
|
||||
into @mutex_per_share;
|
||||
select round((@v2_rwlock_instances - @v1_rwlock_instances) / 10)
|
||||
into @rwlock_per_share;
|
||||
select round((@v2_cond_instances - @v1_cond_instances) / 10)
|
||||
into @cond_per_share;
|
||||
select round((@v2_file_instances - @v1_file_instances) / 10)
|
||||
into @file_per_share;
|
||||
|
||||
connect (con1, localhost, root,,);
|
||||
select "con1 connected";
|
||||
|
||||
connect (con2, localhost, root,,);
|
||||
select "con2 connected";
|
||||
|
||||
connect (con3, localhost, root,,);
|
||||
select "con3 connected";
|
||||
|
||||
connect (con4, localhost, root,,);
|
||||
select "con4 connected";
|
||||
|
||||
connect (con5, localhost, root,,);
|
||||
select "con5 connected";
|
||||
|
||||
connect (con6, localhost, root,,);
|
||||
select "con6 connected";
|
||||
|
||||
connect (con7, localhost, root,,);
|
||||
select "con7 connected";
|
||||
|
||||
connect (con8, localhost, root,,);
|
||||
select "con8 connected";
|
||||
|
||||
connect (con9, localhost, root,,);
|
||||
select "con9 connected";
|
||||
|
||||
connect (con10, localhost, root,,);
|
||||
select "con10 connected";
|
||||
|
||||
connection default;
|
||||
|
||||
select count(*) from performance_schema.mutex_instances
|
||||
into @v3_mutex_instances;
|
||||
|
||||
select count(*) from performance_schema.rwlock_instances
|
||||
into @v3_rwlock_instances;
|
||||
|
||||
select count(*) from performance_schema.cond_instances
|
||||
into @v3_cond_instances;
|
||||
|
||||
select count(*) from performance_schema.file_instances
|
||||
into @v3_file_instances;
|
||||
|
||||
select count(name), name from performance_schema.mutex_instances
|
||||
group by name;
|
||||
|
||||
select count(name), name from performance_schema.rwlock_instances
|
||||
group by name;
|
||||
|
||||
select count(name), name from performance_schema.cond_instances
|
||||
group by name;
|
||||
|
||||
select count(event_name), event_name from performance_schema.file_instances
|
||||
group by event_name;
|
||||
|
||||
select @v3_mutex_instances, @v2_mutex_instances;
|
||||
select @v3_rwlock_instances, @v2_rwlock_instances;
|
||||
select @v3_cond_instances, @v2_cond_instances;
|
||||
select @v3_file_instances, @v2_file_instances;
|
||||
|
||||
select round((@v3_mutex_instances - @v2_mutex_instances) / 10)
|
||||
into @mutex_per_con;
|
||||
select round((@v3_rwlock_instances - @v2_rwlock_instances) / 10)
|
||||
into @rwlock_per_con;
|
||||
select round((@v3_cond_instances - @v2_cond_instances) / 10)
|
||||
into @cond_per_con;
|
||||
select round((@v3_file_instances - @v2_file_instances) / 10)
|
||||
into @file_per_con;
|
||||
|
||||
--connection con1
|
||||
|
||||
lock table test.t1 write, test.t2 write, test.t3 write, test.t4 write,
|
||||
test.t5 write, test.t6 write, test.t7 write, test.t8 write, test.t9 write,
|
||||
test.t10 write;
|
||||
|
||||
--send
|
||||
select t1.*, t2.*, t3.*, t4.*, t5.*, t6.*, t7.*, t8.*, t9.*, t10.*
|
||||
from t1, t2, t3, t4, t5, t6, t7, t8, t9, t10;
|
||||
|
||||
--connection con2
|
||||
|
||||
--send
|
||||
select t1.*, t2.*, t3.*, t4.*, t5.*, t6.*, t7.*, t8.*, t9.*, t10.*
|
||||
from t1, t2, t3, t4, t5, t6, t7, t8, t9, t10;
|
||||
|
||||
--connection con3
|
||||
|
||||
--send
|
||||
select t1.*, t2.*, t3.*, t4.*, t5.*, t6.*, t7.*, t8.*, t9.*, t10.*
|
||||
from t1, t2, t3, t4, t5, t6, t7, t8, t9, t10;
|
||||
|
||||
--connection con4
|
||||
|
||||
--send
|
||||
select t1.*, t2.*, t3.*, t4.*, t5.*, t6.*, t7.*, t8.*, t9.*, t10.*
|
||||
from t1, t2, t3, t4, t5, t6, t7, t8, t9, t10;
|
||||
|
||||
--connection con5
|
||||
|
||||
--send
|
||||
select t1.*, t2.*, t3.*, t4.*, t5.*, t6.*, t7.*, t8.*, t9.*, t10.*
|
||||
from t1, t2, t3, t4, t5, t6, t7, t8, t9, t10;
|
||||
|
||||
--connection con6
|
||||
|
||||
--send
|
||||
select t1.*, t2.*, t3.*, t4.*, t5.*, t6.*, t7.*, t8.*, t9.*, t10.*
|
||||
from t1, t2, t3, t4, t5, t6, t7, t8, t9, t10;
|
||||
|
||||
--connection con7
|
||||
|
||||
--send
|
||||
select t1.*, t2.*, t3.*, t4.*, t5.*, t6.*, t7.*, t8.*, t9.*, t10.*
|
||||
from t1, t2, t3, t4, t5, t6, t7, t8, t9, t10;
|
||||
|
||||
--connection con8
|
||||
|
||||
--send
|
||||
select t1.*, t2.*, t3.*, t4.*, t5.*, t6.*, t7.*, t8.*, t9.*, t10.*
|
||||
from t1, t2, t3, t4, t5, t6, t7, t8, t9, t10;
|
||||
|
||||
--connection con9
|
||||
|
||||
--send
|
||||
select t1.*, t2.*, t3.*, t4.*, t5.*, t6.*, t7.*, t8.*, t9.*, t10.*
|
||||
from t1, t2, t3, t4, t5, t6, t7, t8, t9, t10;
|
||||
|
||||
--connection con10
|
||||
|
||||
--send
|
||||
select t1.*, t2.*, t3.*, t4.*, t5.*, t6.*, t7.*, t8.*, t9.*, t10.*
|
||||
from t1, t2, t3, t4, t5, t6, t7, t8, t9, t10;
|
||||
|
||||
connection default;
|
||||
|
||||
select count(*) from performance_schema.mutex_instances
|
||||
into @v4_mutex_instances;
|
||||
|
||||
select count(*) from performance_schema.rwlock_instances
|
||||
into @v4_rwlock_instances;
|
||||
|
||||
select count(*) from performance_schema.cond_instances
|
||||
into @v4_cond_instances;
|
||||
|
||||
select count(*) from performance_schema.file_instances
|
||||
into @v4_file_instances;
|
||||
|
||||
select count(name), name from performance_schema.mutex_instances
|
||||
group by name;
|
||||
|
||||
select count(name), name from performance_schema.rwlock_instances
|
||||
group by name;
|
||||
|
||||
select count(name), name from performance_schema.cond_instances
|
||||
group by name;
|
||||
|
||||
select count(event_name), event_name from performance_schema.file_instances
|
||||
group by event_name;
|
||||
|
||||
select @v4_mutex_instances, @v3_mutex_instances;
|
||||
select @v4_rwlock_instances, @v3_rwlock_instances;
|
||||
select @v4_cond_instances, @v3_cond_instances;
|
||||
select @v4_file_instances, @v3_file_instances;
|
||||
|
||||
select round((@v4_mutex_instances - @v3_mutex_instances) / 10)
|
||||
into @mutex_per_handle;
|
||||
select round((@v4_rwlock_instances - @v3_rwlock_instances) / 10)
|
||||
into @rwlock_per_handle;
|
||||
select round((@v4_cond_instances - @v3_cond_instances) / 10)
|
||||
into @cond_per_handle;
|
||||
select round((@v4_file_instances - @v3_file_instances) / 10)
|
||||
into @file_per_handle;
|
||||
|
||||
--connection con1
|
||||
--reap
|
||||
|
||||
unlock tables;
|
||||
|
||||
--connection con2
|
||||
--reap
|
||||
|
||||
--connection con3
|
||||
--reap
|
||||
|
||||
--connection con4
|
||||
--reap
|
||||
|
||||
--connection con5
|
||||
--reap
|
||||
|
||||
--connection con6
|
||||
--reap
|
||||
|
||||
--connection con7
|
||||
--reap
|
||||
|
||||
--connection con8
|
||||
--reap
|
||||
|
||||
--connection con9
|
||||
--reap
|
||||
|
||||
--connection con10
|
||||
--reap
|
||||
|
||||
--disconnect con1
|
||||
--disconnect con2
|
||||
--disconnect con3
|
||||
--disconnect con4
|
||||
--disconnect con5
|
||||
--disconnect con6
|
||||
--disconnect con7
|
||||
--disconnect con8
|
||||
--disconnect con9
|
||||
--disconnect con10
|
||||
|
||||
--connection default
|
||||
|
||||
drop table test.t1;
|
||||
drop table test.t2;
|
||||
drop table test.t3;
|
||||
drop table test.t4;
|
||||
drop table test.t5;
|
||||
drop table test.t6;
|
||||
drop table test.t7;
|
||||
drop table test.t8;
|
||||
drop table test.t9;
|
||||
drop table test.t10;
|
||||
|
||||
--enable_result_log
|
||||
|
||||
#
|
||||
# This test must have *_lost = 0,
|
||||
# otherwise the measurement is just wrong.
|
||||
#
|
||||
|
||||
show status like "performance_schema%";
|
||||
|
||||
#
|
||||
# Expecting 2:
|
||||
# - wait/synch/mutex/sql/MDL_wait::LOCK_wait_status
|
||||
# - wait/synch/mutex/sql/TABLE_SHARE::LOCK_ha_data
|
||||
# plus mutexes used inside the storage engine
|
||||
# This is very storage engine dependent
|
||||
# For innodb:
|
||||
# - wait/synch/mutex/innodb/autoinc_mutex
|
||||
# - wait/synch/mutex/innodb/os_mutex
|
||||
# Note that depending on the platform,
|
||||
# and the version of the compiler used,
|
||||
# code in the server may use either native platform atomics
|
||||
# or a mutex.
|
||||
# Note also that in DEBUG builds, code uses more mutexes.
|
||||
# Because of all these parameters,
|
||||
# this test is disabled, as predicting an exact number is difficult.
|
||||
#
|
||||
# commented: select @mutex_per_share <= 5;
|
||||
|
||||
#
|
||||
# Expecting 1:
|
||||
# - wait/synch/rwlock/sql/MDL_lock::rwlock
|
||||
# plus rwlocks used inside the storage engine
|
||||
# This is very storage engine dependent
|
||||
#
|
||||
select @rwlock_per_share <= 3;
|
||||
|
||||
#
|
||||
# Expecting 0:
|
||||
#
|
||||
select @cond_per_share;
|
||||
|
||||
#
|
||||
# Expecting 1:
|
||||
# - wait/io/file/sql/FRM
|
||||
# plus files used inside the storage engine
|
||||
# This is very storage engine dependent
|
||||
#
|
||||
select @file_per_share <= 3;
|
||||
|
||||
#
|
||||
# Expecting 3:
|
||||
# - wait/synch/mutex/mysys/my_thread_var::mutex
|
||||
# - wait/synch/mutex/mysys/THR_LOCK::mutex
|
||||
# - wait/synch/mutex/sql/THD::LOCK_thd_data
|
||||
#
|
||||
select @mutex_per_con;
|
||||
|
||||
#
|
||||
# Expecting 1:
|
||||
# - wait/synch/rwlock/sql/MDL_context::LOCK_waiting_for
|
||||
#
|
||||
select @rwlock_per_con;
|
||||
|
||||
#
|
||||
# Expecting 2:
|
||||
# - wait/synch/cond/mysys/my_thread_var::suspend
|
||||
# - wait/synch/cond/sql/MDL_context::COND_wait_status
|
||||
#
|
||||
select @cond_per_con;
|
||||
|
||||
#
|
||||
# Expecting 0:
|
||||
#
|
||||
select @file_per_con;
|
||||
|
||||
#
|
||||
# Expecting 0:
|
||||
#
|
||||
select @mutex_per_handle;
|
||||
|
||||
#
|
||||
# Expecting 0:
|
||||
#
|
||||
select @rwlock_per_handle;
|
||||
|
||||
#
|
||||
# Expecting 0:
|
||||
#
|
||||
select @cond_per_handle;
|
||||
|
||||
#
|
||||
# Expecting 0:
|
||||
#
|
||||
select @file_per_handle;
|
||||
|
||||
#
|
||||
# IMPORTANT NOTE:
|
||||
# when any measurement here changes, the heuristics
|
||||
# in storage/perfschema/pfs_autosize.cc need to be updated.
|
||||
# Note that this in turns will lead to different estimations for automated
|
||||
# sizing, and imply to update the results for sizing_*.
|
||||
#
|
||||
|
||||
# commented: (@mutex_per_share <= 5)
|
||||
# Mutexes are not instrumented by default,
|
||||
# not enforcing mutex estimates
|
||||
|
||||
select if(
|
||||
(@rwlock_per_share <= 3)
|
||||
AND (@cond_per_share = 0)
|
||||
AND (@file_per_share <= 3)
|
||||
AND (@mutex_per_con = 3)
|
||||
AND (@rwlock_per_con = 1)
|
||||
AND (@cond_per_con = 2)
|
||||
AND (@file_per_con = 0)
|
||||
AND (@mutex_per_handle = 0)
|
||||
AND (@rwlock_per_handle = 0)
|
||||
AND (@cond_per_handle = 0)
|
||||
AND (@file_per_handle = 0),
|
||||
"OK: heuristics are up to date",
|
||||
"FAILED: heuristics need to be updated")
|
||||
as status;
|
||||
|
56
mysql-test/suite/perfschema/t/sizing_high.cnf
Normal file
56
mysql-test/suite/perfschema/t/sizing_high.cnf
Normal file
@ -0,0 +1,56 @@
|
||||
|
||||
!include include/default_mysqld_autosize.cnf
|
||||
|
||||
[mysqld.1]
|
||||
|
||||
# WARNING about open_files_limit and ulimit -n
|
||||
#
|
||||
# mysqld checks how many files can be opened on the machine,
|
||||
# and this is by definition very:
|
||||
# - os dependent, see OS_FILE_LIMIT, HAVE_GETRLIMIT
|
||||
# - configuration dependent, for each machine (ulimit -n), see
|
||||
# my_set_max_open_files() in mysys/my_file.c,
|
||||
# see getrlimit(RLIMIT_NOFILE)
|
||||
#
|
||||
# Based on the this, the server tunes _down_ max_connections and
|
||||
# table_cache_size to match the open_files_limit found,
|
||||
# which significantly interfere with this test.
|
||||
#
|
||||
# Solution: use a big table definition cache,
|
||||
# but small values for max_connection and table_open_cache,
|
||||
# to stay within open_files_limit of 1024.
|
||||
#
|
||||
# This is the best test we can do that has a chance to pass on all
|
||||
# platforms, while still providing code coverage.
|
||||
|
||||
table_definition_cache=5000
|
||||
table_open_cache=400
|
||||
max_connections=200
|
||||
open_files_limit=1024
|
||||
|
||||
# 10+max_connections+table_cache_size*2 = 10 + 200 + 400*2 = 1010
|
||||
# max_connections*5 = 200*5 = 1000
|
||||
|
||||
# Automated sizing for everything
|
||||
|
||||
loose-performance-schema-accounts-size=-1
|
||||
loose-performance-schema-digests-size=-1
|
||||
loose-performance-schema-hosts-size=-1
|
||||
loose-performance-schema-users-size=-1
|
||||
|
||||
loose-performance-schema-events-waits-history-size=-1
|
||||
loose-performance-schema-events-waits-history-long-size=-1
|
||||
loose-performance-schema-events-stages-history-size=-1
|
||||
loose-performance-schema-events-stages-history-long-size=-1
|
||||
loose-performance-schema-events-statements-history-size=-1
|
||||
loose-performance-schema-events-statements-history-long-size=-1
|
||||
|
||||
loose-performance-schema-max-mutex-instances=-1
|
||||
loose-performance-schema-max-rwlock-instances=-1
|
||||
loose-performance-schema-max-cond-instances=-1
|
||||
loose-performance-schema-max-file-instances=-1
|
||||
loose-performance-schema-max-socket-instances=-1
|
||||
loose-performance-schema-max-thread-instances=-1
|
||||
loose-performance-schema-max-table-instances=-1
|
||||
loose-performance-schema-max-table-handles=-1
|
||||
|
9
mysql-test/suite/perfschema/t/sizing_high.test
Normal file
9
mysql-test/suite/perfschema/t/sizing_high.test
Normal file
@ -0,0 +1,9 @@
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
--source include/have_64bit.inc
|
||||
--source include/not_valgrind.inc
|
||||
--source ../include/have_aligned_memory.inc
|
||||
|
||||
--source ../include/sizing_auto.inc
|
||||
|
33
mysql-test/suite/perfschema/t/sizing_low.cnf
Normal file
33
mysql-test/suite/perfschema/t/sizing_low.cnf
Normal file
@ -0,0 +1,33 @@
|
||||
|
||||
!include include/default_mysqld_autosize.cnf
|
||||
|
||||
[mysqld.1]
|
||||
|
||||
table_definition_cache=400
|
||||
table_open_cache=100
|
||||
max_connections=50
|
||||
open_files_limit=1024
|
||||
|
||||
# Automated sizing for everything
|
||||
|
||||
loose-performance-schema-accounts-size=-1
|
||||
loose-performance-schema-digests-size=-1
|
||||
loose-performance-schema-hosts-size=-1
|
||||
loose-performance-schema-users-size=-1
|
||||
|
||||
loose-performance-schema-events-waits-history-size=-1
|
||||
loose-performance-schema-events-waits-history-long-size=-1
|
||||
loose-performance-schema-events-stages-history-size=-1
|
||||
loose-performance-schema-events-stages-history-long-size=-1
|
||||
loose-performance-schema-events-statements-history-size=-1
|
||||
loose-performance-schema-events-statements-history-long-size=-1
|
||||
|
||||
loose-performance-schema-max-mutex-instances=-1
|
||||
loose-performance-schema-max-rwlock-instances=-1
|
||||
loose-performance-schema-max-cond-instances=-1
|
||||
loose-performance-schema-max-file-instances=-1
|
||||
loose-performance-schema-max-socket-instances=-1
|
||||
loose-performance-schema-max-thread-instances=-1
|
||||
loose-performance-schema-max-table-instances=-1
|
||||
loose-performance-schema-max-table-handles=-1
|
||||
|
9
mysql-test/suite/perfschema/t/sizing_low.test
Normal file
9
mysql-test/suite/perfschema/t/sizing_low.test
Normal file
@ -0,0 +1,9 @@
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
--source include/have_64bit.inc
|
||||
--source include/not_valgrind.inc
|
||||
--source ../include/have_aligned_memory.inc
|
||||
|
||||
--source ../include/sizing_auto.inc
|
||||
|
33
mysql-test/suite/perfschema/t/sizing_med.cnf
Normal file
33
mysql-test/suite/perfschema/t/sizing_med.cnf
Normal file
@ -0,0 +1,33 @@
|
||||
|
||||
!include include/default_mysqld_autosize.cnf
|
||||
|
||||
[mysqld.1]
|
||||
|
||||
table_definition_cache=401
|
||||
table_open_cache=401
|
||||
max_connections=152
|
||||
open_files_limit=1024
|
||||
|
||||
# Automated sizing for everything
|
||||
|
||||
loose-performance-schema-accounts-size=-1
|
||||
loose-performance-schema-digests-size=-1
|
||||
loose-performance-schema-hosts-size=-1
|
||||
loose-performance-schema-users-size=-1
|
||||
|
||||
loose-performance-schema-events-waits-history-size=-1
|
||||
loose-performance-schema-events-waits-history-long-size=-1
|
||||
loose-performance-schema-events-stages-history-size=-1
|
||||
loose-performance-schema-events-stages-history-long-size=-1
|
||||
loose-performance-schema-events-statements-history-size=-1
|
||||
loose-performance-schema-events-statements-history-long-size=-1
|
||||
|
||||
loose-performance-schema-max-mutex-instances=-1
|
||||
loose-performance-schema-max-rwlock-instances=-1
|
||||
loose-performance-schema-max-cond-instances=-1
|
||||
loose-performance-schema-max-file-instances=-1
|
||||
loose-performance-schema-max-socket-instances=-1
|
||||
loose-performance-schema-max-thread-instances=-1
|
||||
loose-performance-schema-max-table-instances=-1
|
||||
loose-performance-schema-max-table-handles=-1
|
||||
|
9
mysql-test/suite/perfschema/t/sizing_med.test
Normal file
9
mysql-test/suite/perfschema/t/sizing_med.test
Normal file
@ -0,0 +1,9 @@
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
--source include/have_64bit.inc
|
||||
--source include/not_valgrind.inc
|
||||
--source ../include/have_aligned_memory.inc
|
||||
|
||||
--source ../include/sizing_auto.inc
|
||||
|
38
mysql-test/suite/perfschema/t/sizing_off.cnf
Normal file
38
mysql-test/suite/perfschema/t/sizing_off.cnf
Normal file
@ -0,0 +1,38 @@
|
||||
|
||||
!include include/default_mysqld_autosize.cnf
|
||||
|
||||
[mysqld.1]
|
||||
|
||||
# Default values used in the server, out of the box
|
||||
table_definition_cache=400
|
||||
table_open_cache=400
|
||||
max_connections=151
|
||||
open_files_limit=1024
|
||||
|
||||
# Disable the performacne schema.
|
||||
# Sizing does not occur then
|
||||
loose-skip-performance-schema
|
||||
|
||||
# Automated sizing for everything
|
||||
|
||||
loose-performance-schema-accounts-size=-1
|
||||
loose-performance-schema-digests-size=-1
|
||||
loose-performance-schema-hosts-size=-1
|
||||
loose-performance-schema-users-size=-1
|
||||
|
||||
loose-performance-schema-events-waits-history-size=-1
|
||||
loose-performance-schema-events-waits-history-long-size=-1
|
||||
loose-performance-schema-events-stages-history-size=-1
|
||||
loose-performance-schema-events-stages-history-long-size=-1
|
||||
loose-performance-schema-events-statements-history-size=-1
|
||||
loose-performance-schema-events-statements-history-long-size=-1
|
||||
|
||||
loose-performance-schema-max-mutex-instances=-1
|
||||
loose-performance-schema-max-rwlock-instances=-1
|
||||
loose-performance-schema-max-cond-instances=-1
|
||||
loose-performance-schema-max-file-instances=-1
|
||||
loose-performance-schema-max-socket-instances=-1
|
||||
loose-performance-schema-max-thread-instances=-1
|
||||
loose-performance-schema-max-table-instances=-1
|
||||
loose-performance-schema-max-table-handles=-1
|
||||
|
6
mysql-test/suite/perfschema/t/sizing_off.test
Normal file
6
mysql-test/suite/perfschema/t/sizing_off.test
Normal file
@ -0,0 +1,6 @@
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
show variables like "performance_schema%";
|
||||
show status like "performance_schema%";
|
@ -0,0 +1 @@
|
||||
--query_cache_type=1
|
36
mysql-test/suite/perfschema/t/statement_digest_charset.test
Normal file
36
mysql-test/suite/perfschema/t/statement_digest_charset.test
Normal file
@ -0,0 +1,36 @@
|
||||
# Test for PERFORMANCE_SCHEMA statement digests
|
||||
#
|
||||
# Test statements using different character sets.
|
||||
# See Bug#13809293 - PERFSCHEMA.DML_ESMS_BY_DIGEST FAILS ON DAILY-TRUNK SPORADICALLY
|
||||
#
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
--disable_warnings
|
||||
DROP DATABASE IF EXISTS pfs_charset_test;
|
||||
--enable_warnings
|
||||
CREATE DATABASE pfs_charset_test;
|
||||
USE pfs_charset_test;
|
||||
|
||||
#
|
||||
# CP1251 - 8 bits, max multibyte length = 1
|
||||
#
|
||||
SET NAMES cp1251;
|
||||
TRUNCATE TABLE performance_schema.events_statements_summary_by_digest;
|
||||
CREATE TABLE <20><><EFBFBD><EFBFBD><EFBFBD>_<EFBFBD><5F><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>_1251a (s1 INT);
|
||||
CREATE TABLE <20><><EFBFBD><EFBFBD><EFBFBD>_<EFBFBD><5F><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>_1251b (s1 INT, s2 INT);
|
||||
|
||||
#
|
||||
# UTF8 - 8 bits, max multibyte length = 4
|
||||
#
|
||||
SET NAMES utf8;
|
||||
CREATE TABLE ДОЛЕН_регистър_утф8 (s1 INT);
|
||||
|
||||
#
|
||||
# Incorrectly converted statement identifiers will result in a warning.
|
||||
#
|
||||
SET NAMES latin1;
|
||||
SELECT * FROM performance_schema.events_statements_summary_by_digest
|
||||
WHERE digest_text LIKE 'XXXYYY%' LIMIT 1;
|
||||
|
||||
DROP DATABASE pfs_charset_test;
|
Reference in New Issue
Block a user