Re: Help please: SELECT in binlog?
Fionn Behrens wrote: We recently switched to mysql5 and while we were at it we also changed our logs from text to bin as suggested by the migration script we had (probably created by debian people). Now I unfortunately had to reconstruct what had happened during a faulty run of our application and I could not get any SELECT statement from the log!? The usual search engine run didnt bring up anything useful, so my questions are: 1) Are the selects somwhere in the binlogs and I just have not found the right voodoo to make the come out? No, no selects. Only commands that change data are replicated, AFAIK. 2) If they are not there by default, can I configure mysqld to store SELECTs in a binlog? Not that I know of. 3) If not, is the old text log all I can go back to? You can have both, AFAIK. The general query log keeps all queries, including SELECTs. Binlog only has data-modifying queries. Cheers, jay -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Help please: SELECT in binlog?
On Do, 2007-04-19 at 13:57 -0400, Jay Pipes wrote: You can have both, AFAIK. The general query log keeps all queries, including SELECTs. Binlog only has data-modifying queries. Thanks very much for your answer. Maybe the fact that binlogs apparently are quite different from normal text logs should be clearly mentioned somewhere in the docs. Especially the mysqlbinlog manpage might be a good place to mention that SELECT statements can not be restored with it. kind regards, Fionn -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Help please: SELECT in binlog?
Fionn Behrens wrote: On Do, 2007-04-19 at 13:57 -0400, Jay Pipes wrote: You can have both, AFAIK. The general query log keeps all queries, including SELECTs. Binlog only has data-modifying queries. Thanks very much for your answer. Maybe the fact that binlogs apparently are quite different from normal text logs should be clearly mentioned somewhere in the docs. Especially the mysqlbinlog manpage might be a good place to mention that SELECT statements can not be restored with it. I think it's already fairly clearly stated that the binlog is only for replaying queries which would have modified the database. After all, why would you want to re-run a select query? From the first paragraph of the manual page describing the binlog: http://dev.mysql.com/doc/refman/5.0/en/binary-log.html The binary log contains all statements that update data or potentially could have updated it (for example, a DELETE which matched no rows). Statements are stored in the form of events that describe the modifications. I agree that the mysqlbinlog manpage doesn't clearly state it, but it does refer you to the section of the documentation about the binlog which does. Cheers Dave P -- David Precious http://blog.preshweb.co.uk/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]