1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

MDEV-6109: EXPLAIN JSON

- Add first testcases
- Don't overquote when printing conditions
- Other small output fixes
This commit is contained in:
Sergei Petrunia
2014-08-09 06:37:56 +04:00
parent 83f0ddc629
commit 33d53c4c24
8 changed files with 100 additions and 20 deletions

View File

@ -5269,21 +5269,9 @@ static bool execute_sqlcom_select(THD *thd, TABLE_LIST *all_tables)
top-level LIMIT
*/
result->reset_offset_limit();
if (thd->lex->explain_json)
if (lex->explain_json)
{
/*
Json_writer writer;
writer.start_object();
thd->lex->explain->print_explain_json(&writer, thd->lex->analyze_stmt);
writer.end_object();
const CHARSET_INFO *cs= system_charset_info;
List<Item> item_list;
String *buf= &writer.output;
item_list.push_back(new Item_string(buf->ptr(), buf->length(), cs));
result->send_data(item_list);
*/
thd->lex->explain->print_explain_json(result, thd->lex->analyze_stmt);
lex->explain->print_explain_json(result, lex->analyze_stmt);
}
else
{