| 1 |
drop table if exists test.marker; |
| 2 |
create table test.marker(a int); |
| 3 |
update performance_schema.setup_consumers set enabled='NO'; |
| 4 |
update performance_schema.setup_instruments set enabled='NO'; |
| 5 |
update performance_schema.setup_instruments set enabled='YES' |
| 6 |
where name like "wait/io/table/%"; |
| 7 |
truncate table performance_schema.events_waits_history_long; |
| 8 |
flush status; |
| 9 |
flush tables; |
| 10 |
drop view if exists test.v1; |
| 11 |
drop table if exists test.no_index_tab; |
| 12 |
update performance_schema.setup_consumers set enabled='YES'; |
| 13 |
insert into marker set a = 1; |
| 14 |
create table test.no_index_tab |
| 15 |
( a varchar(255) not null, b int not null) engine = MyISAM; |
| 16 |
insert into marker set a = 1; |
| 17 |
show create table test.no_index_tab; |
| 18 |
Table Create Table |
| 19 |
no_index_tab CREATE TABLE `no_index_tab` ( |
| 20 |
`a` varchar(255) NOT NULL, |
| 21 |
`b` int NOT NULL |
| 22 |
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci |
| 23 |
insert into marker set a = 1; |
| 24 |
create view test.v1 as select * from test.no_index_tab; |
| 25 |
insert into marker set a = 1; |
| 26 |
insert into test.v1 set a = 'foo', b = 1; |
| 27 |
insert into marker set a = 1; |
| 28 |
insert into test.v1 set a = 'foo', b = 2; |
| 29 |
insert into marker set a = 1; |
| 30 |
insert into test.v1 set a = 'foo', b = 3; |
| 31 |
insert into marker set a = 1; |
| 32 |
select * from test.v1; |
| 33 |
a b |
| 34 |
foo 1 |
| 35 |
foo 2 |
| 36 |
foo 3 |
| 37 |
insert into marker set a = 1; |
| 38 |
update test.v1 set a = 'bar'; |
| 39 |
insert into marker set a = 1; |
| 40 |
select * from test.v1 limit 2; |
| 41 |
a b |
| 42 |
bar 1 |
| 43 |
bar 2 |
| 44 |
insert into marker set a = 1; |
| 45 |
delete from test.v1 where b = 3; |
| 46 |
insert into marker set a = 1; |
| 47 |
select * from test.v1; |
| 48 |
a b |
| 49 |
bar 1 |
| 50 |
bar 2 |
| 51 |
insert into marker set a = 1; |
| 52 |
optimize table test.v1; |
| 53 |
Table Op Msg_type Msg_text |
| 54 |
test.v1 optimize Error 'test.v1' is not BASE TABLE |
| 55 |
test.v1 optimize status Operation failed |
| 56 |
insert into marker set a = 1; |
| 57 |
select * from test.v1; |
| 58 |
a b |
| 59 |
bar 1 |
| 60 |
bar 2 |
| 61 |
insert into marker set a = 1; |
| 62 |
truncate table test.v1; |
| 63 |
ERROR 42S02: Table 'test.v1' doesn't exist |
| 64 |
insert into marker set a = 1; |
| 65 |
drop view test.v1; |
| 66 |
insert into marker set a = 1; |
| 67 |
drop table test.no_index_tab; |
| 68 |
update performance_schema.setup_consumers set enabled='NO'; |
| 69 |
select event_name, |
| 70 |
left(source, locate(":", source)) as short_source, |
| 71 |
object_type, object_schema, |
| 72 |
if (locate("#sql-", object_name), "#sql-XXXX", object_name) |
| 73 |
as pretty_name, |
| 74 |
operation, number_of_bytes |
| 75 |
from performance_schema.events_waits_history_long |
| 76 |
where event_name like 'wait/io/table/%' |
| 77 |
and object_schema in ("test") |
| 78 |
order by thread_id, event_id; |
| 79 |
event_name short_source object_type object_schema pretty_name operation number_of_bytes |
| 80 |
wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 |
| 81 |
wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 |
| 82 |
wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 |
| 83 |
wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 |
| 84 |
wait/io/table/sql/handler handler.cc: TABLE test no_index_tab insert 1 |
| 85 |
wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 |
| 86 |
wait/io/table/sql/handler handler.cc: TABLE test no_index_tab insert 1 |
| 87 |
wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 |
| 88 |
wait/io/table/sql/handler handler.cc: TABLE test no_index_tab insert 1 |
| 89 |
wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 |
| 90 |
wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 3 |
| 91 |
wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 |
| 92 |
wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 1 |
| 93 |
wait/io/table/sql/handler handler.cc: TABLE test no_index_tab update 1 |
| 94 |
wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 1 |
| 95 |
wait/io/table/sql/handler handler.cc: TABLE test no_index_tab update 1 |
| 96 |
wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 1 |
| 97 |
wait/io/table/sql/handler handler.cc: TABLE test no_index_tab update 1 |
| 98 |
wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 1 |
| 99 |
wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 |
| 100 |
wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 2 |
| 101 |
wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 |
| 102 |
wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 1 |
| 103 |
wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 1 |
| 104 |
wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 1 |
| 105 |
wait/io/table/sql/handler handler.cc: TABLE test no_index_tab delete 1 |
| 106 |
wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 1 |
| 107 |
wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 |
| 108 |
wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 2 |
| 109 |
wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 |
| 110 |
wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 |
| 111 |
wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch 2 |
| 112 |
wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 |
| 113 |
wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 |
| 114 |
wait/io/table/sql/handler handler.cc: TABLE test marker insert 1 |
| 115 |
show global status like 'performance_schema_%_lost'; |
| 116 |
Variable_name Value |
| 117 |
Performance_schema_accounts_lost 0 |
| 118 |
Performance_schema_cond_classes_lost 0 |
| 119 |
Performance_schema_cond_instances_lost 0 |
| 120 |
Performance_schema_digest_lost 0 |
| 121 |
Performance_schema_file_classes_lost 0 |
| 122 |
Performance_schema_file_handles_lost 0 |
| 123 |
Performance_schema_file_instances_lost 0 |
| 124 |
Performance_schema_hosts_lost 0 |
| 125 |
Performance_schema_index_stat_lost 0 |
| 126 |
Performance_schema_locker_lost 0 |
| 127 |
Performance_schema_memory_classes_lost 0 |
| 128 |
Performance_schema_metadata_lock_lost 0 |
| 129 |
Performance_schema_mutex_classes_lost 0 |
| 130 |
Performance_schema_mutex_instances_lost 0 |
| 131 |
Performance_schema_nested_statement_lost 0 |
| 132 |
Performance_schema_prepared_statements_lost 0 |
| 133 |
Performance_schema_program_lost 0 |
| 134 |
Performance_schema_rwlock_classes_lost 0 |
| 135 |
Performance_schema_rwlock_instances_lost 0 |
| 136 |
Performance_schema_session_connect_attrs_lost 0 |
| 137 |
Performance_schema_socket_classes_lost 0 |
| 138 |
Performance_schema_socket_instances_lost 0 |
| 139 |
Performance_schema_stage_classes_lost 0 |
| 140 |
Performance_schema_statement_classes_lost 0 |
| 141 |
Performance_schema_table_handles_lost 0 |
| 142 |
Performance_schema_table_instances_lost 0 |
| 143 |
Performance_schema_table_lock_stat_lost 0 |
| 144 |
Performance_schema_thread_classes_lost 0 |
| 145 |
Performance_schema_thread_instances_lost 0 |
| 146 |
Performance_schema_users_lost 0 |
| 147 |
truncate performance_schema.events_waits_history_long; |
| 148 |
flush status; |
| 149 |
update performance_schema.setup_consumers set enabled='NO'; |
| 150 |
truncate performance_schema.events_waits_history_long; |
| 151 |
drop table test.marker; |
| 152 |
flush status; |
| 153 |
update performance_schema.setup_instruments set enabled='YES'; |
| 154 |
update performance_schema.setup_consumers set enabled='YES'; |