Debian Codegraph @

mysql-test/suite/perfschema/r/trigger_table_io.result

raw
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 table if exists test.t1;
11 drop table if exists test.t2;
12 create table test.t1 (a int, v int) engine = MyISAM;
13 create table test.t2 (b int, v int) engine = MyISAM;
14 create trigger t1_bi before insert on t1
15 for each row insert into test.t2 set b = new.a, v = 0;
16 create trigger t1_ai after insert on t1
17 for each row update test.t2 set v = 1 where b = new.a;
18 create trigger t1_bu before update on t1
19 for each row update test.t2 set v = 3 where b = old.a;
20 create trigger t1_au after update on t1
21 for each row update test.t2 set v = 4 where b = new.a;
22 create trigger t1_bd before delete on t1
23 for each row delete from test.t2 where b = old.a;
24 create trigger t1_ad after delete on t1
25 for each row insert into test.t2 set b = old.a, v = 99;
26 update performance_schema.setup_consumers set enabled = 'YES';
27 insert into marker set a = 1;
28 insert into t1 set a = 1, v = 10;
29 insert into marker set a = 1;
30 insert into t1 set a = 2, v = 20;
31 insert into marker set a = 1;
32 select * from t1;
33 a v
34 1 10
35 2 20
36 insert into marker set a = 1;
37 select * from t2;
38 b v
39 1 1
40 2 1
41 insert into marker set a = 1;
42 update t1 set v = v + 100;
43 insert into marker set a = 1;
44 select * from t1;
45 a v
46 1 110
47 2 120
48 insert into marker set a = 1;
49 select * from t2;
50 b v
51 1 4
52 2 4
53 insert into marker set a = 1;
54 delete from t1 where a = 1;
55 insert into marker set a = 1;
56 select * from t1;
57 a v
58 2 120
59 insert into marker set a = 1;
60 select * from t2;
61 b v
62 1 99
63 2 4
64 insert into marker set a = 1;
65 delete from t1 where a = 2;
66 insert into marker set a = 1;
67 select * from t1;
68 a v
69 insert into marker set a = 1;
70 select * from t2;
71 b v
72 1 99
73 2 99
74 update performance_schema.setup_consumers set enabled='NO';
75 select event_name,
76 left(source, locate(":", source)) as short_source,
77 object_type, object_schema,
78 if (locate("#sql-", object_name), "#sql-XXXX", object_name)
79 as pretty_name,
80 operation, number_of_bytes
81 from performance_schema.events_waits_history_long
82 where event_name like 'wait/io/table/%'
83 and object_schema in ("test")
84 order by thread_id, event_id;
85 event_name short_source object_type object_schema pretty_name operation number_of_bytes
86 wait/io/table/sql/handler handler.cc: TABLE test marker insert 1
87 wait/io/table/sql/handler handler.cc: TABLE test t2 insert 1
88 wait/io/table/sql/handler handler.cc: TABLE test t1 insert 1
89 wait/io/table/sql/handler handler.cc: TABLE test t2 fetch 1
90 wait/io/table/sql/handler handler.cc: TABLE test t2 update 1
91 wait/io/table/sql/handler handler.cc: TABLE test t2 fetch 1
92 wait/io/table/sql/handler handler.cc: TABLE test marker insert 1
93 wait/io/table/sql/handler handler.cc: TABLE test t2 insert 1
94 wait/io/table/sql/handler handler.cc: TABLE test t1 insert 1
95 wait/io/table/sql/handler handler.cc: TABLE test t2 fetch 1
96 wait/io/table/sql/handler handler.cc: TABLE test t2 fetch 1
97 wait/io/table/sql/handler handler.cc: TABLE test t2 update 1
98 wait/io/table/sql/handler handler.cc: TABLE test t2 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 t1 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 t2 fetch 2
103 wait/io/table/sql/handler handler.cc: TABLE test marker insert 1
104 wait/io/table/sql/handler handler.cc: TABLE test t1 fetch 1
105 wait/io/table/sql/handler handler.cc: TABLE test t2 fetch 1
106 wait/io/table/sql/handler handler.cc: TABLE test t2 update 1
107 wait/io/table/sql/handler handler.cc: TABLE test t2 fetch 1
108 wait/io/table/sql/handler handler.cc: TABLE test t2 fetch 1
109 wait/io/table/sql/handler handler.cc: TABLE test t1 update 1
110 wait/io/table/sql/handler handler.cc: TABLE test t2 fetch 1
111 wait/io/table/sql/handler handler.cc: TABLE test t2 update 1
112 wait/io/table/sql/handler handler.cc: TABLE test t2 fetch 1
113 wait/io/table/sql/handler handler.cc: TABLE test t2 fetch 1
114 wait/io/table/sql/handler handler.cc: TABLE test t1 fetch 1
115 wait/io/table/sql/handler handler.cc: TABLE test t2 fetch 1
116 wait/io/table/sql/handler handler.cc: TABLE test t2 fetch 1
117 wait/io/table/sql/handler handler.cc: TABLE test t2 update 1
118 wait/io/table/sql/handler handler.cc: TABLE test t2 fetch 1
119 wait/io/table/sql/handler handler.cc: TABLE test t1 update 1
120 wait/io/table/sql/handler handler.cc: TABLE test t2 fetch 1
121 wait/io/table/sql/handler handler.cc: TABLE test t2 fetch 1
122 wait/io/table/sql/handler handler.cc: TABLE test t2 update 1
123 wait/io/table/sql/handler handler.cc: TABLE test t2 fetch 1
124 wait/io/table/sql/handler handler.cc: TABLE test t1 fetch 1
125 wait/io/table/sql/handler handler.cc: TABLE test marker insert 1
126 wait/io/table/sql/handler handler.cc: TABLE test t1 fetch 2
127 wait/io/table/sql/handler handler.cc: TABLE test marker insert 1
128 wait/io/table/sql/handler handler.cc: TABLE test t2 fetch 2
129 wait/io/table/sql/handler handler.cc: TABLE test marker insert 1
130 wait/io/table/sql/handler handler.cc: TABLE test t1 fetch 1
131 wait/io/table/sql/handler handler.cc: TABLE test t2 fetch 1
132 wait/io/table/sql/handler handler.cc: TABLE test t2 delete 1
133 wait/io/table/sql/handler handler.cc: TABLE test t2 fetch 1
134 wait/io/table/sql/handler handler.cc: TABLE test t2 fetch 1
135 wait/io/table/sql/handler handler.cc: TABLE test t1 delete 1
136 wait/io/table/sql/handler handler.cc: TABLE test t2 insert 1
137 wait/io/table/sql/handler handler.cc: TABLE test t1 fetch 1
138 wait/io/table/sql/handler handler.cc: TABLE test t1 fetch 1
139 wait/io/table/sql/handler handler.cc: TABLE test marker insert 1
140 wait/io/table/sql/handler handler.cc: TABLE test t1 fetch 1
141 wait/io/table/sql/handler handler.cc: TABLE test t1 fetch 1
142 wait/io/table/sql/handler handler.cc: TABLE test marker insert 1
143 wait/io/table/sql/handler handler.cc: TABLE test t2 fetch 2
144 wait/io/table/sql/handler handler.cc: TABLE test marker insert 1
145 wait/io/table/sql/handler handler.cc: TABLE test t1 fetch 1
146 wait/io/table/sql/handler handler.cc: TABLE test t1 fetch 1
147 wait/io/table/sql/handler handler.cc: TABLE test t2 fetch 1
148 wait/io/table/sql/handler handler.cc: TABLE test t2 fetch 1
149 wait/io/table/sql/handler handler.cc: TABLE test t2 delete 1
150 wait/io/table/sql/handler handler.cc: TABLE test t2 fetch 1
151 wait/io/table/sql/handler handler.cc: TABLE test t1 delete 1
152 wait/io/table/sql/handler handler.cc: TABLE test t2 insert 1
153 wait/io/table/sql/handler handler.cc: TABLE test t1 fetch 1
154 wait/io/table/sql/handler handler.cc: TABLE test marker insert 1
155 wait/io/table/sql/handler handler.cc: TABLE test t1 fetch 1
156 wait/io/table/sql/handler handler.cc: TABLE test t1 fetch 1
157 wait/io/table/sql/handler handler.cc: TABLE test t1 fetch 1
158 wait/io/table/sql/handler handler.cc: TABLE test marker insert 1
159 wait/io/table/sql/handler handler.cc: TABLE test t2 fetch 2
160 show global status like 'performance_schema_%_lost';
161 Variable_name Value
162 Performance_schema_accounts_lost 0
163 Performance_schema_cond_classes_lost 0
164 Performance_schema_cond_instances_lost 0
165 Performance_schema_digest_lost 0
166 Performance_schema_file_classes_lost 0
167 Performance_schema_file_handles_lost 0
168 Performance_schema_file_instances_lost 0
169 Performance_schema_hosts_lost 0
170 Performance_schema_index_stat_lost 0
171 Performance_schema_locker_lost 0
172 Performance_schema_memory_classes_lost 0
173 Performance_schema_metadata_lock_lost 0
174 Performance_schema_mutex_classes_lost 0
175 Performance_schema_mutex_instances_lost 0
176 Performance_schema_nested_statement_lost 0
177 Performance_schema_prepared_statements_lost 0
178 Performance_schema_program_lost 0
179 Performance_schema_rwlock_classes_lost 0
180 Performance_schema_rwlock_instances_lost 0
181 Performance_schema_session_connect_attrs_lost 0
182 Performance_schema_socket_classes_lost 0
183 Performance_schema_socket_instances_lost 0
184 Performance_schema_stage_classes_lost 0
185 Performance_schema_statement_classes_lost 0
186 Performance_schema_table_handles_lost 0
187 Performance_schema_table_instances_lost 0
188 Performance_schema_table_lock_stat_lost 0
189 Performance_schema_thread_classes_lost 0
190 Performance_schema_thread_instances_lost 0
191 Performance_schema_users_lost 0
192 truncate performance_schema.events_waits_history_long;
193 flush status;
194 drop table test.t1;
195 drop table test.t2;
196 update performance_schema.setup_consumers set enabled='NO';
197 truncate performance_schema.events_waits_history_long;
198 drop table test.marker;
199 flush status;
200 update performance_schema.setup_instruments set enabled='YES';
201 update performance_schema.setup_consumers set enabled='YES';