List:Internals« Previous MessageNext Message »
From:Rick James Date:July 19 2007 10:16pm
Subject:RE: sql_log_slow and executable comment version fun.
View as plain text  
Since you are thowing away useful data, I suggest this modification...
Don't drop the query, truncate it. 

> -----Original Message-----
> From: eric.bergen@stripped 
> [mailto:eric.bergen@stripped] On Behalf Of Eric Bergen
> Sent: Wednesday, July 18, 2007 9:49 PM
> To: internals@stripped
> Subject: sql_log_slow and executable comment version fun.
> 
> 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
> size.
> 
> 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:
> http://ebergen.net/patches/sql_log_slow.patch
> 
> 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.
> http://provenscaling.com
> 
> -- 
> MySQL Internals Mailing List
> For list archives: http://lists.mysql.com/internals
> To unsubscribe:    
> http://lists.mysql.com/internals?unsub=1
> 
> 

Thread
sql_log_slow and executable comment version fun.Eric Bergen19 Jul
  • RE: sql_log_slow and executable comment version fun.Rick James20 Jul
    • Re: sql_log_slow and executable comment version fun.Eric Bergen29 Jul
  • Re: sql_log_slow and executable comment version fun.Chad MILLER30 Jul
    • RE: sql_log_slow and executable comment version fun.Rick James7 Aug
      • Re: sql_log_slow and executable comment version fun.Eric Bergen22 Aug