Hi!
Ingo, a couple of comments:
(it's not a review, I only looked at whether you support global
debug_sync variable):
> +bool sys_var_debug_sync::check(THD *thd, set_var *var)
> +{
> + DBUG_ENTER("sys_var_debug_sync::check");
> +
> + /* Variable can be set for the session only. */
> + if (var->type == OPT_GLOBAL)
> + {
> + my_error(ER_WRONG_OBJECT, MYF(0), "SESSION", name, "global variable");
> + DBUG_RETURN(TRUE);
> + }
1. It makes perfect sense and well-defined semantics to support global
debug_sync variable. If global debug_sync is set, then whatever
thread reaches the sync point will execute the action. It could be
very useful for testing non-connection threads, e.g. replication or
delayed inserts. @@debug variable supports both global and session
assignments.
But I didn't check your implementatino. Is it difficult to support
global debug_sync ?
2. Anyway, the error message is wrong. A generic mistake - you cannot use
"global variable" as a parameter, as it breaks localized error messages,
as in "SESSION.debug_sync ist nicht global variable". For this
particular case there is ER_LOCAL_VARIABLE:
"Variable '%-.64s' is a SESSION variable and can't be used with SET GLOBAL"
"Variable '%-.64s' ist eine lokale Variable und kann nicht mit SET GLOBAL
verändert werden"
Regards / Mit vielen Grüssen,
Sergei
--
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Sergei Golubchik <serg@stripped>
/ /|_/ / // /\ \/ /_/ / /__ Principal Software Developer/Server Architect
/_/ /_/\_, /___/\___\_\___/ MySQL GmbH, Dachauer Str. 37, D-80335 München
<___/ Geschäftsführer: Kaj Arnö - HRB
München 162140