If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > mysql data corruption?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-13-06, 14:19
wallunchan wallunchan is offline
Registered User
 
Join Date: Nov 2006
Posts: 2
mysql data corruption?

I have mysql running on a platform that physically stores data on compact flash. We currently have issues with data corruption where people shut down the system by powering it down hard, the database gets corrupted.

I need to know if there are options in mysql to help flush the buffer in such a way to minimize data corruption for any major updates to the database.

For example, during an update to a table, the system may be powered down. Any ideas on how to minimize data corruption for this volatile environment is appreciated.
Reply With Quote
  #2 (permalink)  
Old 11-21-06, 10:35
snorp snorp is offline
Registered User
 
Join Date: Apr 2004
Location: Europe->Sweden->Stockholm
Posts: 71
Hi there wallunchan,

what storage engine do you use for your tables? InnoDB tables should in theory be able to handle this without problems, if I understand matters correctly. During an update, the data is first written to a log and then to the table space. If the unexpected (or, in your application, the expected) happens, it should be able to roll back half-written rows. For this to work, you should probably:

1. Convert all tables to InnoDB.
2. Not perform any updates on tables that you must not convert to InnoDB (such as the mysql.user table). Make sure that you do not convert MySQL's internal tables to InnoDB!

Hope this helps. If or if not, hope to hear from you!
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On