:)
I would like the slowlogs rotated; numbered is fine.
When to rotate slowlog?
* After N bytes (a la binlog) ?
* On demand -- In this case, would not like it tied to other logs: I might want to rotate
the slowlogs daily, but never explicitly rotate any other logs.
* On restart ? Once there is rotation, this seems ok. (No strong opinion.)
General log
* would like to turn on/off without restarting server
* "rotation" with numbered files would be nice
* Again, would not like it to be tied to any other flush.
FLUSH LOGS -- command to flush all -- ok
FLUSH [SLOW|GENERAL|BIN|...] LOG -- flush one log.
Also, I would like FLUSH BIN LOG to be optionally replicated! This would lead to some
interesting tricks for taking snapshots and/or pointing a slave to a different master.
Think about it; this would easily give you a precise position. [I think]
Maybe this combo as an atomic operation
FLUSH BINLOG AND SLAVE STOP SQL;
would be 'necessary' for the idea I presented above.
MySQL Geeks - Consulting & Review
Email: rjames@stripped
Messenger : rjasdf
http://twiki.corp.yahoo.com/view/Devel/MySQLGeeks
> -----Original Message-----
> From: eric.bergen@stripped
> [mailto:eric.bergen@stripped] On Behalf Of Eric Bergen
> Sent: Thursday, May 15, 2008 10:32 AM
> To: Rick James
> Cc: Internals List
> Subject: Re: Adding new flush commands
>
> Rick,
>
> Flush slow logs (soon to be log or logs) is in the patch below. There
> is a problem in that the slow query log can be flushed but there isn't
> any code to rotate it. A flush reopens the file with a new header. In
> a separate patch I'm going to update the slow, general, and error logs
> so they rotate in numbered files like the binary logs. What do you
> think?
>
> -Eric
>
> On Tue, May 13, 2008 at 10:15 AM, Rick James
> <rjames@stripped> wrote:
> > FLUSH SLOW LOG; please
> >
> >
> > MySQL Geeks - Consulting & Review
> > Email: rjames@stripped
> > Messenger : rjasdf
> > http://twiki.corp.yahoo.com/view/Devel/MySQLGeeks
> >
> >
> >
> >> -----Original Message-----
> >> From: Sergei Golubchik [mailto:serg@stripped]
> >> Sent: Tuesday, May 13, 2008 12:16 AM
> >> To: Eric Bergen
> >> Cc: Internals List
> >> Subject: Re: Adding new flush commands
> >>
> >> Hi!
> >>
> >> On May 12, Eric Bergen wrote:
> >> > Hi,
> >> >
> >> > I'm trying to split the flush logs command into several different
> >> > flush commands. Examples are;
> >> > flush binary log;
> >> > flush relay log;
> >> >
> >> > My problem is that when I add the log symbol the new
> >> commands work but
> >> > the log function is disabled with a parse error:
> >> >
> >> > mysqltest: At line 495: query 'select log()' failed with
> wrong errno
> >> > 1064: 'You have an error in your SQL syntax; check the
> manual that
> >> > corresponds to your MySQL server version for the right
> syntax to use
> >> > near '()' at line 1', instead of 1582...
> >> >
> >> > If I change the commands to flush binary logs (as in the
> >> patch below)
> >> > it works great.
> >> >
> >> > Is there something special I have to define to prevent
> my log symbol
> >> > from conflicting with the log function?
> >>
> >> Yes :(
> >> You need to remove LOG function from item_create.cc and add
> >> an explicit
> >> rule for it in sql_yacc.yy. See rules function_call_keyword,
> >> function_call_nonkeyword, function_call_generic,
> >> function_call_conflict
> >> there.
> >>
> >> Regards / Mit vielen Grüssen,
> >> 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
> >>
> >> --
> >> MySQL Internals Mailing List
> >> For list archives: http://lists.mysql.com/internals
> >> To unsubscribe:
> >> http://lists.mysql.com/internals?unsub=1
> >>
> >>
> >
> > --
> > MySQL Internals Mailing List
> > For list archives: http://lists.mysql.com/internals
> > To unsubscribe:
> http://lists.mysql.com/internals?unsub=1
> >
> >
>
>
>
> --
> high performance mysql consulting.
> http://provenscaling.com
>