diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2021-11-19 17:45:52 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2021-11-19 17:45:52 +0200 |
commit | 7e8a13d9d760a3c24f9e539e8ab2a0f237efafe0 (patch) | |
tree | 7004f97adeb75acb90f680d097ccdd8eae6ec0b9 /sql/opt_range.cc | |
parent | 32e8e8479507db6736a1983dbde5f0fcb64f80db (diff) | |
parent | e0f7c89c18589b3705cefda6f9525eecf4ca0af4 (diff) | |
download | mariadb-git-7e8a13d9d760a3c24f9e539e8ab2a0f237efafe0.tar.gz |
Merge 10.6 into 10.7
Diffstat (limited to 'sql/opt_range.cc')
-rw-r--r-- | sql/opt_range.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sql/opt_range.cc b/sql/opt_range.cc index afe82c71289..9dc1bcf733f 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -370,7 +370,7 @@ TRP_ROR_INTERSECT *get_best_covering_ror_intersect(PARAM *param, double read_time); static TABLE_READ_PLAN *get_best_disjunct_quick(PARAM *param, SEL_IMERGE *imerge, - double read_time); + double read_time, bool named_trace= false); static TABLE_READ_PLAN *merge_same_index_scans(PARAM *param, SEL_IMERGE *imerge, TRP_INDEX_MERGE *imerge_trp, @@ -5084,7 +5084,7 @@ double get_sweep_read_cost(const PARAM *param, ha_rows records) static TABLE_READ_PLAN *get_best_disjunct_quick(PARAM *param, SEL_IMERGE *imerge, - double read_time) + double read_time, bool named_trace) { SEL_TREE **ptree; TRP_INDEX_MERGE *imerge_trp= NULL; @@ -5132,7 +5132,8 @@ TABLE_READ_PLAN *get_best_disjunct_quick(PARAM *param, SEL_IMERGE *imerge, n_child_scans))) DBUG_RETURN(NULL); - Json_writer_object trace_best_disjunct(thd); + const char* trace_best_disjunct_obj_name= named_trace ? "best_disjunct_quick" : nullptr; + Json_writer_object trace_best_disjunct(thd, trace_best_disjunct_obj_name); Json_writer_array to_merge(thd, "indexes_to_merge"); /* Collect best 'range' scan for each of disjuncts, and, while doing so, @@ -5488,7 +5489,7 @@ TABLE_READ_PLAN *merge_same_index_scans(PARAM *param, SEL_IMERGE *imerge, DBUG_ASSERT(imerge->trees_next>imerge->trees); if (imerge->trees_next-imerge->trees > 1) - trp= get_best_disjunct_quick(param, imerge, read_time); + trp= get_best_disjunct_quick(param, imerge, read_time, true); else { /* @@ -5676,7 +5677,7 @@ void print_keyparts(THD *thd, KEY *key, uint key_parts) DBUG_ASSERT(thd->trace_started()); KEY_PART_INFO *part= key->key_part; - Json_writer_array keyparts= Json_writer_array(thd, "keyparts"); + Json_writer_array keyparts(thd, "keyparts"); for(uint i= 0; i < key_parts; i++, part++) keyparts.add(part->field->field_name); } |