List:General Discussion« Previous MessageNext Message »
From:Jim Nachlin Date:July 9 2004 3:45pm
Subject:Re: Data corruption on deletes
View as plain text  
gerald_clark wrote:
> Hardware?
Celeron 1.3Ghz, IDE drive, 512Mb RAM

> OS and version?
GNU/Linux, 2.4.20-8 kernel

> MySql version?
4.0.17

> Size of data file?
> Size of index file?
postsearch.frm 8.7K
postsearch.MYD 3.5G
postsearch.MYI 1.0G
postsearch.TMD 3.5G

> Filesystem type?
ext3


   Sorry 'bout that!

Also, in the time since posting the question below, I tried the
operation again (after repairing things), but I did a ALTER TABLE ___
DISABLE KEYS before and an ENABLE KEYS after.  This did not work, as
although the DB seemed to be working afterwards,

mysql> describe  postsearch;
ERROR 1016: Can't open file: 'postsearch.MYI'. (errno: 144)

So now I am repairing again.


   Thanks for your interest,
    Jim


> 
>> I have a table with several keys.  When I try to delete anything from 
>> this table, I get data corruption and have to repair it with 
>> myisamchk.  Selects, updates work fine.
>>
>>
>> Here's the create table statement:
>>
>> CREATE TABLE `postsearch` (
>>   `postId` int(11) NOT NULL default '0',
>>   `weblogId` int(11) NOT NULL default '0',
>>   `url` varchar(200) NOT NULL default '',
>>   `plink` varchar(200) NOT NULL default '',
>>   `image` varchar(100) default NULL,
>>   `language` varchar(100) default NULL,
>>   `title` varchar(100) default NULL,
>>   `weblogTitle` varchar(100) default NULL,
>>   `dateCreated` datetime NOT NULL default '0000-00-00 00:00:00',
>>   `post` text,
>>   `excerpt` text,
>>   `parserVersion` varchar(255) default NULL,
>>   PRIMARY KEY  (`postId`),
>>   KEY `weblog_key` (`weblogId`,`dateCreated`),
>>   KEY `url_key` (`url`),
>>   KEY `plink_key` (`plink`),
>>   FULLTEXT KEY `excerpt` (`excerpt`)
>> ) TYPE=MyISAM
>>
>>
>> I think I have to somehow disable the keys, but am not sure quite how.
>>
>> Here's what happens when I try to delete:
>>
>>
>> mysql> select postId from postsearch where dateCreated < NOW() - 
>> INTERVAL 14 DAY limit 1;
>> +--------+
>> | postId |
>> +--------+
>> |  65031 |
>> +--------+
>> 1 row in set (0.10 sec)
>>
>> mysql> delete from postsearch where postId=65031 limit 1;
>> ERROR 1034: Incorrect key file for table: 'postsearch'. Try to repair it
>>
>>
>>
>> Anybody have any idea?
>>
>>
>>    Jim
>>
> 


Thread
Data corruption on deletesJim Nachlin9 Jul
  • Re: Data corruption on deletesgerald_clark9 Jul
Re: Data corruption on deletesJim Nachlin9 Jul
  • Re: Data corruption on deletesJim Nachlin12 Jul