Almost after each server crash, few last database records are deleted. How could I fix or workaround this? My distro is Ubuntu Server 9.10 and database MySql 5.1.37
You may want to change the type of Storage Engine you are using. Typically the default MyISAM engine works great for indexing while the InnoDB works great for foreign key constraints. These constraints can help you remove data from multiple tables when your initial query only appears to run against a single table. It almost sounds like you were running a transaction using a InnoDB Engine. Choose your database and then run the following to find out:
You should be able to recover you records if you log them some where. Logging certainly puts a load on your system but if they exist you'll probably find them here (you should log while your building out anyway):
You can change your settings here:
Don't forget to reboot after making changes. If you don't have logs try crashing your system intentionally after you do start logging. You may see a similar transaction occur during your intentional crash that will give you some more clues.