MySQL Forums
Forum List  »  MyISAM

Repairing packed MyISAM tables with no index file (.MYI)
Posted by: Kayra Otaner
Date: March 20, 2006 04:26PM

Hello,

I have been using myisampack to pack old MyISAM tables to archive huge amounts of data. To save more space I decided to get rid of index (.MYI) files based on the assumption that I can reconstruct those indexes whenever I needed. I've rebuild indexes on plain MyISAM tables with no problem. I always use :

repair table TABLENAME USE_FRM;

from MySQL console to rebuild index files from scratch. When I try the same on packed MyISAM tables MySQL fails. First it gives me bunch of same type of errors :

| test.z_976287758_978107517 | repair | info | Found block that points outside data file at 382300672 |

Then when it is finishes complaining about blocks outside data file, it actually deletes actual data file (.MYD) :

-rw-r----- 1 0 Mar 20 21:58 z_976287758_978107517.MYD
-rw-rw---- 1 1.0K Mar 20 21:59 z_976287758_978107517.MYI
-rw-r----- 1 8.7K Mar 20 20:15 z_976287758_978107517.frm

Typically I would expect USE_FRM to not to touch actual data, but just rebuild index file. When I try the same with myisamchk console utility, it does the same. I use 5.0.18 on RHEL4 and RHEL3. Tested it only on 5.x so far, doesn't work it with 4.x since utils seems like different.


Any idea on what is going on? Did I hit to a bug?

Thanks.

Kayra Otaner

Options: ReplyQuote


Subject
Views
Written By
Posted
Repairing packed MyISAM tables with no index file (.MYI)
10641
March 20, 2006 04:26PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.