Debian Codegraph @

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

raw
1 # Connection con1
2 create database explain_test_db;
3 create table explain_test_db.explain_test_table(a int);
4 lock table explain_test_db.explain_test_table write;
5 # Connection default
6 select OBJECT_INSTANCE_BEGIN, OWNER_THREAD_ID, OWNER_EVENT_ID
7 from performance_schema.metadata_locks
8 where OBJECT_TYPE = 'TABLE'
9 and OBJECT_SCHEMA = 'explain_test_db'
10 and OBJECT_NAME = 'explain_test_table'
11 and LOCK_STATUS = 'GRANTED'
12 into @oib, @o_tid, @o_eid;
13 select @oib is not null, @o_tid is not null, @o_eid is not null;
14 @oib is not null @o_tid is not null @o_eid is not null
15 1 1 1
16
17 ====================================================================
18 Testing index for columns OBJECT_INSTANCE_BEGIN
19 ====================================================================
20 ############ Explain for Query ####################################
21 explain select LOCK_TYPE
22 from performance_schema.metadata_locks
23 where OBJECT_INSTANCE_BEGIN = "impossible";
24 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
25 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL # NULL no matching row in const table
26 ############ Explain for Query ####################################
27 explain select LOCK_TYPE
28 from performance_schema.metadata_locks
29 where OBJECT_INSTANCE_BEGIN > "impossible";
30 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
31 1 SIMPLE metadata_locks NULL ALL PRIMARY NULL NULL NULL # 33.33 Using where
32 ############ Explain for Query ####################################
33 explain select LOCK_TYPE
34 from performance_schema.metadata_locks
35 where OBJECT_INSTANCE_BEGIN < "2";
36 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
37 1 SIMPLE metadata_locks NULL ALL PRIMARY NULL NULL NULL # 33.33 Using where
38 ############ Explain for Query ####################################
39 explain select LOCK_TYPE
40 from performance_schema.metadata_locks
41 where OBJECT_INSTANCE_BEGIN = @oib;
42 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
43 1 SIMPLE metadata_locks NULL const PRIMARY PRIMARY 8 const # 100.00 NULL
44 ############# Explain End #########################################
45 flush status;
46 select LOCK_TYPE
47 from performance_schema.metadata_locks
48 where OBJECT_INSTANCE_BEGIN = @oib;
49 LOCK_TYPE
50 #
51 OK: handler_read_key incremented
52
53 ====================================================================
54 Testing index for columns OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME, COLUMN_NAME
55 ====================================================================
56 ############ Explain for Query ####################################
57 explain select LOCK_TYPE
58 from performance_schema.metadata_locks
59 where OBJECT_TYPE = "impossible";
60 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
61 1 SIMPLE metadata_locks NULL ref OBJECT_TYPE OBJECT_TYPE 258 const # 100.00 NULL
62 ############ Explain for Query ####################################
63 explain select LOCK_TYPE
64 from performance_schema.metadata_locks
65 where OBJECT_TYPE > "impossible";
66 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
67 1 SIMPLE metadata_locks NULL ALL OBJECT_TYPE NULL NULL NULL # 33.33 Using where
68 ############ Explain for Query ####################################
69 explain select LOCK_TYPE
70 from performance_schema.metadata_locks
71 where OBJECT_TYPE < "2";
72 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
73 1 SIMPLE metadata_locks NULL ALL OBJECT_TYPE NULL NULL NULL # 33.33 Using where
74 ############ Explain for Query ####################################
75 explain select LOCK_TYPE
76 from performance_schema.metadata_locks
77 where OBJECT_TYPE = "TABLE";
78 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
79 1 SIMPLE metadata_locks NULL ref OBJECT_TYPE OBJECT_TYPE 258 const # 100.00 NULL
80 ############ Explain for Query ####################################
81 explain select LOCK_TYPE
82 from performance_schema.metadata_locks
83 where OBJECT_TYPE = "impossible"
84 and OBJECT_SCHEMA = "impossible";
85 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
86 1 SIMPLE metadata_locks NULL ref OBJECT_TYPE OBJECT_TYPE 517 const,const # 100.00 NULL
87 ############ Explain for Query ####################################
88 explain select LOCK_TYPE
89 from performance_schema.metadata_locks
90 where OBJECT_TYPE = "TABLE"
91 and OBJECT_SCHEMA = "impossible";
92 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
93 1 SIMPLE metadata_locks NULL ref OBJECT_TYPE OBJECT_TYPE 517 const,const # 100.00 NULL
94 ############ Explain for Query ####################################
95 explain select LOCK_TYPE
96 from performance_schema.metadata_locks
97 where OBJECT_TYPE = "TABLE"
98 and OBJECT_SCHEMA > "impossible";
99 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
100 1 SIMPLE metadata_locks NULL ref OBJECT_TYPE OBJECT_TYPE 258 const # 33.33 Using where
101 ############ Explain for Query ####################################
102 explain select LOCK_TYPE
103 from performance_schema.metadata_locks
104 where OBJECT_TYPE = "TABLE"
105 and OBJECT_SCHEMA < "2";
106 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
107 1 SIMPLE metadata_locks NULL ref OBJECT_TYPE OBJECT_TYPE 258 const # 33.33 Using where
108 ############ Explain for Query ####################################
109 explain select LOCK_TYPE
110 from performance_schema.metadata_locks
111 where OBJECT_TYPE = "TABLE"
112 and OBJECT_SCHEMA = "explain_test_db";
113 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
114 1 SIMPLE metadata_locks NULL ref OBJECT_TYPE OBJECT_TYPE 517 const,const # 100.00 NULL
115 ############ Explain for Query ####################################
116 explain select LOCK_TYPE
117 from performance_schema.metadata_locks
118 where OBJECT_TYPE = "impossible"
119 and OBJECT_SCHEMA = "impossible"
120 and OBJECT_NAME = "impossible";
121 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
122 1 SIMPLE metadata_locks NULL ref OBJECT_TYPE OBJECT_TYPE 776 const,const,const # 100.00 NULL
123 ############ Explain for Query ####################################
124 explain select LOCK_TYPE
125 from performance_schema.metadata_locks
126 where OBJECT_TYPE = "TABLE"
127 and OBJECT_SCHEMA = "explain_test_db"
128 and OBJECT_NAME = "impossible";
129 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
130 1 SIMPLE metadata_locks NULL ref OBJECT_TYPE OBJECT_TYPE 776 const,const,const # 100.00 NULL
131 ############ Explain for Query ####################################
132 explain select LOCK_TYPE
133 from performance_schema.metadata_locks
134 where OBJECT_TYPE = "TABLE"
135 and OBJECT_SCHEMA = "explain_test_db"
136 and OBJECT_NAME > "impossible";
137 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
138 1 SIMPLE metadata_locks NULL ref OBJECT_TYPE OBJECT_TYPE 517 const,const # 33.33 Using where
139 ############ Explain for Query ####################################
140 explain select LOCK_TYPE
141 from performance_schema.metadata_locks
142 where OBJECT_TYPE = "TABLE"
143 and OBJECT_SCHEMA = "explain_test_db"
144 and OBJECT_NAME < "2";
145 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
146 1 SIMPLE metadata_locks NULL ref OBJECT_TYPE OBJECT_TYPE 517 const,const # 33.33 Using where
147 ############ Explain for Query ####################################
148 explain select LOCK_TYPE
149 from performance_schema.metadata_locks
150 where OBJECT_TYPE = "TABLE"
151 and OBJECT_SCHEMA = "explain_test_db"
152 and OBJECT_NAME = "explain_test_table";
153 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
154 1 SIMPLE metadata_locks NULL ref OBJECT_TYPE OBJECT_TYPE 776 const,const,const # 100.00 NULL
155 ############ Explain for Query ####################################
156 explain select LOCK_TYPE
157 from performance_schema.metadata_locks
158 where OBJECT_TYPE = "impossible"
159 and OBJECT_SCHEMA = "impossible"
160 and OBJECT_NAME = "impossible"
161 and COLUMN_NAME = "impossible";
162 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
163 1 SIMPLE metadata_locks NULL ref OBJECT_TYPE OBJECT_TYPE 1035 const,const,const,const # 100.00 NULL
164 ############ Explain for Query ####################################
165 explain select LOCK_TYPE
166 from performance_schema.metadata_locks
167 where OBJECT_TYPE = "TABLE"
168 and OBJECT_SCHEMA = "explain_test_db"
169 and OBJECT_NAME = "explain_test_table"
170 and COLUMN_NAME = "impossible";
171 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
172 1 SIMPLE metadata_locks NULL ref OBJECT_TYPE OBJECT_TYPE 1035 const,const,const,const # 100.00 NULL
173 ############ Explain for Query ####################################
174 explain select LOCK_TYPE
175 from performance_schema.metadata_locks
176 where OBJECT_TYPE = "TABLE"
177 and OBJECT_SCHEMA = "explain_test_db"
178 and OBJECT_NAME = "explain_test_table"
179 and COLUMN_NAME > "impossible";
180 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
181 1 SIMPLE metadata_locks NULL ref OBJECT_TYPE OBJECT_TYPE 776 const,const,const # 33.33 Using where
182 ############ Explain for Query ####################################
183 explain select LOCK_TYPE
184 from performance_schema.metadata_locks
185 where OBJECT_TYPE = "TABLE"
186 and OBJECT_SCHEMA = "explain_test_db"
187 and OBJECT_NAME = "explain_test_table"
188 and COLUMN_NAME < "impossible";
189 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
190 1 SIMPLE metadata_locks NULL ref OBJECT_TYPE OBJECT_TYPE 776 const,const,const # 33.33 Using where
191 ############ Explain for Query ####################################
192 explain select LOCK_TYPE
193 from performance_schema.metadata_locks
194 where OBJECT_TYPE = "TABLE"
195 and OBJECT_SCHEMA = "explain_test_db"
196 and OBJECT_NAME = "explain_test_table"
197 and COLUMN_NAME = "a";
198 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
199 1 SIMPLE metadata_locks NULL ref OBJECT_TYPE OBJECT_TYPE 1035 const,const,const,const # 100.00 NULL
200 ############# Explain End #########################################
201 flush status;
202 select LOCK_TYPE
203 from performance_schema.metadata_locks
204 where OBJECT_TYPE = "TABLE"
205 and OBJECT_SCHEMA = "explain_test_db"
206 and OBJECT_NAME = "explain_test_table"
207 and COLUMN_NAME = "a";
208 LOCK_TYPE
209 OK: handler_read_key incremented
210
211 ====================================================================
212 Testing index for columns OWNER_THREAD_ID, OWNER_EVENT_ID
213 ====================================================================
214 ############ Explain for Query ####################################
215 explain select LOCK_TYPE
216 from performance_schema.metadata_locks
217 where OWNER_THREAD_ID = "impossible";
218 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
219 1 SIMPLE metadata_locks NULL ref OWNER_THREAD_ID OWNER_THREAD_ID 9 const # 100.00 Using where
220 ############ Explain for Query ####################################
221 explain select LOCK_TYPE
222 from performance_schema.metadata_locks
223 where OWNER_THREAD_ID > "impossible";
224 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
225 1 SIMPLE metadata_locks NULL ALL OWNER_THREAD_ID NULL NULL NULL # 33.33 Using where
226 ############ Explain for Query ####################################
227 explain select LOCK_TYPE
228 from performance_schema.metadata_locks
229 where OWNER_THREAD_ID < "2";
230 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
231 1 SIMPLE metadata_locks NULL ALL OWNER_THREAD_ID NULL NULL NULL # 33.33 Using where
232 ############ Explain for Query ####################################
233 explain select LOCK_TYPE
234 from performance_schema.metadata_locks
235 where OWNER_THREAD_ID = @o_tid;
236 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
237 1 SIMPLE metadata_locks NULL ref OWNER_THREAD_ID OWNER_THREAD_ID 9 const # 100.00 NULL
238 ############ Explain for Query ####################################
239 explain select LOCK_TYPE
240 from performance_schema.metadata_locks
241 where OWNER_THREAD_ID = "impossible"
242 and OWNER_EVENT_ID = "impossible";
243 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
244 1 SIMPLE metadata_locks NULL ref OWNER_THREAD_ID OWNER_THREAD_ID 18 const,const # 100.00 Using where
245 ############ Explain for Query ####################################
246 explain select LOCK_TYPE
247 from performance_schema.metadata_locks
248 where OWNER_THREAD_ID = @o_tid
249 and OWNER_EVENT_ID = "impossible";
250 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
251 1 SIMPLE metadata_locks NULL ref OWNER_THREAD_ID OWNER_THREAD_ID 18 const,const # 100.00 Using where
252 ############ Explain for Query ####################################
253 explain select LOCK_TYPE
254 from performance_schema.metadata_locks
255 where OWNER_THREAD_ID = @o_tid
256 and OWNER_EVENT_ID > "impossible";
257 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
258 1 SIMPLE metadata_locks NULL ref OWNER_THREAD_ID OWNER_THREAD_ID 9 const # 33.33 Using where
259 ############ Explain for Query ####################################
260 explain select LOCK_TYPE
261 from performance_schema.metadata_locks
262 where OWNER_THREAD_ID = @o_tid
263 and OWNER_EVENT_ID < "2";
264 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
265 1 SIMPLE metadata_locks NULL ref OWNER_THREAD_ID OWNER_THREAD_ID 9 const # 33.33 Using where
266 ############ Explain for Query ####################################
267 explain select LOCK_TYPE
268 from performance_schema.metadata_locks
269 where OWNER_THREAD_ID = @o_tid
270 and OWNER_EVENT_ID = @o_eid;
271 id select_type table partitions type possible_keys key key_len ref rows filtered Extra
272 1 SIMPLE metadata_locks NULL ref OWNER_THREAD_ID OWNER_THREAD_ID 18 const,const # 100.00 NULL
273 ############# Explain End #########################################
274 flush status;
275 select LOCK_TYPE
276 from performance_schema.metadata_locks
277 where OWNER_THREAD_ID = @o_tid
278 and OWNER_EVENT_ID = @o_eid;
279 LOCK_TYPE
280 #
281 OK: handler_read_key incremented
282 # Connection con1
283 unlock tables;
284 drop table explain_test_db.explain_test_table;
285 drop database explain_test_db;
286 # Connection default