(mysql.info.gz) Update log
Info Catalog
(mysql.info.gz) Query log
(mysql.info.gz) Log Files
(mysql.info.gz) Binary log
5.9.3 The Update Log
--------------------
* The update log has been deprecated and replaced by the binary
log. Binary log. The binary log can do anything the old update
log could do, and more. _The update log is unavailable as of MySQL
5.0.0_.
When started with the `--log-update[=FILE_NAME]' option, `mysqld'
writes a log file containing all SQL statements that update data. If no
FILE_NAME value is given, the default name is name of the host machine.
If a filename is given, but it doesn't contain a leading path, the file
is written in the data directory. If `file_name' doesn't have an
extension, `mysqld' creates log files with names of the form
FILE_NAME.###, where ### is a number that is incremented each time you
start the server or flush the logs.
* For this naming scheme to work, you must not create your own
files with the same names as those that might be used for the log file
sequence.
Update logging is smart because it logs only statements that really
update data. So, an `UPDATE' or a `DELETE' with a `WHERE' that finds no
rows is not written to the log. It even skips `UPDATE' statements that
set a column to its existing value.
The update logging is done immediately after a query completes but
before any locks are released or any commit is done. This ensures that
statements are logged in execution order.
If you want to update a database from update log files, you could do the
following (assuming that your update logs have names of the form
`file_name.###'):
shell> ls -1 -t -r file_name.[0-9]* | xargs cat | mysql
`ls' is used to sort the update log filenames into the right order.
This can be useful if you have to revert to backup files after a crash
and you want to redo the updates that occurred between the time of the
backup and the crash.
Info Catalog
(mysql.info.gz) Query log
(mysql.info.gz) Log Files
(mysql.info.gz) Binary log
automatically generated byinfo2html