Description:
The followings are what I did:
1. Create a table.
2. Insert data into the table from a CSV file.
3. Delete some data from the table.
4. Optimize the table.
The error will showed up as the below stated. The table will be marked as crashed and need repair. And the repaire table is not working for me. So I have to drop the table and create the table again.
This problem doesn't happen to the 32-bit version of 5.1.21-beta which is also running on the 64-bit machine.
Optimization Error:
+----------------------+----------+----------+---------------------------------------------------------------------------------------------------------+
| Table | Op | Msg_type | Msg_text |
+----------------------+----------+----------+---------------------------------------------------------------------------------------------------------+
| storydb.tbl_mainnews | optimize | info | Wrong bytesec: 0- 0- 0 at 3488938108; Skipped |
| storydb.tbl_mainnews | optimize | error | 5 when fixing table |
| storydb.tbl_mainnews | optimize | Error | Error on delete of 'C:\Program Files\MySQL\MySQL Server 5.1\Data\storydb\tbl_mainnews.MYD' (Errcode: 5) |
| storydb.tbl_mainnews | optimize | status | Operation failed |
+----------------------+----------+----------+---------------------------------------------------------------------------------------------------------+
The table structure is the following:
CREATE TABLE `tbl_mainnews` (
`SID` varchar(24) CHARACTER SET latin1 COLLATE latin1_general_cs NOT NULL DEFAULT '',
`OSID` varchar(24) DEFAULT '',
`Accession` varchar(24) DEFAULT '',
`Service` varchar(24) NOT NULL DEFAULT '',
`Storytime` datetime NOT NULL DEFAULT '1973-01-01 00:00:00',
`PCTime` datetime NOT NULL DEFAULT '1973-01-01 00:00:00',
`RetentionDays` int(11) DEFAULT '90',
`IsStoryAvailable` int(11) DEFAULT '0',
`StoryLength` int(11) DEFAULT '0',
`ComboLength` int(11) DEFAULT '0',
`IsCompress` int(11) DEFAULT '0',
`StoryType` int(11) DEFAULT '0',
`FilePath` varchar(1024) DEFAULT '',
`FileOffset` int(11) DEFAULT '0',
`Symbols` varchar(1024) DEFAULT '',
`Category` varchar(1024) DEFAULT '',
`Headline` varchar(1024) NOT NULL DEFAULT '',
`StoryBody` longtext,
PRIMARY KEY (`SID`),
KEY `idx_Storytime` (`Storytime`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
How to repeat:
I could repeat the same problem repeat the same steps I mentioned above.