← Back to team overview

ourdelta-developers team mailing list archive

FLUSH SLOW QUERY LOG(S)

 


Splitting this from the userstats thread as Eric Bergen brought something else to my attention:
	http://ebergen.net/wordpress/2008/05/19/splitting-flush-logs-command/
with the patch at
	http://ebergen.net/patches/flush_logs.patch

He's made all logs flushable individually. Looks interesting.
However, he uses REFRESH define values that the userstats patch also utilises. Would also need a few fixups to not have the keywords be reserved words. Doesn't seem to have an issue using the LOG_SYM symbol in the syntax though, perhaps the parser handles that differently in 5.1/6.0 as I don't see other changes in the patch.

Cheers,
Arjen.


On 20/10/2008, at 7:16 AM, Arjen Lentz wrote:
On 20/10/2008, at 12:25 AM, MARK CALLAGHAN wrote:
On Sun, Oct 19, 2008 at 5:50 AM, Arjen Lentz <arjen@xxxxxxxxxxxxxxxx> wrote:
Found & fixed, pushed in
https://code.launchpad.net/~arjen-lentz/ourdelta/ourdelta- userstatsv2

Apart from the useful exercise for me (I'm sooo rusty), I decided it has
real-world relevance.
Chances are some people will have tables or columns named user_statistics or client_statistics, and thus their application would break the moment they
start using a MySQL built with this patch.

And then I also found the FLUSH SLOW QUERY LOGS addition hiding inside this patch. Also fixed up the keyword there, people are bound to have some identifier named `logs`. I extracted it to be separate, and documented both (some based on your wiki page)

I think we eventually switched back to FLUSH SLOW QUERY LOG to avoid that problem.

Sorry typo on my part; the newly introduced reserved word from this patch was `slow` so that's the one I fixed up. LOGS already existed as a keyword (but is not a reserved word) so that wasn't a problem.

Can't just make it LOG (singular) as that's a function keyword, parser doesn't like that.
Could be missing something but not sure it can be done at all.
You say you made that change?

We could just make a SLOW_QUERY_LOG symbol and not have it as reserved word. All clean. I might do that, but please let me know if indeed you did make the separate singular form work.



--
Arjen Lentz, Director @ Open Query (http://openquery.com.au/)
Training and Expertise for MySQL in Australia and New Zealand

OurDelta: free enhanced builds for MySQL @ http://ourdelta.org/






References