1
0
mirror of https://github.com/MariaDB/server.git synced 2025-10-12 12:25:37 +03:00

MDEV-3798: EXPLAIN UPDATE/DELETE

- Add support for EXPLAIN INSERT.
This commit is contained in:
Sergey Petrunya
2013-10-07 17:29:51 +04:00
parent 69393db3d1
commit 98a8642fe8
11 changed files with 201 additions and 62 deletions

View File

@@ -22238,7 +22238,10 @@ int print_explain_message_line(select_result_sink *result,
if (options & DESCRIBE_EXTENDED)
item_list.push_back(item_null);
item_list.push_back(new Item_string(message,strlen(message),cs));
if (message)
item_list.push_back(new Item_string(message,strlen(message),cs));
else
item_list.push_back(item_null);
if (result->send_data(item_list))
return 1;
@@ -22292,7 +22295,7 @@ int print_explain_row(select_result_sink *result,
const char *index,
const char *key_len,
const char *ref,
ha_rows rows,
ha_rows *rows,
const char *extra)
{
const CHARSET_INFO *cs= system_charset_info;
@@ -22337,15 +22340,24 @@ int print_explain_row(select_result_sink *result,
item_list.push_back(item);
/* 'rows' */
item_list.push_back(new Item_int(rows,
MY_INT64_NUM_DECIMAL_DIGITS));
if (rows)
{
item_list.push_back(new Item_int(*rows,
MY_INT64_NUM_DECIMAL_DIGITS));
}
else
item_list.push_back(item_null);
/* 'filtered' */
const double filtered=100.0;
if (options & DESCRIBE_EXTENDED)
item_list.push_back(new Item_float(filtered, 2));
/* 'Extra' */
item_list.push_back(new Item_string(extra, strlen(extra), cs));
if (extra)
item_list.push_back(new Item_string(extra, strlen(extra), cs));
else
item_list.push_back(item_null);
if (result->send_data(item_list))
return 1;