From: Sonam Chauhan Date: November 16 2000 3:46am Subject: Re: Question on detailed logging List-Archive: http://lists.mysql.com/mysql/56479 Message-Id: <3A135891.C0D2F223@ce.com.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Thank you Philemon! The comments do make their way to the update logs... exactly what I needed. Best regards, Sonam Benjamin Pflugmann wrote: > > Hi. > > On Tue, Nov 14, 2000 at 02:44:21PM +1100, sonamc@stripped wrote: > > sasha@stripped wrote: > > > Sonam Chauhan wrote: > [...] > > I was hoping I could leverage the logs by extending the Database Driver <--> MySQL > > 'conversation' to pass an additional 'comment' parameter on every database query > > executed. This does mean additional coding for the DB API and the MySQL server. > > but it give admins the capability for fine-grained audits. > > At least in MySQL 3.22.21, the queries are logged as they are sent to > the server, i.e. with SQL comments (tested with the update log). > > So you could try to write something like: > > SELECT whatever FROM my_table WHERE any_condition /* user: foobar */ > > and grep for '/* user: ' in the log when you want to search for such > rows. This method surely can extended to whatever you need in detail, > given comments are still passed to the logs in your version (and in > future ones). > > Bye, > > Philemon. > > PS: Either the "internals" or "mysql" list is too much on the CC. I > just not sure which... -- Sonam Chauhan Electronic Commerce Corporate Express Australia Ltd. Phone: +61-2-9335-0725 Fax: +61-2-9335-0753