Hi, I assume you are speaking about this comment :
"+--------------------+----------+----------+------ ----------------+ | Table | Op | Msg_type | Msg_text | +--------------------+----------+----------+------ ----------------+ | database.table_name | optimize | error | 28 when fixing table | | database.table_name| optimize | status | Operation failed | +--------------------+----------+----------+------ ----------------+ 2 rows in set (40.91 sec) I typed it in again thinking it had some sort of rollback or perhaps just a machine glitch but then I typed it in again and got the folowing mysql> optimize table table_name; +--------------------+----------+----------+------ -------------------------------------------+ | Table | Op | Msg_type | Msg_text | +--------------------+----------+----------+------ -------------------------------------------+ | database.table_name | optimize | error | Can't open file: 'table_name.MYD'. (errno: 144) | +--------------------+----------+----------+------ -------------------------------------------+ and lo all my data is lost... thank god for mysql dump." Well error 28 means there is no space left on the device. When you run and OPTIMIZE TABLE statement, MySQL locks the main table and recreate in // the index file. As MySQL failed to recreate the index file, the table was marked as crashed (errno: 144), but in any case data were lost (data file is not altered during an optimize) : he just have to execute a REPAIR TABLE statement to have all his record back. Take a look at what happens during an optimize of the following : Before OPTIMIZE TABLE searchmainhardwarefr8 : [root@forum] /home/mysql/Hardwarefr> l searchmainhardwarefr8.* <19:28:52 -rw-rw---- 1 mysql mysql 27589205 Dec 18 19:25 searchmainhardwarefr8.MYD -rw-rw---- 1 mysql mysql 16257024 Dec 18 19:25 searchmainhardwarefr8.MYI -rw-rw---- 1 mysql mysql 8596 Oct 18 17:03 searchmainhardwarefr8.frm During OPTIMIZE TABLE searchmainhardwarefr8 : [root@forum] /home/mysql/Hardwarefr> l searchmainhardwarefr8.* <19:29:21 -rw-rw---- 1 mysql mysql 27589205 Dec 18 19:25 searchmainhardwarefr8.MYD -rw-rw---- 1 mysql mysql 16257024 Dec 18 19:25 searchmainhardwarefr8.MYI -rw-rw---- 1 mysql mysql 6696960 Dec 18 19:29 searchmainhardwarefr8.TMM -rw-rw---- 1 mysql mysql 8596 Oct 18 17:03 searchmainhardwarefr8.frm After OPTIMIZE TABLE searchmainhardwarefr8 : [root@forum] /home/mysql/Hardwarefr> l searchmainhardwarefr8.* <19:29:22 -rw-rw---- 1 mysql mysql 27589205 Dec 18 19:25 searchmainhardwarefr8.MYD -rw-rw---- 1 mysql mysql 16257024 Dec 18 19:29 searchmainhardwarefr8.MYI -rw-rw---- 1 mysql mysql 8596 Oct 18 17:03 searchmainhardwarefr8.frm As you can see, only the MYI file (index file) has changed, the data file remains untouched. Since you can completly recreate the MYI using the MYD file, there is no data lost possibility, even if the hard disk is full. Regards, Jocelyn ----- Original Message ----- From: "Michael She" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]>; "Muruganandam" <[EMAIL PROTECTED]> Sent: Wednesday, December 18, 2002 5:16 PM Subject: Re: Can MySQL handle 120 million records? > At 08:06 AM 12/18/2002 -0800, Jeremy Zawodny wrote: > > > > > I have no problems using MySQL as a lightweight database for simple > > > chores, but I'm a bit weary about putting into a mission critical > > > environment. > > > >Why, exactly? > > > Mainly for 2 reasons: > > 1. MySQL hasn't been "proven" yet in the corporate environment > 2. Some of the comments in the mySQL manual... people losing data doing > routine stuff like table optimizations, adding keys, etc. If a database is > reliable, things like that shouldn't happen. Comments like those in the > MySQL manual scared me. > -- > Michael She : [EMAIL PROTECTED] > Mobile : (519) 589-7309 > WWW Homepage : http://www.binaryio.com/ > > > > --------------------------------------------------------------------- > 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 > > > > --------------------------------------------------------------------- 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