From: Daevid Vincent Date: November 18 2010 7:31am Subject: Does
mysql cache strip out /* comments */ first? List-Archive:
Message-Id: <> MIME-Version: 1.0 Content-Type: text/plain;
charset="us-ascii" Content-Transfer-Encoding: 7bit Like most
developers, I have a wrapper that all of my SQL queries go
through in PHP. We have a dedicated "NOC" screen that shows the
"mytop" status of each DEV/TEST/PROD master/slave pair.
(Automatic Monitoring of remote servers) We sometimes see stuck
queries and are always hesitant to "kill" them off because we
never know WHO is executing that SQL. Is it a customer? Is it a
developer? Is it the boss? Is it rogue from some script gone
awry? Mytop doesn't give the full query due to screen real-
estate amongst other reasons. The downside is they bog down the
server until they eventually time-out or complete. Anyways,
today I implemented a simple, transparent and effective step
towards this puzzle. I prefix ALL SQL (since it goes through my
"sql_query()" function) with /* ${SCRIPTNAM