summaryrefslogtreecommitdiff
path: root/sql/sql_explain.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2014-10-16 00:30:29 +0200
committerSergei Golubchik <serg@mariadb.org>2014-10-16 00:30:29 +0200
commit1e79138459038c39c85239a825bf1727ef43c156 (patch)
tree88f725551c0f061487fde0ee5a6c0ea471b24abc /sql/sql_explain.cc
parent7aed441963823191e94da3df069e123dc8794eee (diff)
parent42f359f9827340bf430a9f1a0bda9b059951ea08 (diff)
downloadmariadb-git-1e79138459038c39c85239a825bf1727ef43c156.tar.gz
Merge branch 'bb-10.1-merge' into 10.1mariadb-10.1.1
Diffstat (limited to 'sql/sql_explain.cc')
-rw-r--r--sql/sql_explain.cc20
1 files changed, 7 insertions, 13 deletions
diff --git a/sql/sql_explain.cc b/sql/sql_explain.cc
index 7ab6413bfef..ce266a723c2 100644
--- a/sql/sql_explain.cc
+++ b/sql/sql_explain.cc
@@ -203,15 +203,13 @@ bool Explain_query::print_explain_str(THD *thd, String *out_str, bool is_analyz
static void push_str(List<Item> *item_list, const char *str)
{
- item_list->push_back(new Item_string(str,
- strlen(str), system_charset_info));
+ item_list->push_back(new Item_string_sys(str));
}
static void push_string(List<Item> *item_list, String *str)
{
- item_list->push_back(new Item_string(str->ptr(), str->length(),
- system_charset_info));
+ item_list->push_back(new Item_string_sys(str->ptr(), str->length()));
}
@@ -266,8 +264,7 @@ int Explain_union::print_explain(Explain_query *query,
len+= lastop;
table_name_buffer[len - 1]= '>'; // change ',' to '>'
}
- const CHARSET_INFO *cs= system_charset_info;
- item_list.push_back(new Item_string(table_name_buffer, len, cs));
+ item_list.push_back(new Item_string_sys(table_name_buffer, len));
}
/* `partitions` column */
@@ -314,8 +311,7 @@ int Explain_union::print_explain(Explain_query *query,
{
extra_buf.append(STRING_WITH_LEN("Using filesort"));
}
- const CHARSET_INFO *cs= system_charset_info;
- item_list.push_back(new Item_string(extra_buf.ptr(), extra_buf.length(), cs));
+ item_list.push_back(new Item_string_sys(extra_buf.ptr(), extra_buf.length()));
//output->unit.offset_limit_cnt= 0;
if (output->send_data(item_list))
@@ -373,12 +369,10 @@ int Explain_select::print_explain(Explain_query *query,
if (message)
{
List<Item> item_list;
- const CHARSET_INFO *cs= system_charset_info;
Item *item_null= new Item_null();
item_list.push_back(new Item_int((int32) select_id));
- item_list.push_back(new Item_string(select_type,
- strlen(select_type), cs));
+ item_list.push_back(new Item_string_sys(select_type));
for (uint i=0 ; i < 7; i++)
item_list.push_back(item_null);
if (explain_flags & DESCRIBE_PARTITIONS)
@@ -395,7 +389,7 @@ int Explain_select::print_explain(Explain_query *query,
item_list.push_back(item_null);
}
- item_list.push_back(new Item_string(message,strlen(message),cs));
+ item_list.push_back(new Item_string_sys(message));
if (output->send_data(item_list))
return 1;
@@ -625,7 +619,7 @@ int Explain_table_access::print_explain(select_result_sink *output, uint8 explai
extra_buf.append(STRING_WITH_LEN("Using filesort"));
}
- item_list.push_back(new Item_string(extra_buf.ptr(), extra_buf.length(), cs));
+ item_list.push_back(new Item_string_sys(extra_buf.ptr(), extra_buf.length()));
if (output->send_data(item_list))
return 1;