95
item_list.push_back(new Item_int((int32_t)
96
join->select_lex->select_number));
97
item_list.push_back(new Item_string(select_type_str[join->select_lex->type].c_str(),
98
select_type_str[join->select_lex->type].length(),
95
item_list.push_back(new Item_int((int32_t)join->select_lex->select_number));
96
item_list.push_back(new Item_string(select_type_str[join->select_lex->type], cs));
100
97
for (uint32_t i= 0; i < 7; i++)
101
98
item_list.push_back(item_null);
103
100
if (join->session->lex().describe & DESCRIBE_EXTENDED)
104
101
item_list.push_back(item_null);
106
item_list.push_back(new Item_string(message,strlen(message),cs));
103
item_list.push_back(new Item_string(str_ref(message), cs));
107
104
if (result->send_data(item_list))
122
119
item_list.push_back(new Item_null);
123
120
/* select_type */
124
item_list.push_back(new Item_string(select_type_str[join->select_lex->type].c_str(),
125
select_type_str[join->select_lex->type].length(),
121
item_list.push_back(new Item_string(select_type_str[join->select_lex->type], cs));
129
124
Select_Lex *sl= join->unit->first_select();
148
143
item_list.push_back(new Item_string(table_name_buffer, len, cs));
151
item_list.push_back(new Item_string(access_method_str[AM_ALL].c_str(),
152
access_method_str[AM_ALL].length(),
146
item_list.push_back(new Item_string(access_method_str[AM_ALL], cs));
154
147
/* possible_keys */
155
148
item_list.push_back(item_null);
166
159
item_list.push_back(item_null);
168
161
if (join->unit->global_parameters->order_list.first)
169
item_list.push_back(new Item_string("Using filesort",
162
item_list.push_back(new Item_string(str_ref("Using filesort"), cs));
173
item_list.push_back(new Item_string("", 0, cs));
164
item_list.push_back(new Item_string(str_ref(""), cs));
175
166
if (result->send_data(item_list))
193
184
item_list.clear();
195
item_list.push_back(new Item_uint((uint32_t)
196
join->select_lex->select_number));
186
item_list.push_back(new Item_uint((uint32_t)join->select_lex->select_number));
197
187
/* select_type */
198
item_list.push_back(new Item_string(select_type_str[join->select_lex->type].c_str(),
199
select_type_str[join->select_lex->type].length(),
188
item_list.push_back(new Item_string(select_type_str[join->select_lex->type], cs));
201
189
if (tab->type == AM_ALL && tab->select && tab->select->quick)
203
191
quick_type= tab->select->quick->get_type();
223
211
TableList *real_table= table->pos_in_table_list;
224
item_list.push_back(new Item_string(real_table->alias,
225
strlen(real_table->alias),
212
item_list.push_back(new Item_string(str_ref(real_table->alias), cs));
228
214
/* "type" column */
229
item_list.push_back(new Item_string(access_method_str[tab->type].c_str(),
230
access_method_str[tab->type].length(),
215
item_list.push_back(new Item_string(access_method_str[tab->type], cs));
232
216
/* Build "possible_keys" value and add it to item_list */
233
217
if (tab->keys.any())
246
230
if (tmp1.length())
247
item_list.push_back(new Item_string(tmp1.c_str(),tmp1.length(),cs));
231
item_list.push_back(new Item_string(tmp1, cs));
249
233
item_list.push_back(item_null);
252
236
if (tab->ref.key_parts)
254
238
KeyInfo *key_info= table->key_info+ tab->ref.key;
255
item_list.push_back(new Item_string(key_info->name,
256
strlen(key_info->name),
257
system_charset_info));
258
uint32_t length= internal::int64_t2str(tab->ref.key_length, keylen_str_buf, 10) -
260
item_list.push_back(new Item_string(keylen_str_buf,
262
system_charset_info));
239
item_list.push_back(new Item_string(str_ref(key_info->name), system_charset_info));
240
uint32_t length= internal::int64_t2str(tab->ref.key_length, keylen_str_buf, 10) - keylen_str_buf;
241
item_list.push_back(new Item_string(keylen_str_buf, length, system_charset_info));
263
242
for (StoredKey **ref= tab->ref.key_copy; *ref; ref++)
265
244
if (tmp2.length())
267
246
tmp2.append((*ref)->name(),
268
247
strlen((*ref)->name()));
270
item_list.push_back(new Item_string(tmp2.c_str(),tmp2.length(),cs));
249
item_list.push_back(new Item_string(tmp2, cs));
272
251
else if (tab->type == AM_NEXT)
274
253
KeyInfo *key_info=table->key_info+ tab->index;
275
item_list.push_back(new Item_string(key_info->name,
276
strlen(key_info->name),cs));
277
uint32_t length= internal::int64_t2str(key_info->key_length, keylen_str_buf, 10) -
279
item_list.push_back(new Item_string(keylen_str_buf,
281
system_charset_info));
254
item_list.push_back(new Item_string(str_ref(key_info->name),cs));
255
uint32_t length= internal::int64_t2str(key_info->key_length, keylen_str_buf, 10) - keylen_str_buf;
256
item_list.push_back(new Item_string(keylen_str_buf, length, system_charset_info));
282
257
item_list.push_back(item_null);
284
259
else if (tab->select && tab->select->quick)
286
261
tab->select->quick->add_keys_and_lengths(&tmp2, &tmp3);
287
item_list.push_back(new Item_string(tmp2.c_str(),tmp2.length(),cs));
288
item_list.push_back(new Item_string(tmp3.c_str(),tmp3.length(),cs));
262
item_list.push_back(new Item_string(tmp2, cs));
263
item_list.push_back(new Item_string(tmp3, cs));
289
264
item_list.push_back(item_null);
339
item_list.push_back(new Item_string(tab->info,strlen(tab->info),cs));
314
item_list.push_back(new Item_string(str_ref(tab->info),cs));
340
315
else if (tab->packed_info & TAB_INFO_HAVE_VALUE)
342
317
if (tab->packed_info & TAB_INFO_USING_INDEX)
347
322
extra.append("; Full scan on NULL key");
348
323
if (extra.length())
349
324
extra.erase(0, 2); /* Skip initial "; "*/
350
item_list.push_back(new Item_string(extra.c_str(), extra.length(), cs));
325
item_list.push_back(new Item_string(extra, cs));