mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-32475 Add logging of test_if_skip_sort_order to optimizer trace
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user