@@ -371,7 +371,7 @@ TRP_ROR_INTERSECT *get_best_covering_ror_intersect(PARAM *param,
371
371
double read_time);
372
372
static
373
373
TABLE_READ_PLAN *get_best_disjunct_quick(PARAM *param, SEL_IMERGE *imerge,
374
- double read_time);
374
+ double read_time, bool named_trace= false );
375
375
static
376
376
TABLE_READ_PLAN *merge_same_index_scans(PARAM *param, SEL_IMERGE *imerge,
377
377
TRP_INDEX_MERGE *imerge_trp,
@@ -5052,7 +5052,7 @@ double get_sweep_read_cost(const PARAM *param, ha_rows records)
5052
5052
5053
5053
static
5054
5054
TABLE_READ_PLAN *get_best_disjunct_quick(PARAM *param, SEL_IMERGE *imerge,
5055
- double read_time)
5055
+ double read_time, bool named_trace )
5056
5056
{
5057
5057
SEL_TREE **ptree;
5058
5058
TRP_INDEX_MERGE *imerge_trp= NULL;
@@ -5101,7 +5101,9 @@ TABLE_READ_PLAN *get_best_disjunct_quick(PARAM *param, SEL_IMERGE *imerge,
5101
5101
n_child_scans)))
5102
5102
DBUG_RETURN(NULL);
5103
5103
5104
- Json_writer_object trace_best_disjunct(thd);
5104
+ Json_writer_object trace_best_disjunct = named_trace
5105
+ ? Json_writer_object(thd, "best_disjunct_quick")
5106
+ : Json_writer_object(thd);
5105
5107
Json_writer_array to_merge(thd, "indexes_to_merge");
5106
5108
/*
5107
5109
Collect best 'range' scan for each of disjuncts, and, while doing so,
@@ -5459,7 +5461,7 @@ TABLE_READ_PLAN *merge_same_index_scans(PARAM *param, SEL_IMERGE *imerge,
5459
5461
DBUG_ASSERT(imerge->trees_next>imerge->trees);
5460
5462
5461
5463
if (imerge->trees_next-imerge->trees > 1)
5462
- trp= get_best_disjunct_quick(param, imerge, read_time);
5464
+ trp= get_best_disjunct_quick(param, imerge, read_time, true );
5463
5465
else
5464
5466
{
5465
5467
/*
0 commit comments