← Back to team overview

maria-developers team mailing list archive

Re: Proposal to split @@optimizer_switch

 

On Fri, Jun 10, 2011 at 12:13:12PM +0400, Sergey Petrunya wrote:
> Hello,
> 
> Please find below descriptions of problems with current @@optimizer_switch
> variable, as well as a proposal on how to fix it.
> 

Results of IRC discussion on June, 22 (as I interpret them):


Everyone agrees that we need to keep current @@optimizer_switch for 
compatibility reasons (it was actually present as early as in MySQL 5.1)


Monty considers the "SET optimizer.xxx.yyy.*" syntax strange, it's better to
allow selecting/setting of any prefix of the variable name. There is no
opposition to this.


It is okay to do implementation in steps - first support the dotted syntax
and SET xxx.yy.prefix=DEFAULT, and then support setting/selecting arbitrary
prefixes.


Sergei sees the goal as "introducing a consistent hierarchical naming system 
for variables". That is, 
- every implicit variable group, like aria_  or myisam_ should be switched to
  the dotted notation right away.
- Old variable names should be supported, too.
In order to meet the second, we could

A. Have both kinds of variables (dotted and un-dotted) be settable with SET 
and listed in SHOW VARIABLES
- Plus:  straightforward, compatible.
- Minus: having everything listed twice under two names is confusing.

B. Introduce some scheme where we have '.'=='_' when comparing variable names.
SHOW VARIABLES output will be controlled by @@SHOW_VARIABLES_USES_UNDERSCORE/
- Plus: we could use a dotted notation while some of the scripts that use 
        "SHOW VARIABLES LIKE setting" would still work. (As long as they don't 
        try comparing the names of the variables they got:)
- Minus: The scheme is difficult to understand. Also, our intent is not always
        to change @@xxx_yyy_zzz to @@@xxx.yyy.zzz, e.g. we don't need 
        @@table.definition.cache or @@system.time.zone.

C. Allow SET to set both old and new names, and use some setting to control
whether SHOW VARIABLES will display old, new, or both kinds of variables.
The question is, what should be the default setting.


Sergei thinks that "optimizer switch can survive in its current form for a
while", to which SergeyP strongly disagrees.

We need to discuss whether we should follow Sergei's suggestion of global
system of hierarchical names or focus on @@optimizer_switch only.

BR
 Sergey
-- 
Sergey Petrunia, Software Developer
Monty Program AB, http://askmonty.org
Blog: http://s.petrunia.net/blog


Follow ups

References