Thanks.  You're right, of course.  Nevertheless, I think the suggestions I
made should help.

(Context:  There was a post asking how to avoid table corruption.  There
were several replies suggesting UPS.  I suggested that, in addition to UPS,
there were two other things that could be done.)

(1)  Use InnoDB. Of course, you need to worry that InnoDB does a
physical write when it thinks it does.  My understanding is that it tries to
do so, if it can, when innodb_flush_log_at_trx_commit=1.

(2)  If MyISAM updates are infrequent, flush tables after updates.  This
closes
the files, which generally causes physical writes on most OS's.  Of course,
this doesn't help with loss of power while an update is running, but it
does avoid corruption when there are no updates going on, and MyISAM
is susceptible to the latter.


----- Original Message -----
From: "Michael T. Babcock" <[EMAIL PROTECTED]>
To: "Bill Easton" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>; "Tom Thurnherr" <[EMAIL PROTECTED]>
Sent: Monday, October 28, 2002 10:18 AM
Subject: Re: database corrupted after power switched off


> Bill Easton wrote:
>
> >   ... which says "MyISAM table format is very reliable (all changes to a
> >table is written before the SQL statements returns)"  Evidently, this is
NOT true.
> >(Perhaps, it used to be true for ISAM tables.  The documentation should
be
> >changed.)
> >
> You are misinterpreting the statement; it says that the database will be
> safe after the SQL command returns (all SQL commands active on the
> table, for that matter).  That is to say, if the power were turned off
> while any (update / etc.) SQL command was running, you could expect
> corruption.
>
> Again, make sure you check how your OS deals with write caching and
> consider turning it off on the partition / disk you're using for DB
storage.
>
> --
> Michael T. Babcock
> C.T.O., FibreSpeed Ltd.
> http://www.fibrespeed.net/~mbabcock
>
>
>



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to