#At file:///home/malff/BZR_TREE/mysql-next-mr-wl4895/ based on revid:marc.alff@stripped
3163 Marc Alff 2010-07-06
WL#4895 PERFORMANCE SCHEMA TABLE IO
Added test cases
added:
mysql-test/suite/perfschema/include/table_io_basic_dml.inc
mysql-test/suite/perfschema/include/table_io_cleanup_helper.inc
mysql-test/suite/perfschema/include/table_io_setup_helper.inc
mysql-test/suite/perfschema/r/csv_table_io.result
mysql-test/suite/perfschema/r/innodb_table_io.result
mysql-test/suite/perfschema/r/memory_table_io.result
mysql-test/suite/perfschema/r/privilege_table_io.result
mysql-test/suite/perfschema/r/trigger_table_io.result
mysql-test/suite/perfschema/t/csv_table_io.test
mysql-test/suite/perfschema/t/innodb_table_io.test
mysql-test/suite/perfschema/t/memory_table_io.test
mysql-test/suite/perfschema/t/privilege_table_io.test
mysql-test/suite/perfschema/t/trigger_table_io.test
modified:
mysql-test/suite/perfschema/r/myisam_table_io.result
mysql-test/suite/perfschema/t/myisam_table_io.test
=== added file 'mysql-test/suite/perfschema/include/table_io_basic_dml.inc'
--- a/mysql-test/suite/perfschema/include/table_io_basic_dml.inc 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/include/table_io_basic_dml.inc 2010-07-07 03:14:49 +0000
@@ -0,0 +1,92 @@
+# 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,
+# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
+
+# Tests for PERFORMANCE_SCHEMA
+
+# Payload fragment to test table io for basic DML.
+
+# Setup
+
+--disable_warnings
+drop table if exists test.no_index_tab;
+drop temporary table if exists test.temp_tab;
+--enable_warnings
+
+# Start recording events
+update performance_schema.SETUP_CONSUMERS set enabled='YES';
+
+# Code to test
+
+insert into marker set a=1;
+eval create table test.no_index_tab
+ ( a varchar(255) not null, b int not null) engine=$engine_type;
+# Make sure the proper engine is used
+show create table test.no_index_tab;
+insert into marker set a=1;
+insert into no_index_tab set a = 'foo', b = 1;
+insert into marker set a=1;
+insert into no_index_tab set a = 'foo', b = 2;
+insert into marker set a=1;
+insert into no_index_tab set a = 'foo', b = 3;
+insert into marker set a=1;
+select * from test.no_index_tab;
+insert into marker set a=1;
+update test.no_index_tab set a = 'bar';
+insert into marker set a=1;
+select * from test.no_index_tab limit 2;
+insert into marker set a=1;
+delete from test.no_index_tab where b = 3;
+insert into marker set a=1;
+# This may record a fetch for "deleted" records
+select * from test.no_index_tab;
+insert into marker set a=1;
+optimize table test.no_index_tab;
+insert into marker set a=1;
+# Same data after optimize
+select * from test.no_index_tab;
+insert into marker set a=1;
+truncate table test.no_index_tab;
+
+insert into marker set a=1;
+eval create temporary table test.temp_tab
+ ( a varchar(255) not null, b int not null) engine=$engine_type;
+show create table test.temp_tab;
+insert into marker set a=1;
+insert into temp_tab set a = 'foo', b = 1;
+insert into marker set a=1;
+insert into temp_tab set a = 'foo', b = 2;
+insert into marker set a=1;
+insert into temp_tab set a = 'foo', b = 3;
+insert into marker set a=1;
+select * from test.temp_tab;
+insert into marker set a=1;
+update test.temp_tab set a = 'bar';
+insert into marker set a=1;
+select * from test.temp_tab limit 2;
+insert into marker set a=1;
+delete from test.temp_tab where b = 3;
+insert into marker set a=1;
+select * from test.temp_tab;
+insert into marker set a=1;
+truncate table test.temp_tab;
+
+# Stop recording events
+update performance_schema.SETUP_CONSUMERS set enabled='NO';
+
+# Cleanup
+
+drop table test.no_index_tab;
+drop temporary table test.temp_tab;
+
=== added file 'mysql-test/suite/perfschema/include/table_io_cleanup_helper.inc'
--- a/mysql-test/suite/perfschema/include/table_io_cleanup_helper.inc 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/include/table_io_cleanup_helper.inc 2010-07-07 03:14:49 +0000
@@ -0,0 +1,39 @@
+# 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,
+# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
+
+# See related script table_io_setup_helper.inc
+
+eval select event_name,
+ left(source, locate(":", source)) as short_source,
+ object_type, object_schema,
+ if (locate("#sql-", object_name), "#sql-XXXX", object_name)
+ as pretty_name,
+ operation, number_of_bytes
+ from performance_schema.EVENTS_WAITS_HISTORY_LONG
+ where event_name like 'wait/io/table/%'
+ and object_schema in ($schema_to_dump)
+ 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.marker;
+
+
=== added file 'mysql-test/suite/perfschema/include/table_io_setup_helper.inc'
--- a/mysql-test/suite/perfschema/include/table_io_setup_helper.inc 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/include/table_io_setup_helper.inc 2010-07-07 03:14:49 +0000
@@ -0,0 +1,66 @@
+# 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,
+# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
+
+# Performance schema test template
+
+# How to use this script in a test case
+# =====================================
+#
+# The general table io test template is as follows
+#
+# --source include/not_embedded.inc
+# --source include/have_perfschema.inc
+# --source ../include/table_io_setup_helper.inc
+# ... more setup scripts as needed ...
+# update performance_schema.SETUP_CONSUMERS set enabled='YES';
+# ... test payload here ...
+# ... optionally, add this insert between statements
+# ... to make the final output more readable
+# insert into test.marker set a=1;
+# ... more test payload here ...
+# update performance_schema.SETUP_CONSUMERS set enabled='NO';
+# ... more cleanup scripts as needed...
+# ... optionaly, add the following line (by default, only "test" is dumped) ...
+# let $schema_to_dump="db1", "db2", "db3";
+# --source ../include/table_io_cleanup_helper.inc
+#
+# (end of template)
+
+# Setup
+
+--disable_warnings
+drop table if exists test.marker;
+--enable_warnings
+
+# To be used in the test payload,
+# insert into marker makes the test output easier to read,
+# to separate table io events between statements.
+create table test.marker(a int);
+
+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;
+
+# By default, dump table io only for test.
+# A test can overide this
+let $schema_to_dump="test";
+
=== added file 'mysql-test/suite/perfschema/r/csv_table_io.result'
--- a/mysql-test/suite/perfschema/r/csv_table_io.result 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/r/csv_table_io.result 2010-07-07 03:14:49 +0000
@@ -0,0 +1,200 @@
+drop table if exists test.marker;
+create table test.marker(a int);
+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;
+drop table if exists test.no_index_tab;
+drop temporary table if exists test.temp_tab;
+update performance_schema.SETUP_CONSUMERS set enabled='YES';
+insert into marker set a=1;
+create table test.no_index_tab
+( a varchar(255) not null, b int not null) engine=csv;
+show create table test.no_index_tab;
+Table Create Table
+no_index_tab CREATE TABLE `no_index_tab` (
+ `a` varchar(255) NOT NULL,
+ `b` int(11) NOT NULL
+) ENGINE=CSV DEFAULT CHARSET=latin1
+insert into marker set a=1;
+insert into no_index_tab set a = 'foo', b = 1;
+insert into marker set a=1;
+insert into no_index_tab set a = 'foo', b = 2;
+insert into marker set a=1;
+insert into no_index_tab set a = 'foo', b = 3;
+insert into marker set a=1;
+select * from test.no_index_tab;
+a b
+foo 1
+foo 2
+foo 3
+insert into marker set a=1;
+update test.no_index_tab set a = 'bar';
+insert into marker set a=1;
+select * from test.no_index_tab limit 2;
+a b
+bar 1
+bar 2
+insert into marker set a=1;
+delete from test.no_index_tab where b = 3;
+insert into marker set a=1;
+select * from test.no_index_tab;
+a b
+bar 1
+bar 2
+insert into marker set a=1;
+optimize table test.no_index_tab;
+Table Op Msg_type Msg_text
+test.no_index_tab optimize note The storage engine for the table doesn't support optimize
+insert into marker set a=1;
+select * from test.no_index_tab;
+a b
+bar 1
+bar 2
+insert into marker set a=1;
+truncate table test.no_index_tab;
+insert into marker set a=1;
+create temporary table test.temp_tab
+( a varchar(255) not null, b int not null) engine=csv;
+show create table test.temp_tab;
+Table Create Table
+temp_tab CREATE TEMPORARY TABLE `temp_tab` (
+ `a` varchar(255) NOT NULL,
+ `b` int(11) NOT NULL
+) ENGINE=CSV DEFAULT CHARSET=latin1
+insert into marker set a=1;
+insert into temp_tab set a = 'foo', b = 1;
+insert into marker set a=1;
+insert into temp_tab set a = 'foo', b = 2;
+insert into marker set a=1;
+insert into temp_tab set a = 'foo', b = 3;
+insert into marker set a=1;
+select * from test.temp_tab;
+a b
+foo 1
+foo 2
+foo 3
+insert into marker set a=1;
+update test.temp_tab set a = 'bar';
+insert into marker set a=1;
+select * from test.temp_tab limit 2;
+a b
+bar 1
+bar 2
+insert into marker set a=1;
+delete from test.temp_tab where b = 3;
+insert into marker set a=1;
+select * from test.temp_tab;
+a b
+bar 1
+bar 2
+insert into marker set a=1;
+truncate table test.temp_tab;
+update performance_schema.SETUP_CONSUMERS set enabled='NO';
+drop table test.no_index_tab;
+drop temporary table test.temp_tab;
+select event_name,
+left(source, locate(":", source)) as short_source,
+object_type, object_schema,
+if (locate("#sql-", object_name), "#sql-XXXX", object_name)
+as pretty_name,
+operation, number_of_bytes
+from performance_schema.EVENTS_WAITS_HISTORY_LONG
+where event_name like 'wait/io/table/%'
+ and object_schema in ("test")
+order by thread_id, event_id;
+event_name short_source object_type object_schema pretty_name operation number_of_bytes
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker 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 marker 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 marker 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 marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: 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.cc: 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.cc: 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.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: 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.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TEMPORARY TABLE test temp_tab insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TEMPORARY TABLE test temp_tab insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TEMPORARY TABLE test temp_tab insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TEMPORARY TABLE test temp_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TEMPORARY TABLE test temp_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TEMPORARY TABLE test temp_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TEMPORARY TABLE test temp_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: 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.cc: 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.cc: 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.cc: TEMPORARY TABLE test temp_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TEMPORARY TABLE test temp_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TEMPORARY TABLE test temp_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TEMPORARY TABLE test temp_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TEMPORARY TABLE test temp_tab fetch NULL
+wait/io/table/sql/handler handler.cc: 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.cc: TEMPORARY TABLE test temp_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TEMPORARY TABLE test temp_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TEMPORARY TABLE test temp_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TEMPORARY TABLE test temp_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert 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.marker;
=== added file 'mysql-test/suite/perfschema/r/innodb_table_io.result'
--- a/mysql-test/suite/perfschema/r/innodb_table_io.result 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/r/innodb_table_io.result 2010-07-07 03:14:49 +0000
@@ -0,0 +1,206 @@
+drop table if exists test.marker;
+create table test.marker(a int);
+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;
+drop table if exists test.no_index_tab;
+drop temporary table if exists test.temp_tab;
+update performance_schema.SETUP_CONSUMERS set enabled='YES';
+insert into marker set a=1;
+create table test.no_index_tab
+( a varchar(255) not null, b int not null) engine=innodb;
+show create table test.no_index_tab;
+Table Create Table
+no_index_tab CREATE TABLE `no_index_tab` (
+ `a` varchar(255) NOT NULL,
+ `b` int(11) NOT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+insert into marker set a=1;
+insert into no_index_tab set a = 'foo', b = 1;
+insert into marker set a=1;
+insert into no_index_tab set a = 'foo', b = 2;
+insert into marker set a=1;
+insert into no_index_tab set a = 'foo', b = 3;
+insert into marker set a=1;
+select * from test.no_index_tab;
+a b
+foo 1
+foo 2
+foo 3
+insert into marker set a=1;
+update test.no_index_tab set a = 'bar';
+insert into marker set a=1;
+select * from test.no_index_tab limit 2;
+a b
+bar 1
+bar 2
+insert into marker set a=1;
+delete from test.no_index_tab where b = 3;
+insert into marker set a=1;
+select * from test.no_index_tab;
+a b
+bar 1
+bar 2
+insert into marker set a=1;
+optimize table test.no_index_tab;
+Table Op Msg_type Msg_text
+test.no_index_tab optimize note Table does not support optimize, doing recreate + analyze instead
+test.no_index_tab optimize status OK
+insert into marker set a=1;
+select * from test.no_index_tab;
+a b
+bar 1
+bar 2
+insert into marker set a=1;
+truncate table test.no_index_tab;
+insert into marker set a=1;
+create temporary table test.temp_tab
+( a varchar(255) not null, b int not null) engine=innodb;
+show create table test.temp_tab;
+Table Create Table
+temp_tab CREATE TEMPORARY TABLE `temp_tab` (
+ `a` varchar(255) NOT NULL,
+ `b` int(11) NOT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+insert into marker set a=1;
+insert into temp_tab set a = 'foo', b = 1;
+insert into marker set a=1;
+insert into temp_tab set a = 'foo', b = 2;
+insert into marker set a=1;
+insert into temp_tab set a = 'foo', b = 3;
+insert into marker set a=1;
+select * from test.temp_tab;
+a b
+foo 1
+foo 2
+foo 3
+insert into marker set a=1;
+update test.temp_tab set a = 'bar';
+insert into marker set a=1;
+select * from test.temp_tab limit 2;
+a b
+bar 1
+bar 2
+insert into marker set a=1;
+delete from test.temp_tab where b = 3;
+insert into marker set a=1;
+select * from test.temp_tab;
+a b
+bar 1
+bar 2
+insert into marker set a=1;
+truncate table test.temp_tab;
+update performance_schema.SETUP_CONSUMERS set enabled='NO';
+drop table test.no_index_tab;
+drop temporary table test.temp_tab;
+select event_name,
+left(source, locate(":", source)) as short_source,
+object_type, object_schema,
+if (locate("#sql-", object_name), "#sql-XXXX", object_name)
+as pretty_name,
+operation, number_of_bytes
+from performance_schema.EVENTS_WAITS_HISTORY_LONG
+where event_name like 'wait/io/table/%'
+ and object_schema in ("test")
+order by thread_id, event_id;
+event_name short_source object_type object_schema pretty_name operation number_of_bytes
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker 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 marker 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 marker 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 marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: 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.cc: 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.cc: 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.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: 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.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TEMPORARY TABLE test #sql-XXXX insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TEMPORARY TABLE test #sql-XXXX insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TEMPORARY TABLE test temp_tab insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TEMPORARY TABLE test temp_tab insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TEMPORARY TABLE test temp_tab insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TEMPORARY TABLE test temp_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TEMPORARY TABLE test temp_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TEMPORARY TABLE test temp_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TEMPORARY TABLE test temp_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: 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.cc: 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.cc: 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.cc: TEMPORARY TABLE test temp_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TEMPORARY TABLE test temp_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TEMPORARY TABLE test temp_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TEMPORARY TABLE test temp_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TEMPORARY TABLE test temp_tab fetch NULL
+wait/io/table/sql/handler handler.cc: 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.cc: TEMPORARY TABLE test temp_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TEMPORARY TABLE test temp_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TEMPORARY TABLE test temp_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TEMPORARY TABLE test temp_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert 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.marker;
=== added file 'mysql-test/suite/perfschema/r/memory_table_io.result'
--- a/mysql-test/suite/perfschema/r/memory_table_io.result 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/r/memory_table_io.result 2010-07-07 03:14:49 +0000
@@ -0,0 +1,203 @@
+drop table if exists test.marker;
+create table test.marker(a int);
+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;
+drop table if exists test.no_index_tab;
+drop temporary table if exists test.temp_tab;
+update performance_schema.SETUP_CONSUMERS set enabled='YES';
+insert into marker set a=1;
+create table test.no_index_tab
+( a varchar(255) not null, b int not null) engine=memory;
+show create table test.no_index_tab;
+Table Create Table
+no_index_tab CREATE TABLE `no_index_tab` (
+ `a` varchar(255) NOT NULL,
+ `b` int(11) NOT NULL
+) ENGINE=MEMORY DEFAULT CHARSET=latin1
+insert into marker set a=1;
+insert into no_index_tab set a = 'foo', b = 1;
+insert into marker set a=1;
+insert into no_index_tab set a = 'foo', b = 2;
+insert into marker set a=1;
+insert into no_index_tab set a = 'foo', b = 3;
+insert into marker set a=1;
+select * from test.no_index_tab;
+a b
+foo 1
+foo 2
+foo 3
+insert into marker set a=1;
+update test.no_index_tab set a = 'bar';
+insert into marker set a=1;
+select * from test.no_index_tab limit 2;
+a b
+bar 1
+bar 2
+insert into marker set a=1;
+delete from test.no_index_tab where b = 3;
+insert into marker set a=1;
+select * from test.no_index_tab;
+a b
+bar 1
+bar 2
+insert into marker set a=1;
+optimize table test.no_index_tab;
+Table Op Msg_type Msg_text
+test.no_index_tab optimize note The storage engine for the table doesn't support optimize
+insert into marker set a=1;
+select * from test.no_index_tab;
+a b
+bar 1
+bar 2
+insert into marker set a=1;
+truncate table test.no_index_tab;
+insert into marker set a=1;
+create temporary table test.temp_tab
+( a varchar(255) not null, b int not null) engine=memory;
+show create table test.temp_tab;
+Table Create Table
+temp_tab CREATE TEMPORARY TABLE `temp_tab` (
+ `a` varchar(255) NOT NULL,
+ `b` int(11) NOT NULL
+) ENGINE=MEMORY DEFAULT CHARSET=latin1
+insert into marker set a=1;
+insert into temp_tab set a = 'foo', b = 1;
+insert into marker set a=1;
+insert into temp_tab set a = 'foo', b = 2;
+insert into marker set a=1;
+insert into temp_tab set a = 'foo', b = 3;
+insert into marker set a=1;
+select * from test.temp_tab;
+a b
+foo 1
+foo 2
+foo 3
+insert into marker set a=1;
+update test.temp_tab set a = 'bar';
+insert into marker set a=1;
+select * from test.temp_tab limit 2;
+a b
+bar 1
+bar 2
+insert into marker set a=1;
+delete from test.temp_tab where b = 3;
+insert into marker set a=1;
+select * from test.temp_tab;
+a b
+bar 1
+bar 2
+insert into marker set a=1;
+truncate table test.temp_tab;
+update performance_schema.SETUP_CONSUMERS set enabled='NO';
+drop table test.no_index_tab;
+drop temporary table test.temp_tab;
+select event_name,
+left(source, locate(":", source)) as short_source,
+object_type, object_schema,
+if (locate("#sql-", object_name), "#sql-XXXX", object_name)
+as pretty_name,
+operation, number_of_bytes
+from performance_schema.EVENTS_WAITS_HISTORY_LONG
+where event_name like 'wait/io/table/%'
+ and object_schema in ("test")
+order by thread_id, event_id;
+event_name short_source object_type object_schema pretty_name operation number_of_bytes
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker 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 marker 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 marker 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 marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: 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.cc: 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.cc: 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.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: 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.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TEMPORARY TABLE test temp_tab insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TEMPORARY TABLE test temp_tab insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TEMPORARY TABLE test temp_tab insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TEMPORARY TABLE test temp_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TEMPORARY TABLE test temp_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TEMPORARY TABLE test temp_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TEMPORARY TABLE test temp_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: 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.cc: 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.cc: 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.cc: TEMPORARY TABLE test temp_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TEMPORARY TABLE test temp_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TEMPORARY TABLE test temp_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TEMPORARY TABLE test temp_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TEMPORARY TABLE test temp_tab fetch NULL
+wait/io/table/sql/handler handler.cc: 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.cc: TEMPORARY TABLE test temp_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TEMPORARY TABLE test temp_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TEMPORARY TABLE test temp_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TEMPORARY TABLE test temp_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TEMPORARY TABLE test temp_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert 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.marker;
=== modified file 'mysql-test/suite/perfschema/r/myisam_table_io.result'
--- a/mysql-test/suite/perfschema/r/myisam_table_io.result 2010-05-25 08:19:01 +0000
+++ b/mysql-test/suite/perfschema/r/myisam_table_io.result 2010-07-07 03:14:49 +0000
@@ -1,69 +1,124 @@
+drop table if exists test.marker;
+create table test.marker(a int);
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;
+update performance_schema.SETUP_CONSUMERS set enabled='YES';
+insert into marker set a=1;
+create table test.no_index_tab
+( a varchar(255) not null, b int not null) engine=myisam;
+show create table test.no_index_tab;
+Table Create Table
+no_index_tab CREATE TABLE `no_index_tab` (
+ `a` varchar(255) NOT NULL,
+ `b` int(11) NOT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+insert into marker set a=1;
insert into no_index_tab set a = 'foo', b = 1;
+insert into marker set a=1;
insert into no_index_tab set a = 'foo', b = 2;
+insert into marker set a=1;
insert into no_index_tab set a = 'foo', b = 3;
+insert into marker set a=1;
select * from test.no_index_tab;
a b
foo 1
foo 2
foo 3
+insert into marker set a=1;
update test.no_index_tab set a = 'bar';
+insert into marker set a=1;
select * from test.no_index_tab limit 2;
a b
bar 1
bar 2
+insert into marker set a=1;
delete from test.no_index_tab where b = 3;
+insert into marker set a=1;
+select * from test.no_index_tab;
+a b
+bar 1
+bar 2
+insert into marker set a=1;
+optimize table test.no_index_tab;
+Table Op Msg_type Msg_text
+test.no_index_tab optimize status OK
+insert into marker set a=1;
select * from test.no_index_tab;
a b
bar 1
bar 2
+insert into marker set a=1;
truncate table test.no_index_tab;
-create temporary table test.temp_tab ( a varchar(255), b int ) engine=myisam;
+insert into marker set a=1;
+create temporary table test.temp_tab
+( a varchar(255) not null, b int not null) engine=myisam;
+show create table test.temp_tab;
+Table Create Table
+temp_tab CREATE TEMPORARY TABLE `temp_tab` (
+ `a` varchar(255) NOT NULL,
+ `b` int(11) NOT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+insert into marker set a=1;
insert into temp_tab set a = 'foo', b = 1;
+insert into marker set a=1;
insert into temp_tab set a = 'foo', b = 2;
+insert into marker set a=1;
insert into temp_tab set a = 'foo', b = 3;
+insert into marker set a=1;
select * from test.temp_tab;
a b
foo 1
foo 2
foo 3
+insert into marker set a=1;
update test.temp_tab set a = 'bar';
+insert into marker set a=1;
select * from test.temp_tab limit 2;
a b
bar 1
bar 2
+insert into marker set a=1;
delete from test.temp_tab where b = 3;
+insert into marker set a=1;
select * from test.temp_tab;
a b
bar 1
bar 2
+insert into marker set a=1;
truncate table test.temp_tab;
update performance_schema.SETUP_CONSUMERS set enabled='NO';
+drop table test.no_index_tab;
+drop temporary table test.temp_tab;
select event_name,
left(source, locate(":", source)) as short_source,
-object_type, object_schema, object_name,
+object_type, object_schema,
+if (locate("#sql-", object_name), "#sql-XXXX", object_name)
+as pretty_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
+ and object_schema in ("test")
+order by thread_id, event_id;
+event_name short_source object_type object_schema pretty_name operation number_of_bytes
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker 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 marker 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 marker 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 marker insert NULL
wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
wait/io/table/sql/handler handler.cc: 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.cc: TABLE test no_index_tab fetch NULL
@@ -71,23 +126,38 @@ wait/io/table/sql/handler handler.cc: TA
wait/io/table/sql/handler handler.cc: 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.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
wait/io/table/sql/handler handler.cc: 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.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
wait/io/table/sql/handler handler.cc: TEMPORARY TABLE test temp_tab insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
wait/io/table/sql/handler handler.cc: TEMPORARY TABLE test temp_tab insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
wait/io/table/sql/handler handler.cc: TEMPORARY TABLE test temp_tab insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
wait/io/table/sql/handler handler.cc: TEMPORARY TABLE test temp_tab fetch NULL
wait/io/table/sql/handler handler.cc: TEMPORARY TABLE test temp_tab fetch NULL
wait/io/table/sql/handler handler.cc: TEMPORARY TABLE test temp_tab fetch NULL
wait/io/table/sql/handler handler.cc: TEMPORARY TABLE test temp_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
wait/io/table/sql/handler handler.cc: 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.cc: TEMPORARY TABLE test temp_tab fetch NULL
@@ -95,16 +165,20 @@ wait/io/table/sql/handler handler.cc: TE
wait/io/table/sql/handler handler.cc: 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.cc: TEMPORARY TABLE test temp_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
wait/io/table/sql/handler handler.cc: TEMPORARY TABLE test temp_tab fetch NULL
wait/io/table/sql/handler handler.cc: TEMPORARY TABLE test temp_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
wait/io/table/sql/handler handler.cc: TEMPORARY TABLE test temp_tab fetch NULL
wait/io/table/sql/handler handler.cc: TEMPORARY TABLE test temp_tab fetch NULL
wait/io/table/sql/handler handler.cc: 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.cc: TEMPORARY TABLE test temp_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
wait/io/table/sql/handler handler.cc: TEMPORARY TABLE test temp_tab fetch NULL
wait/io/table/sql/handler handler.cc: TEMPORARY TABLE test temp_tab fetch NULL
wait/io/table/sql/handler handler.cc: TEMPORARY TABLE test temp_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
show status like 'performance_schema_%';
Variable_name Value
Performance_schema_cond_classes_lost 0
@@ -123,4 +197,4 @@ 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;
+drop table test.marker;
=== added file 'mysql-test/suite/perfschema/r/privilege_table_io.result'
--- a/mysql-test/suite/perfschema/r/privilege_table_io.result 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/r/privilege_table_io.result 2010-07-07 03:14:49 +0000
@@ -0,0 +1,62 @@
+drop table if exists test.marker;
+create table test.marker(a int);
+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;
+optimize table mysql.db;
+Table Op Msg_type Msg_text
+mysql.db optimize status OK
+update performance_schema.SETUP_CONSUMERS set enabled='YES';
+flush privileges;
+insert into test.marker set a=1;
+insert into test.marker set a=1;
+insert into test.marker set a=1;
+update performance_schema.SETUP_CONSUMERS set enabled='NO';
+select event_name,
+left(source, locate(":", source)) as short_source,
+object_type, object_schema,
+if (locate("#sql-", object_name), "#sql-XXXX", object_name)
+as pretty_name,
+operation, number_of_bytes
+from performance_schema.EVENTS_WAITS_HISTORY_LONG
+where event_name like 'wait/io/table/%'
+ and object_schema in ("test", "mysql")
+order by thread_id, event_id;
+event_name short_source object_type object_schema pretty_name operation number_of_bytes
+wait/io/table/sql/handler handler.cc: TABLE mysql host fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE mysql user fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE mysql user fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE mysql user fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE mysql user fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE mysql user fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE mysql db fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE mysql db fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE mysql db fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE mysql tables_priv fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE mysql procs_priv fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE mysql servers fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert 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.marker;
=== added file 'mysql-test/suite/perfschema/r/trigger_table_io.result'
--- a/mysql-test/suite/perfschema/r/trigger_table_io.result 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/r/trigger_table_io.result 2010-07-07 03:14:49 +0000
@@ -0,0 +1,191 @@
+drop table if exists test.marker;
+create table test.marker(a int);
+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;
+drop table if exists test.t1;
+drop table if exists test.t2;
+create table test.t1 (a int, v int);
+create table test.t2 (b int, v int);
+create trigger t1_bi before insert on t1
+for each row insert into test.t2 set b= new.a, v= 0;
+create trigger t1_ai after insert on t1
+for each row update test.t2 set v= 1 where b = new.a;
+create trigger t1_bu before update on t1
+for each row update test.t2 set v= 3 where b = old.a;
+create trigger t1_au after update on t1
+for each row update test.t2 set v= 4 where b = new.a;
+create trigger t1_bd before delete on t1
+for each row delete from test.t2 where b = old.a;
+create trigger t1_ad after delete on t1
+for each row insert into test.t2 set b= old.a, v=99;
+update performance_schema.SETUP_CONSUMERS set enabled='YES';
+insert into marker set a=1;
+insert into t1 set a=1, v=10;
+insert into marker set a=1;
+insert into t1 set a=2, v=20;
+insert into marker set a=1;
+select * from t1;
+a v
+1 10
+2 20
+insert into marker set a=1;
+select * from t2;
+b v
+1 1
+2 1
+insert into marker set a=1;
+update t1 set v=v+100;
+insert into marker set a=1;
+select * from t1;
+a v
+1 110
+2 120
+insert into marker set a=1;
+select * from t2;
+b v
+1 4
+2 4
+insert into marker set a=1;
+delete from t1 where a=1;
+insert into marker set a=1;
+select * from t1;
+a v
+2 120
+insert into marker set a=1;
+select * from t2;
+b v
+1 99
+2 4
+insert into marker set a=1;
+delete from t1 where a=2;
+insert into marker set a=1;
+select * from t1;
+a v
+insert into marker set a=1;
+select * from t2;
+b v
+1 99
+2 99
+update performance_schema.SETUP_CONSUMERS set enabled='NO';
+drop table test.t1;
+drop table test.t2;
+select event_name,
+left(source, locate(":", source)) as short_source,
+object_type, object_schema,
+if (locate("#sql-", object_name), "#sql-XXXX", object_name)
+as pretty_name,
+operation, number_of_bytes
+from performance_schema.EVENTS_WAITS_HISTORY_LONG
+where event_name like 'wait/io/table/%'
+ and object_schema in ("test")
+order by thread_id, event_id;
+event_name short_source object_type object_schema pretty_name operation number_of_bytes
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test t1 insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 update NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test t1 insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 update NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test t1 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t1 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t1 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test t1 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 update NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t1 update NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 update NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t1 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 update NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t1 update NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 update NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t1 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test t1 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t1 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t1 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test t1 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 delete NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t1 delete NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test t1 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t1 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test t1 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t1 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test t1 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t1 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 delete NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t1 delete NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test t1 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test t1 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t1 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t1 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 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.marker;
=== added file 'mysql-test/suite/perfschema/t/csv_table_io.test'
--- a/mysql-test/suite/perfschema/t/csv_table_io.test 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/t/csv_table_io.test 2010-07-07 03:14:49 +0000
@@ -0,0 +1,24 @@
+# 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,
+# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
+
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+--source ../include/table_io_setup_helper.inc
+let $engine_type=csv;
+--source ../include/table_io_basic_dml.inc
+--source ../include/table_io_cleanup_helper.inc
+
=== added file 'mysql-test/suite/perfschema/t/innodb_table_io.test'
--- a/mysql-test/suite/perfschema/t/innodb_table_io.test 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/t/innodb_table_io.test 2010-07-07 03:14:49 +0000
@@ -0,0 +1,24 @@
+# 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,
+# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
+
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+--source ../include/table_io_setup_helper.inc
+let $engine_type=innodb;
+--source ../include/table_io_basic_dml.inc
+--source ../include/table_io_cleanup_helper.inc
+
=== added file 'mysql-test/suite/perfschema/t/memory_table_io.test'
--- a/mysql-test/suite/perfschema/t/memory_table_io.test 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/t/memory_table_io.test 2010-07-07 03:14:49 +0000
@@ -0,0 +1,24 @@
+# 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,
+# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
+
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+--source ../include/table_io_setup_helper.inc
+let $engine_type=memory;
+--source ../include/table_io_basic_dml.inc
+--source ../include/table_io_cleanup_helper.inc
+
=== modified file 'mysql-test/suite/perfschema/t/myisam_table_io.test'
--- a/mysql-test/suite/perfschema/t/myisam_table_io.test 2010-07-02 17:25:26 +0000
+++ b/mysql-test/suite/perfschema/t/myisam_table_io.test 2010-07-07 03:14:49 +0000
@@ -17,83 +17,8 @@
--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;
+--source ../include/table_io_setup_helper.inc
+let $engine_type=myisam;
+--source ../include/table_io_basic_dml.inc
+--source ../include/table_io_cleanup_helper.inc
=== added file 'mysql-test/suite/perfschema/t/privilege_table_io.test'
--- a/mysql-test/suite/perfschema/t/privilege_table_io.test 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/t/privilege_table_io.test 2010-07-07 03:14:49 +0000
@@ -0,0 +1,44 @@
+# 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,
+# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
+
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+--source ../include/table_io_setup_helper.inc
+
+# Remove "deleted" records from mysql.db
+# that may come from previous tests,
+# to avoid displaying spurious fetch
+optimize table mysql.db;
+
+# Start recording events
+update performance_schema.SETUP_CONSUMERS set enabled='YES';
+
+# Code to test
+
+flush privileges;
+# This will cause table io in mysql system security tables
+insert into test.marker set a=1;
+# This will not, the ACL cache is already loaded
+insert into test.marker set a=1;
+insert into test.marker set a=1;
+
+# Stop recording events
+update performance_schema.SETUP_CONSUMERS set enabled='NO';
+
+let $schema_to_dump="test", "mysql";
+--source ../include/table_io_cleanup_helper.inc
+
=== added file 'mysql-test/suite/perfschema/t/trigger_table_io.test'
--- a/mysql-test/suite/perfschema/t/trigger_table_io.test 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/t/trigger_table_io.test 2010-07-07 03:14:49 +0000
@@ -0,0 +1,87 @@
+# 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,
+# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
+
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+--source ../include/table_io_setup_helper.inc
+
+--disable_warnings
+drop table if exists test.t1;
+drop table if exists test.t2;
+--enable_warnings
+
+create table test.t1 (a int, v int);
+create table test.t2 (b int, v int);
+
+create trigger t1_bi before insert on t1
+for each row insert into test.t2 set b= new.a, v= 0;
+
+create trigger t1_ai after insert on t1
+for each row update test.t2 set v= 1 where b = new.a;
+
+create trigger t1_bu before update on t1
+for each row update test.t2 set v= 3 where b = old.a;
+
+create trigger t1_au after update on t1
+for each row update test.t2 set v= 4 where b = new.a;
+
+create trigger t1_bd before delete on t1
+for each row delete from test.t2 where b = old.a;
+
+create trigger t1_ad after delete on t1
+for each row insert into test.t2 set b= old.a, v=99;
+
+# Start recording events
+update performance_schema.SETUP_CONSUMERS set enabled='YES';
+
+# Code to test
+
+insert into marker set a=1;
+insert into t1 set a=1, v=10;
+insert into marker set a=1;
+insert into t1 set a=2, v=20;
+insert into marker set a=1;
+select * from t1;
+insert into marker set a=1;
+select * from t2;
+insert into marker set a=1;
+update t1 set v=v+100;
+insert into marker set a=1;
+select * from t1;
+insert into marker set a=1;
+select * from t2;
+insert into marker set a=1;
+delete from t1 where a=1;
+insert into marker set a=1;
+select * from t1;
+insert into marker set a=1;
+select * from t2;
+insert into marker set a=1;
+delete from t1 where a=2;
+insert into marker set a=1;
+select * from t1;
+insert into marker set a=1;
+select * from t2;
+
+# Stop recording events
+update performance_schema.SETUP_CONSUMERS set enabled='NO';
+
+drop table test.t1;
+drop table test.t2;
+
+--source ../include/table_io_cleanup_helper.inc
+
Attachment: [text/bzr-bundle] bzr/marc.alff@oracle.com-20100707031449-z9w4psrdtl705pg3.bundle
| Thread |
|---|
| • bzr commit into mysql-next-mr-wl4895 branch (marc.alff:3163) WL#4895 | Marc Alff | 7 Jul |