Commit 68542cae authored by Oleg Smirnov's avatar Oleg Smirnov

MDEV-32475 Add logging of test_if_skip_sort_order to optimizer trace

parent 680f732f
This diff is collapsed.
......@@ -23608,8 +23608,12 @@ test_if_skip_sort_order(JOIN_TAB *tab,ORDER *order,ha_rows select_limit,
bool orig_cond_saved= false;
int best_key= -1;
bool changed_key= false;
THD *thd= tab->join->thd;
DBUG_ENTER("test_if_skip_sort_order");
Json_writer_object trace_wrapper(thd);
Json_writer_array trace_arr(thd, "test_if_skip_sort_order");
/* Check that we are always called with first non-const table */
DBUG_ASSERT(tab == tab->join->join_tab + tab->join->const_tables);
......@@ -23618,6 +23622,8 @@ test_if_skip_sort_order(JOIN_TAB *tab,ORDER *order,ha_rows select_limit,
tab->type == JT_CONST ||
tab->type == JT_SYSTEM)
{
Json_writer_object trace_skip(thd);
trace_skip.add("skipped", "single row access method");
DBUG_RETURN(1);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment