GNU Info

Info Node: (mysql.info)Reproduceable test case

(mysql.info)Reproduceable test case


Prev: Using log files Up: Debugging server
Enter node , (file) or (file)node

Making a test case when you experience table corruption
-------------------------------------------------------

If you get corrupted tables or if `mysqld' always fails after some
update commands, you can test if this bug is reproducible by doing the
following:

   * Take down the MySQL daemon (with `mysqladmin shutdown').

   * Make a backup of the tables (to guard against the very unlikely
     case that the repair will do something bad).

   * Check all tables with `myisamchk -s database/*.MYI'.  Repair any
     wrong tables with `myisamchk -r database/table.MYI'.

   * Make a second backup of the tables.

   * Remove (or move away) any old log files from the MySQL data
     directory if you need more space.

   * Start `mysqld' with `--log-bin'. Note: Binary log.  If you want
     to find a query that crashes `mysqld', you should use `--log
     --log-bin'.

   * When you have gotten a crashed table, stop the `mysqld server'.

   * Restore the backup.

   * Restart the `mysqld' server *without* `--log-bin'

   * Re-execute the commands with `mysqlbinlog update-log-file | mysql'.
     The update log is saved in the MySQL database directory with the
     name `hostname-bin.#'.

   * If the tables are corrupted again or you can get `mysqld' to die
     with the above command, you have found reproducible bug that
     should be easy to fix! FTP the tables and the binary log to
     `ftp://support.mysql.com/pub/mysql/secret' and send a mail to
     <bugs@lists.mysql.com> or (if you are a support customer) to
     <support@mysql.com> about the problem and the MySQL team will fix
     it as soon as possible.

You can also use the script `mysql_find_rows' to just execute some of
the update statements if you want to narrow down the problem.


automatically generated by info2www version 1.2.2.9