Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions

  




 

 

E.1.6. Making a Test Case If You Experience Table Corruption

If you get corrupted tables or if mysqld always fails after some update commands, you can test whether 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 does 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. See Section 5.11.4, “The 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://ftp.mysql.com/pub/mysql/upload/ and report it in our bugs database using the instructions given in Section 1.8, “How to Report Bugs or Problems”. (Please note that the /pub/mysql/upload/ FTP directory is not listable, so you'll not see what you've uploaded in your FTP client.) If you are a support customer, you can use the MySQL Customer Support Center https://support.mysql.com/ to alert the MySQL team about the problem and have it fixed 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.


 
 
  Published under the terms of the GNU General Public License Design by Interspire