← Back to team overview

maria-developers team mailing list archive

Re: [Commits] Rev 3398: Make testcase stable by adding --sorted_result for SHOW STATUS commands. in file:///home/psergey/dev2/5.3-look48/

 

Hi, Sergei!

On Jan 27, Sergei Petrunia wrote:
> On Fri, Jan 27, 2012 at 03:27:50PM +0100, Sergei Golubchik wrote:
> > What do you mean?
> > SHOW STATUS returns a sorted list of variables.
> 
> #maria <montywi> SHOW STATUS gives things in random order

No, it is most certainly sorted. It is not sorted during SHOW STATUS,
but the array that SHOW STATUS iterates is maintained to be always
sorted.

> this corroborates with
> 
> https://internal.askmonty.org/buildbot/builders/debian5-i386-fulltest/builds/2153,
> 
> 'nm' pass shows:
> main.myisam_mrr                          w1 [ pass ]    606
> 
> while 'emb' pass shows:
> 
> +++ /var/lib/buildbot/maria-slave/debian5-i386-fulltest/build/mysql-test/r/myisam_mrr.reject    2012-01-26 07:08:17.000000000 -0500
> @@ -563,9 +563,9 @@
>  flush status;
>  show status like 'Handler_mrr%';
>  Variable_name  Value
> -Handler_mrr_extra_key_sorts    0
> -Handler_mrr_extra_rowid_sorts  0
>  Handler_mrr_init       0
> +Handler_mrr_extra_rowid_sorts  0
> +Handler_mrr_extra_key_sorts    0
>  create table t0 (a int);
>  insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
> 
> if it gives them sorted, how the above is possible?

Okay. You have them in the wrong positions (unsorted) in the mysqld.cc.
The array is sorted in the init_status_vars(), so I guess this function
isn't called in embedded, for some reason.

The trivial fix for you would be to put your new Handler_mrr_* variables
in the alphabetical order (in mysqld.cc)

Regards,
Sergei


References