SQL call formatting style

Bradley Baetz bbaetz at acm.org
Tue Mar 25 20:11:37 UTC 2003


On Tue, Mar 25, 2003 at 09:00:04AM -0800, Myk Melez wrote:
> Yes, because newlines mess up the structured format in which "mysqladmin 
> processlist" displays queries, making it hard to identify errant 
> queries, especially programmatically.  Otherwise I'd be on bbaetz' side, 
> since I find multi-line strings easier to work with, but being able to 
> work with the MySQL process list is really important for Bugzilla system 
> administrators, so I think we should use concatenation or newline 
> substitution where possible (queries with strings that may have newlines 
> in them can't be easily stripped of newlines with s/\s+/ /g).

Well......

Thats a point, I guess, but I'd guess that that doens't happen too
often. Doesn't mysql have a query timeout option which can replace that
mysqlkill thing now, anyway?

You'd be better off patching mysqladmin, I think.

Our long running queries are basically only Bugzilla/Search.pm - the
sort of stuff I'm using this for is just simple accessor stuff in the
db.

I thinkthat readability in the source code (using Q/QQ instead of
concatenated strings) should take priority over that.

Bradley



More information about the developers mailing list