Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Read a mysql .MYD file without a working .MYI file?

by oko1 (Deacon)
on Nov 17, 2008 at 01:39 UTC ( [id://723974]=note: print w/replies, xml ) Need Help??


in reply to Read a mysql .MYD file without a working .MYI file?

This might be a somewhat backwards and hand-wavy approach; I only suggest it because, well, it worked for me once when I really needed it. Is there an easy way (or even a semi-difficult one) for you to delete or fix that last record manually? MySQL might start doing The Right Thing if you present it with clean data.

(If you have no interest in the details, don't click the 'Read More' link. The above says it all, really. :)

Ages ago, on a planet far away, when I was the CIO of a certain insurance company That Shall Not Be Named, our claims department happened to somehow write a damaged record into claims_db. Since no one had tried to read that particular record for months, it lay there dormant - while the backup tapes made previous to that poison injection receded into the past and got reused (I fought against that policy, but it was taken out of my hands. That decision got reversed pronto quick after this incident...) Then, one day, someone tried to use that record to activate a claim - at which point, the broken bits machine-gunned the entire claims_db into complete unreadability. Which, in turn, brought down the entire claims system. Reloading the pre-explosion (but still broken) claims_db didn't help: all the other data was now affected, and although that would all be reset to normal once I had a working claims_db, the knowledge gave me remarkably little comfort at the time.

It took me most of a week to hunt down the binary format for the Clipper-created DB; then, I opened the file in a binary editor and carefully fixed the record. Within 10 minutes, everything was up and running, and the VP of claims stopped meaningfully glancing at my neck and the spool of Ethernet cable in my office.


--
"Language shapes the way we think, and determines what we can think about."
-- B. L. Whorf

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://723974]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2024-03-28 23:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found