The slow query log is a great tool for finding long running queries.
One thing it doesn't do is allow you to not log known slow queries.
Slow queries from things like importing large sql files. With
long_query_time set low enough bulk insert queries from dump files are
also written out to the slow query log. The entire query is written to
the log. On a large dump file the log can quickly grow to gigs in
This patch serves two purposes. First it adds a variable to mysql that
works exactly like sql_log_bIn in that it allows clients to prevent
queries from being logged at the session level. Second it updates
mysqldump to add this variable to it's dump output.
A possible side effect of this new variable output is that it's tagged
with a version number. In the old days this would be fine since newer
versions of mysql will know about the variable and act accordingly.
However, with mysql enterprise it's possible that newer versions of
enterprise will have a higher version number than what's in output of
mysql yet not support the new variable. Importing a dump file created
on a version of mysql with this patch then trying to import it on a
newer version without the patch will error. What are the lists
thoughts on how to handle this?
The patch is at:
It was written for 5.0.41 but applies against 5.0.45 as well. I can
rebuild the patch for the newer version is necessary.
high performance mysql consulting.