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

Merge remote-tracking branch 'origin/10.2' into bb-10.2-ext

Conflicts:
	cmake/make_dist.cmake.in
	mysql-test/r/func_json.result
	mysql-test/r/ps.result
	mysql-test/t/func_json.test
	mysql-test/t/ps.test
	sql/item_cmpfunc.h
This commit is contained in:
Monty
2018-01-01 19:39:59 +02:00
161 changed files with 4321 additions and 635 deletions

View File

@ -974,6 +974,7 @@ Explain_aggr_filesort::Explain_aggr_filesort(MEM_ROOT *mem_root,
for (ORDER *ord= filesort->order; ord; ord= ord->next)
{
sort_items.push_back(ord->item[0], mem_root);
sort_directions.push_back(&ord->direction, mem_root);
}
filesort->tracker= &tracker;
}
@ -987,10 +988,13 @@ void Explain_aggr_filesort::print_json_members(Json_writer *writer,
str.length(0);
List_iterator_fast<Item> it(sort_items);
Item *item;
List_iterator_fast<ORDER::enum_order> it_dir(sort_directions);
Item* item;
ORDER::enum_order *direction;
bool first= true;
while ((item= it++))
{
direction= it_dir++;
if (first)
first= false;
else
@ -998,6 +1002,8 @@ void Explain_aggr_filesort::print_json_members(Json_writer *writer,
str.append(", ");
}
append_item_to_str(&str, item);
if (*direction == ORDER::ORDER_DESC)
str.append(" desc");
}
writer->add_member("sort_key").add_str(str.c_ptr_safe());