FRM File Corruption.

FRM File Corruption.

am 31.10.2003 10:26:58 von P Srinivasulu

Hi All,

Don't know whether its a defect or intentionally left in Mysql for
Performance reasons. One of steps done during creation of table in Mysql
is creation of FRM file.
I have noticed in the code that after writing the data into the frm
file its not explicitly flushed to the disk. The updates to the file
might be in the memory till file system takes care of flushing them in
to the disk. If we crash or kill the Mysql sever in this time interval
(after updates are done before these updates are flushed into the disk),
These FRM files are getting corrupted. Is this expected behaviour?


Thanks,
Srini.


--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/bugs?unsub=gcdmb-bugs@m.gmane.org

Re: FRM File Corruption.

am 31.10.2003 10:31:37 von Peter Zaitsev

On Fri, 2003-10-31 at 12:26, P Srinivasulu wrote:
> Hi All,
>
> Don't know whether its a defect or intentionally left in Mysql for
> Performance reasons. One of steps done during creation of table in Mysql
> is creation of FRM file.
> I have noticed in the code that after writing the data into the frm
> file its not explicitly flushed to the disk. The updates to the file
> might be in the memory till file system takes care of flushing them in
> to the disk. If we crash or kill the Mysql sever in this time interval
> (after updates are done before these updates are flushed into the disk),
> These FRM files are getting corrupted. Is this expected behaviour?

Right,

This is possible. It is also possible MySQL to crash having corrupted
FRM file.

The thing is FRM files are created/updated very rarely, this is why this
problem is not what we have many users reported.

In MySQL 4.1 we have plans to fsync() frm files at least for
transactional non-temporary tables as soon as they are created.



--
Peter Zaitsev, Full-Time Developer
MySQL AB, www.mysql.com

Are you MySQL certified? www.mysql.com/certification


--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/bugs?unsub=gcdmb-bugs@m.gmane.org