MDEV-3798: EXPLAIN UPDATE/DELETE

- Produce correct `key_len` when type=index.
This commit is contained in:
Sergey Petrunya 2013-10-09 17:15:34 +04:00
commit 7e919c52a5
2 changed files with 5 additions and 2 deletions

View file

@ -158,8 +158,11 @@ void Update_plan::save_explain_data_intern(Explain_query *query,
if (index != MAX_KEY)
{
explain->key_str.append(table->key_info[index].name);
char buf[64];
size_t length;
length= longlong10_to_str(table->key_info[index].key_length, buf, 10) - buf;
explain->key_len_str.append(buf, length);
}
// key_len stays NULL
}
explain->rows= scanned_rows;