3144 Marc Alff 2010-05-07
port in progress, continued
added:
mysql-test/suite/perfschema/r/myisam_table_io.result
mysql-test/suite/perfschema/t/myisam_table_io.test
modified:
mysql-test/suite/perfschema/r/start_server_no_cond_class.result
mysql-test/suite/perfschema/r/start_server_no_cond_inst.result
mysql-test/suite/perfschema/r/start_server_no_file_class.result
mysql-test/suite/perfschema/r/start_server_no_file_inst.result
mysql-test/suite/perfschema/r/start_server_no_mutex_class.result
mysql-test/suite/perfschema/r/start_server_no_mutex_inst.result
mysql-test/suite/perfschema/r/start_server_no_rwlock_class.result
mysql-test/suite/perfschema/r/start_server_no_rwlock_inst.result
mysql-test/suite/perfschema/r/start_server_no_thread_class.result
mysql-test/suite/perfschema/r/start_server_no_thread_inst.result
mysql-test/suite/perfschema/r/start_server_off.result
mysql-test/suite/perfschema/r/start_server_on.result
storage/perfschema/pfs_server.h
3143 Marc Alff 2010-05-06
WL#4895 PERFORMANCE SCHEMA TABLE IO
Port, continued
modified:
include/mysql/psi/psi_abi_v1.h.pp
include/mysql/psi/psi_abi_v2.h.pp
mysql-test/suite/perfschema/r/selects.result
mysql-test/suite/perfschema/t/selects.test
storage/perfschema/pfs.cc
storage/perfschema/pfs_instr_class.cc
=== added file 'mysql-test/suite/perfschema/r/myisam_table_io.result'
--- a/mysql-test/suite/perfschema/r/myisam_table_io.result 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/r/myisam_table_io.result 2010-05-07 12:14:13 +0000
@@ -0,0 +1,126 @@
+update performance_schema.SETUP_CONSUMERS set enabled='NO';
+update performance_schema.SETUP_INSTRUMENTS set enabled='NO';
+update performance_schema.SETUP_INSTRUMENTS set enabled='YES'
+ where name like "wait/io/table/%";
+truncate table performance_schema.EVENTS_WAITS_HISTORY_LONG;
+flush status;
+update performance_schema.SETUP_CONSUMERS set enabled='YES';
+drop table if exists test.no_index_tab;
+drop temporary table if exists test.temp_tab;
+create table test.no_index_tab ( a varchar(255), b int ) engine=myisam;
+insert into no_index_tab set a = 'foo', b = 1;
+insert into no_index_tab set a = 'foo', b = 2;
+insert into no_index_tab set a = 'foo', b = 3;
+select * from test.no_index_tab;
+a b
+foo 1
+foo 2
+foo 3
+update test.no_index_tab set a = 'bar';
+select * from test.no_index_tab limit 2;
+a b
+bar 1
+bar 2
+delete from test.no_index_tab where b = 3;
+select * from test.no_index_tab;
+a b
+bar 1
+bar 2
+truncate table test.no_index_tab;
+create temporary table test.temp_tab ( a varchar(255), b int ) engine=myisam;
+insert into temp_tab set a = 'foo', b = 1;
+insert into temp_tab set a = 'foo', b = 2;
+insert into temp_tab set a = 'foo', b = 3;
+select * from test.temp_tab;
+a b
+foo 1
+foo 2
+foo 3
+update test.temp_tab set a = 'bar';
+select * from test.temp_tab limit 2;
+a b
+bar 1
+bar 2
+delete from test.temp_tab where b = 3;
+select * from test.temp_tab;
+a b
+bar 1
+bar 2
+truncate table test.temp_tab;
+update performance_schema.SETUP_CONSUMERS set enabled='NO';
+select event_name,
+left(source, locate(":", source)) as short_source,
+object_type, object_schema, object_name,
+operation, number_of_bytes
+from performance_schema.EVENTS_WAITS_HISTORY_LONG
+where event_name like 'wait/io/table/%'
+ and object_schema='test'
+ order by thread_id, event_id;
+event_name short_source object_type object_schema object_name operation number_of_bytes
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab insert NULL
+wait/io/table/sql/handler handler.h: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.h: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.h: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.h: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.h: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab update NULL
+wait/io/table/sql/handler handler.h: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab update NULL
+wait/io/table/sql/handler handler.h: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab update NULL
+wait/io/table/sql/handler handler.h: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.h: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.h: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.h: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.h: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.h: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab delete NULL
+wait/io/table/sql/handler handler.h: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.h: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.h: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.h: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TEMPORARY TABLE test temp_tab insert NULL
+wait/io/table/sql/handler handler.cc: TEMPORARY TABLE test temp_tab insert NULL
+wait/io/table/sql/handler handler.cc: TEMPORARY TABLE test temp_tab insert NULL
+wait/io/table/sql/handler handler.h: TEMPORARY TABLE test temp_tab fetch NULL
+wait/io/table/sql/handler handler.h: TEMPORARY TABLE test temp_tab fetch NULL
+wait/io/table/sql/handler handler.h: TEMPORARY TABLE test temp_tab fetch NULL
+wait/io/table/sql/handler handler.h: TEMPORARY TABLE test temp_tab fetch NULL
+wait/io/table/sql/handler handler.h: TEMPORARY TABLE test temp_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TEMPORARY TABLE test temp_tab update NULL
+wait/io/table/sql/handler handler.h: TEMPORARY TABLE test temp_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TEMPORARY TABLE test temp_tab update NULL
+wait/io/table/sql/handler handler.h: TEMPORARY TABLE test temp_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TEMPORARY TABLE test temp_tab update NULL
+wait/io/table/sql/handler handler.h: TEMPORARY TABLE test temp_tab fetch NULL
+wait/io/table/sql/handler handler.h: TEMPORARY TABLE test temp_tab fetch NULL
+wait/io/table/sql/handler handler.h: TEMPORARY TABLE test temp_tab fetch NULL
+wait/io/table/sql/handler handler.h: TEMPORARY TABLE test temp_tab fetch NULL
+wait/io/table/sql/handler handler.h: TEMPORARY TABLE test temp_tab fetch NULL
+wait/io/table/sql/handler handler.h: TEMPORARY TABLE test temp_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TEMPORARY TABLE test temp_tab delete NULL
+wait/io/table/sql/handler handler.h: TEMPORARY TABLE test temp_tab fetch NULL
+wait/io/table/sql/handler handler.h: TEMPORARY TABLE test temp_tab fetch NULL
+wait/io/table/sql/handler handler.h: TEMPORARY TABLE test temp_tab fetch NULL
+wait/io/table/sql/handler handler.h: TEMPORARY TABLE test temp_tab fetch NULL
+show status like 'performance_schema_%';
+Variable_name Value
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+update performance_schema.SETUP_INSTRUMENTS set enabled='YES';
+update performance_schema.SETUP_CONSUMERS set enabled='YES';
+drop table test.no_index_tab;
=== modified file 'mysql-test/suite/perfschema/r/start_server_no_cond_class.result'
--- a/mysql-test/suite/perfschema/r/start_server_no_cond_class.result 2010-05-05 08:16:47 +0000
+++ b/mysql-test/suite/perfschema/r/start_server_no_cond_class.result 2010-05-07 12:14:13 +0000
@@ -49,8 +49,8 @@ performance_schema_max_mutex_classes 200
performance_schema_max_mutex_instances 1000
performance_schema_max_rwlock_classes 20
performance_schema_max_rwlock_instances 1000
-performance_schema_max_table_handles 100000
-performance_schema_max_table_instances 50000
+performance_schema_max_table_handles 10000
+performance_schema_max_table_instances 1000
performance_schema_max_thread_classes 50
performance_schema_max_thread_instances 1000
show engine PERFORMANCE_SCHEMA status;
=== modified file 'mysql-test/suite/perfschema/r/start_server_no_cond_inst.result'
--- a/mysql-test/suite/perfschema/r/start_server_no_cond_inst.result 2010-05-05 08:16:47 +0000
+++ b/mysql-test/suite/perfschema/r/start_server_no_cond_inst.result 2010-05-07 12:14:13 +0000
@@ -49,8 +49,8 @@ performance_schema_max_mutex_classes 200
performance_schema_max_mutex_instances 1000
performance_schema_max_rwlock_classes 20
performance_schema_max_rwlock_instances 1000
-performance_schema_max_table_handles 100000
-performance_schema_max_table_instances 50000
+performance_schema_max_table_handles 10000
+performance_schema_max_table_instances 1000
performance_schema_max_thread_classes 50
performance_schema_max_thread_instances 1000
show engine PERFORMANCE_SCHEMA status;
=== modified file 'mysql-test/suite/perfschema/r/start_server_no_file_class.result'
--- a/mysql-test/suite/perfschema/r/start_server_no_file_class.result 2010-05-05 08:16:47 +0000
+++ b/mysql-test/suite/perfschema/r/start_server_no_file_class.result 2010-05-07 12:14:13 +0000
@@ -49,8 +49,8 @@ performance_schema_max_mutex_classes 200
performance_schema_max_mutex_instances 1000
performance_schema_max_rwlock_classes 20
performance_schema_max_rwlock_instances 1000
-performance_schema_max_table_handles 100000
-performance_schema_max_table_instances 50000
+performance_schema_max_table_handles 10000
+performance_schema_max_table_instances 1000
performance_schema_max_thread_classes 50
performance_schema_max_thread_instances 1000
show engine PERFORMANCE_SCHEMA status;
=== modified file 'mysql-test/suite/perfschema/r/start_server_no_file_inst.result'
--- a/mysql-test/suite/perfschema/r/start_server_no_file_inst.result 2010-05-05 08:16:47 +0000
+++ b/mysql-test/suite/perfschema/r/start_server_no_file_inst.result 2010-05-07 12:14:13 +0000
@@ -49,8 +49,8 @@ performance_schema_max_mutex_classes 200
performance_schema_max_mutex_instances 1000
performance_schema_max_rwlock_classes 20
performance_schema_max_rwlock_instances 1000
-performance_schema_max_table_handles 100000
-performance_schema_max_table_instances 50000
+performance_schema_max_table_handles 10000
+performance_schema_max_table_instances 1000
performance_schema_max_thread_classes 50
performance_schema_max_thread_instances 1000
show engine PERFORMANCE_SCHEMA status;
=== modified file 'mysql-test/suite/perfschema/r/start_server_no_mutex_class.result'
--- a/mysql-test/suite/perfschema/r/start_server_no_mutex_class.result 2010-05-05 08:16:47 +0000
+++ b/mysql-test/suite/perfschema/r/start_server_no_mutex_class.result 2010-05-07 12:14:13 +0000
@@ -49,8 +49,8 @@ performance_schema_max_mutex_classes 0
performance_schema_max_mutex_instances 1000
performance_schema_max_rwlock_classes 20
performance_schema_max_rwlock_instances 1000
-performance_schema_max_table_handles 100000
-performance_schema_max_table_instances 50000
+performance_schema_max_table_handles 10000
+performance_schema_max_table_instances 1000
performance_schema_max_thread_classes 50
performance_schema_max_thread_instances 1000
show engine PERFORMANCE_SCHEMA status;
=== modified file 'mysql-test/suite/perfschema/r/start_server_no_mutex_inst.result'
--- a/mysql-test/suite/perfschema/r/start_server_no_mutex_inst.result 2010-05-05 08:16:47 +0000
+++ b/mysql-test/suite/perfschema/r/start_server_no_mutex_inst.result 2010-05-07 12:14:13 +0000
@@ -49,8 +49,8 @@ performance_schema_max_mutex_classes 200
performance_schema_max_mutex_instances 0
performance_schema_max_rwlock_classes 20
performance_schema_max_rwlock_instances 1000
-performance_schema_max_table_handles 100000
-performance_schema_max_table_instances 50000
+performance_schema_max_table_handles 10000
+performance_schema_max_table_instances 1000
performance_schema_max_thread_classes 50
performance_schema_max_thread_instances 1000
show engine PERFORMANCE_SCHEMA status;
=== modified file 'mysql-test/suite/perfschema/r/start_server_no_rwlock_class.result'
--- a/mysql-test/suite/perfschema/r/start_server_no_rwlock_class.result 2010-05-05 08:16:47 +0000
+++ b/mysql-test/suite/perfschema/r/start_server_no_rwlock_class.result 2010-05-07 12:14:13 +0000
@@ -49,8 +49,8 @@ performance_schema_max_mutex_classes 200
performance_schema_max_mutex_instances 1000
performance_schema_max_rwlock_classes 0
performance_schema_max_rwlock_instances 1000
-performance_schema_max_table_handles 100000
-performance_schema_max_table_instances 50000
+performance_schema_max_table_handles 10000
+performance_schema_max_table_instances 1000
performance_schema_max_thread_classes 50
performance_schema_max_thread_instances 1000
show engine PERFORMANCE_SCHEMA status;
=== modified file 'mysql-test/suite/perfschema/r/start_server_no_rwlock_inst.result'
--- a/mysql-test/suite/perfschema/r/start_server_no_rwlock_inst.result 2010-05-05 08:16:47 +0000
+++ b/mysql-test/suite/perfschema/r/start_server_no_rwlock_inst.result 2010-05-07 12:14:13 +0000
@@ -49,8 +49,8 @@ performance_schema_max_mutex_classes 200
performance_schema_max_mutex_instances 1000
performance_schema_max_rwlock_classes 20
performance_schema_max_rwlock_instances 0
-performance_schema_max_table_handles 100000
-performance_schema_max_table_instances 50000
+performance_schema_max_table_handles 10000
+performance_schema_max_table_instances 1000
performance_schema_max_thread_classes 50
performance_schema_max_thread_instances 1000
show engine PERFORMANCE_SCHEMA status;
=== modified file 'mysql-test/suite/perfschema/r/start_server_no_thread_class.result'
--- a/mysql-test/suite/perfschema/r/start_server_no_thread_class.result 2010-05-05 08:16:47 +0000
+++ b/mysql-test/suite/perfschema/r/start_server_no_thread_class.result 2010-05-07 12:14:13 +0000
@@ -49,8 +49,8 @@ performance_schema_max_mutex_classes 200
performance_schema_max_mutex_instances 1000
performance_schema_max_rwlock_classes 20
performance_schema_max_rwlock_instances 1000
-performance_schema_max_table_handles 100000
-performance_schema_max_table_instances 50000
+performance_schema_max_table_handles 10000
+performance_schema_max_table_instances 1000
performance_schema_max_thread_classes 0
performance_schema_max_thread_instances 1000
show engine PERFORMANCE_SCHEMA status;
=== modified file 'mysql-test/suite/perfschema/r/start_server_no_thread_inst.result'
--- a/mysql-test/suite/perfschema/r/start_server_no_thread_inst.result 2010-05-05 08:16:47 +0000
+++ b/mysql-test/suite/perfschema/r/start_server_no_thread_inst.result 2010-05-07 12:14:13 +0000
@@ -49,8 +49,8 @@ performance_schema_max_mutex_classes 200
performance_schema_max_mutex_instances 1000
performance_schema_max_rwlock_classes 20
performance_schema_max_rwlock_instances 1000
-performance_schema_max_table_handles 100000
-performance_schema_max_table_instances 50000
+performance_schema_max_table_handles 10000
+performance_schema_max_table_instances 1000
performance_schema_max_thread_classes 50
performance_schema_max_thread_instances 0
show engine PERFORMANCE_SCHEMA status;
=== modified file 'mysql-test/suite/perfschema/r/start_server_off.result'
--- a/mysql-test/suite/perfschema/r/start_server_off.result 2010-05-05 08:16:47 +0000
+++ b/mysql-test/suite/perfschema/r/start_server_off.result 2010-05-07 12:14:13 +0000
@@ -49,8 +49,8 @@ performance_schema_max_mutex_classes 200
performance_schema_max_mutex_instances 1000
performance_schema_max_rwlock_classes 20
performance_schema_max_rwlock_instances 1000
-performance_schema_max_table_handles 100000
-performance_schema_max_table_instances 50000
+performance_schema_max_table_handles 10000
+performance_schema_max_table_instances 1000
performance_schema_max_thread_classes 50
performance_schema_max_thread_instances 1000
show engine PERFORMANCE_SCHEMA status;
=== modified file 'mysql-test/suite/perfschema/r/start_server_on.result'
--- a/mysql-test/suite/perfschema/r/start_server_on.result 2010-05-05 08:16:47 +0000
+++ b/mysql-test/suite/perfschema/r/start_server_on.result 2010-05-07 12:14:13 +0000
@@ -49,8 +49,8 @@ performance_schema_max_mutex_classes 200
performance_schema_max_mutex_instances 1000
performance_schema_max_rwlock_classes 20
performance_schema_max_rwlock_instances 1000
-performance_schema_max_table_handles 100000
-performance_schema_max_table_instances 50000
+performance_schema_max_table_handles 10000
+performance_schema_max_table_instances 1000
performance_schema_max_thread_classes 50
performance_schema_max_thread_instances 1000
show engine PERFORMANCE_SCHEMA status;
=== added file 'mysql-test/suite/perfschema/t/myisam_table_io.test'
--- a/mysql-test/suite/perfschema/t/myisam_table_io.test 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/t/myisam_table_io.test 2010-05-07 12:14:13 +0000
@@ -0,0 +1,99 @@
+# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+# Setup
+
+update performance_schema.SETUP_CONSUMERS set enabled='NO';
+
+update performance_schema.SETUP_INSTRUMENTS set enabled='NO';
+update performance_schema.SETUP_INSTRUMENTS set enabled='YES'
+ where name like "wait/io/table/%";
+
+truncate table performance_schema.EVENTS_WAITS_HISTORY_LONG;
+
+# Reset lost counters to a known state
+flush status;
+
+# Start recording events
+update performance_schema.SETUP_CONSUMERS set enabled='YES';
+
+# Code to test
+
+--disable_warnings
+drop table if exists test.no_index_tab;
+drop temporary table if exists test.temp_tab;
+--enable_warnings
+
+create table test.no_index_tab ( a varchar(255), b int ) engine=myisam;
+insert into no_index_tab set a = 'foo', b = 1;
+insert into no_index_tab set a = 'foo', b = 2;
+insert into no_index_tab set a = 'foo', b = 3;
+
+select * from test.no_index_tab;
+
+update test.no_index_tab set a = 'bar';
+
+select * from test.no_index_tab limit 2;
+
+delete from test.no_index_tab where b = 3;
+
+select * from test.no_index_tab;
+
+truncate table test.no_index_tab;
+
+create temporary table test.temp_tab ( a varchar(255), b int ) engine=myisam;
+insert into temp_tab set a = 'foo', b = 1;
+insert into temp_tab set a = 'foo', b = 2;
+insert into temp_tab set a = 'foo', b = 3;
+
+select * from test.temp_tab;
+
+update test.temp_tab set a = 'bar';
+
+select * from test.temp_tab limit 2;
+
+delete from test.temp_tab where b = 3;
+
+select * from test.temp_tab;
+
+truncate table test.temp_tab;
+
+# Stop recording events
+update performance_schema.SETUP_CONSUMERS set enabled='NO';
+
+select event_name,
+ left(source, locate(":", source)) as short_source,
+ object_type, object_schema, object_name,
+ operation, number_of_bytes
+ from performance_schema.EVENTS_WAITS_HISTORY_LONG
+ where event_name like 'wait/io/table/%'
+ and object_schema='test'
+ order by thread_id, event_id;
+
+# In case of failures, this will tell if table io are lost.
+show status like 'performance_schema_%';
+
+# Cleanup
+
+update performance_schema.SETUP_INSTRUMENTS set enabled='YES';
+update performance_schema.SETUP_CONSUMERS set enabled='YES';
+
+drop table test.no_index_tab;
+
=== modified file 'storage/perfschema/pfs_server.h'
--- a/storage/perfschema/pfs_server.h 2010-04-19 12:26:29 +0000
+++ b/storage/perfschema/pfs_server.h 2010-05-07 12:14:13 +0000
@@ -55,10 +55,10 @@
#define PFS_MAX_FILE_HANDLE 32768
#endif
#ifndef PFS_MAX_TABLE_SHARE
- #define PFS_MAX_TABLE_SHARE 50000
+ #define PFS_MAX_TABLE_SHARE 1000
#endif
#ifndef PFS_MAX_TABLE
- #define PFS_MAX_TABLE 100000
+ #define PFS_MAX_TABLE 10000
#endif
#ifndef PFS_WAITS_HISTORY_SIZE
#define PFS_WAITS_HISTORY_SIZE 10
Attachment: [text/bzr-bundle] bzr/marc.alff@oracle.com-20100507121413-digl5xx5cgfcee79.bundle
| Thread |
|---|
| • bzr push into mysql-next-mr-wl4895 branch (marc.alff:3143 to 3144) | Marc Alff | 7 May |