Recovering MySQL Data From the BLACKHOLE Storage Engine
I used to think it was impossible to recover data from the MySQL
BLACKHOLE storage engine. As stated in the manual:
The BLACKHOLE storage engine acts as a “black hole” that accepts data but throws it away and does not store it. Retrievals always return an empty result
I’ve always trusted the manual on this, but a recently published article about information and black holes proposes that the information may be recoverable. As stated in the abstract:
…probability conservation is guaranteed because black holes stimulate the emission of radiation in response to infalling matter. This stimulated radiation is non-thermal and contains all of the information about the infalling matter…
The nearest black hole is about 1600 light years away from earth, so I decided to apply this research closer to home by creating a new storage engine to capture the data that I insert into my
BLACKHOLE table using stimulated radiation. I should be ready to open source this project soon, but for now here’s a quick demonstration.
First, here’s the classical example of data loss with the
BLACKHOLE storage engine:
1 2 3 4 5 6 7 8 9
Now I will use my new storage engine (I named it “Adami” after the author of the research paper) to recover the data:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
I recovered the data! If you’ve ever lost important data in the
BLACKHOLE storage engine, this could be the solution you’ve been looking for.