I have a number of database administration shell scripts which construct into a temp file sequences of mysql commands AND comments (in a specific custom format with @log-xxx@ codes) like these
/* @log-action@ DATE UPDATE of all correlations for table NAME */ select concat(now(),' UPDATING ALL CORRELATION TABLES FOR TABLE $1 ' ); /* @log-check@ (re)create entries in Korrelations */ create temporary table temp select * from Korrelations where Tab1='$pbda' ; Then I submit such files to mysql with e.g. mysql -vvv -u lssadmin -p`keylssadmin` xmmlssadmin < tmp.sql >! pre.log Finally I reprocess pre.log which an awk scripts which interprets the specially formatted comments (which are echoed in the log) to reformat the log in HTML in a specific way This has nicely worked since mysql 3.23, and currently with 4.0.21 I tried the same on a newer mysql 5.0.27, and with my surprise found that the comments are no longer echoed on stdout ! This demonstrates the case mysql -vvv -u $user -p$password $dbase << END ? /* this is a comment */ ? select now(); END on 4.0 I get as stdout -------------- /* this is a comment */ select now() -------------- +---------------------+ | now() | +---------------------+ | 2007-06-18 16:14:32 | +---------------------+ 1 row in set (0.01 sec) Bye but on 5.0 the first comment line is NOT echoed ! Is there a command line switch to repristinate the echo of comments in 5.0 as well ? All our logging policy depends on that ! -- ------------------------------------------------------------------------ Lucio Chiappetti - INAF/IASF - via Bassini 15 - I-20133 Milano (Italy) For more info : http://www.iasf-milano.inaf.it/~lucio/personal.html ------------------------------------------------------------------------ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]
