List:Commits« Previous MessageNext Message »
From:Sergei Golubchik Date:October 3 2008 8:24am
Subject:Re: bzr commit into mysql-5.1 branch (azundris:2741) WL#4403
View as plain text  
Hi, Davi!

On Oct 03, Davi Arnaut wrote:
> Hi Tatiana,
> 
> Tatiana A. Nurnberg wrote:
> > #At file:///home/tnurnberg/forest/4403/51-4403/
> > 
> >  2741 Tatiana A. Nurnberg	2008-09-20
> >       WL#4403 deprecate @log and @slow_log_queries variables
> >       
> >       Adds --general-log-file, --slow-query-log-file command-
> >       line options to match system variables of the same names.
> >       
> >       Deprecates --log, --log-slow-queries command-line option
> >       and log, log_slow_queries system-variables for v7.0; they
> >       are superseded by general_log/general_log_file and
> >       slow_query_log/slow_query_log_file, respectively.
> > +Warnings:
> > +Warning	1287	The syntax 'log' is deprecated and will be removed in MySQL 7.0.
> Please use 'general_log' instead
> 
> Hum, it's really a syntax, it's a variable.
> 
> > +  if (this == &sys_var_log)
> > +    WARN_DEPRECATED(thd, "7.0", "log", "'general_log'");
> > +  else if (this == &sys_var_log_slow)
> > +    WARN_DEPRECATED(thd, "7.0", "log_slow_queries", "'slow_query_log'");
> > +
> 
> I have a feeling that WARN_DEPRECATED was meant for the parse and signal
> deprecated syntax. I think it would be better if we introduced a
> extension to the WARN_DEPRECATED macro which would receive a parameter
> that describing what is exactly is being deprecated. For example:
> 
> WARN_DEPRECATED_EXT(thd, "7.0", "variable", "log", "'general_log'");
> 
> which would unfold to something similar to:
> 
> The variable 'log' is deprecated and will be removed in MySQL 5.2.
> Please use 'general_log' variable instead.

A problem with that is - you hard-code theword "variable" so this
message cannot be translated to other languages. This can be solved, of
course (by adding ER_VARIABLE). Although I'd simply use WARN_DEPRECATED
with

    WARN_DEPRECATED(thd, "7.0", "@@log", "'@@general_log'");

which makes it clear that we're talking about a variable, not, for
example, a function LOG(), and "@@log" is an element of the syntax after
all.

Regards / Mit vielen GrЭъen,
Sergei

-- 
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /   Sergei Golubchik <serg@stripped>
 / /|_/ / // /\ \/ /_/ / /__  Principal Software Engineer/Server Architect
/_/  /_/\_, /___/\___\_\___/  Sun Microsystems GmbH, HRB MЭnchen 161028
       <___/                  Sonnenallee 1, 85551 Kirchheim-Heimstetten
GeschДftsfЭhrer: Thomas Schroeder, Wolfgang Engels, Dr. Roland Boemer
Vorsitzender des Aufsichtsrates: Martin HДring
Thread
bzr commit into mysql-5.1 branch (azundris:2741) WL#4403Tatiana A. Nurnberg20 Sep
  • Re: bzr commit into mysql-5.1 branch (azundris:2741) WL#4403Davi Arnaut3 Oct
    • Re: bzr commit into mysql-5.1 branch (azundris:2741) WL#4403Sergei Golubchik3 Oct
    • Re: bzr commit into mysql-5.1 branch (azundris:2741) WL#4403Marc Alff3 Oct