On Thu, Nov 28, 2002 at 06:58:00PM -0600, Moritz von Schweinitz wrote: > Tim Bunce wrote: > > >On Tue, Nov 26, 2002 at 03:54:56PM -0600, Moritz von Schweinitz wrote: > > > >>Hi there, > >> > >>this is kinda OT, since i fear it's more of a mysql than dbi issue, but > >>here goes... > >> > >>the thing is that i have this long-running perlTk app. if i forcefully > >>bring my database-servre down (simply brutaly switching it off - my > >>system has to be able to handle really painful stuff like that), > > > >Use MySQL InnoDB tables (or another database that handles transations). > > well, yes...but just out of couriousity: i brought down my server while > the clients where almost 100% sure NOT to actually do anything. so is > this something one should look out for? killing the mysql server even if > there are no updates running can cause table corruption?!?
1/ It's very unlikely that the _data_ was actually corrupted. 2/ The _index_ may be corrupt (because mysql caches keys) but can be rebuilt. 3/ MySQL will detect when a table was not previously closed properly (ie a crash) and flag it as 'corrupt' even though it may not be. 4/ MySQL can set setup to automatically repair 'corrupt' tables. 5/ If you _need_ more safety then you _need_ transactions. Tim.
