← Back to team overview

maria-developers team mailing list archive

Re: [Commits] 42129dae63c: MDEV-18741: Optimizer trace: multi-part key ranges are printed incorrectly

 

Hi Varun,

One cosmetic comment below. Ok to push after it is addressed.

On Fri, May 24, 2019 at 03:51:00PM +0530, Varun wrote:
> revision-id: 42129dae63c4331b01f9a504c9f3ef1c0c1f857a (mariadb-10.4.4-126-g42129dae63c)
> parent(s): 592fe954ef82be1bc08b29a8e54f7729eb1e1343
> author: Varun Gupta
> committer: Varun Gupta
> timestamp: 2019-05-24 14:43:44 +0530
> message:
> 
> MDEV-18741: Optimizer trace: multi-part key ranges are printed incorrectly
> 
> Changed the function append_range_all_keyparts to use sel_arg_range_seq_init / sel_arg_range_seq_next to produce ranges.
> Also adjusted to print format for the ranges, now the ranges are printed as:
>     (keypart1_min, keypart2_min,..)  OP (keypart1_name,keypart2_name, ..) OP (keypart1_max,keypart2_max, ..)
> 
> Also added more tests for range and index merge access for optimizer trace
...
> diff --git a/sql/opt_range_mrr.cc b/sql/opt_range_mrr.cc
> index 3a25da3edb2..5644e456dd4 100644
> --- a/sql/opt_range_mrr.cc
> +++ b/sql/opt_range_mrr.cc
> @@ -53,6 +53,8 @@ typedef struct st_sel_arg_range_seq
>    int i; /* Index of last used element in the above array */
>    
>    bool at_start; /* TRUE <=> The traversal has just started */
> +  /* TRUE if last checked tree->key can be used for ROR-scan */
> +  bool is_ror_scan;
>  } SEL_ARG_RANGE_SEQ;
>  
> 

This comment made sense at the previous location, but here it doesn't.

Here the meaning is something like "Iteration functions will set this to FALSE"
if ranges being traversed do not allow to construct a ROR-scan".



BR
 Sergei
-- 
Sergei Petrunia, Software Developer
MariaDB Corporation | Skype: sergefp | Blog: http://s.petrunia.net/blog