Bug #77384 MyISAM unable to drop corrupted partition - "marked as crashed"
Submitted: 17 Jun 2015 9:11 Modified: 2 May 2018 22:13
Reporter: Andy Middleton Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: MyISAM storage engine Severity:S2 (Serious)
Version:5.6.17 OS:Microsoft Windows (Win 8 Pro 64)
Assigned to: CPU Architecture:Any
Tags: MyISAM Partition crashed drop

[17 Jun 2015 9:11] Andy Middleton
Description:
[mysql.exe]
show table status;
".\....\videoscan#p#p20150530 is marked as crashed and last automatic(?) repair failed"

amend table videoscan drop partition p20150530;
".\....\videoscan#p#p20150530 is marked as crashed and last automatic(?) repair failed"

# n.b. to get the system running again, move the table out of the way:
rename table videoscan to videoscanold;
"Query OK"

amend table videoscanold repair partition p20150530;
"Table         op      Msg_type   Msg_text"
videoscanold   repair  error      0 when fixing table
videoscanold   repair  error      Partition p20150530 returned error
videoscanold   repair  Error      Can't get stat of 'D:\.....\videoscanold#P#P20150530.MYD' (Errcode 0 - No error)
videoscanold   repair  Status     Operation failed

4 rows in set (3 hours 55 min 2.33 sec)"

-------------

(note: This is transcribed from a screen dump - unable to capture the text.)

This table videoscan is a log file: essentially "write once".
(and the older partitions are typically never read).
In typical use only one partition is read, that for the current day.
In this instance the "current day" was two weeks after the corrupted partition was written.

So many issues:
1) Windows event log filled with reports of the table corruption.
2) Unable to repair partition: error with "No error".
3) Unable to drop partition, because its corrupted?
   The corruption is why the partition had to go.
4) After 3+ hours, suddenly the .MYD is somehow not there?
5) Why is this partition corrupted, when it was not being written to?
6) How did the engine know it was corrupt, when there no requests to access it?

How to repeat:
Intermittent.

Initial corruption _maybe_ caused by uncontrolled PC reset/power down.

Happens periodically, though. Always these symptoms: unrepairable.
[2 May 2018 22:13] Miguel Solorzano
I couldn't repeat with current source server without a repeatable test case.