EmergencyEMERGENCY? Get 24/7 Help Now!

Friday challenge: ibd recovery

 | May 15, 2009 |  Posted In: Insight for DBAs


I want to make this Friday a bit more interesting – how do you feel to train a bit in InnoDB data recovery techniques.
I have .ibd datafile which was created by query
CREATE TABLE `tryme` ( `email` mediumblob, `content` mediumblob ) ENGINE=InnoDB … (SOME PARAMETERS SKIPPED) …;

and I inserted one record into this table with email address and English sentence into field (content). Some transformation where applied to both fields so just HEX viewer may not help you there.
Size of meaningful de-transformed content is
length( … (content) … ) = 15.

Can you recovery both email and content fields ? To add some competition I want to give a prize for winner, first who sends content (meaningful English sentence) to given email – will receive our book “High Performance MySQL” 2nd edition, or if he has already this book or just hate it by some reason – I can propose Amazon 25$ Gift Card as replacement.

File tryme.ibd you can download here http://percona.com/blog/files/contest/tryme.ibd. Size 65536 bytes. md5sum a53d3ee3f3a33854f21b5f550ae53e18.

Vadim Tkachenko

Vadim Tkachenko co-founded Percona in 2006 and serves as its Chief Technology Officer. Vadim leads Percona Labs, which focuses on technology research and performance evaluations of Percona’s and third-party products. Percona Labs designs no-gimmick tests of hardware, filesystems, storage engines, and databases that surpass the standard performance and functionality scenario benchmarks. Vadim’s expertise in LAMP performance and multi-threaded programming help optimize MySQL and InnoDB internals to take full advantage of modern hardware. Oracle Corporation and its predecessors have incorporated Vadim’s source code patches into the mainstream MySQL and InnoDB products. He also co-authored the book High Performance MySQL: Optimization, Backups, and Replication 3rd Edition.


  • Success!

    Well, I finally figured out what the tricksy obfusication. Thankfully I don’t think any real databases would apply transformations like that without them being known when you’re trying to recover data.

    I’m curious if this scenario is based on an actual client experience.

    Thanks to Vadim for putting this together and offering the incentive. I knew *about* innodb recovery techiniqes before, but thankfully have never had to use them. This was an excellent practice exercise, and I highly recommend everyone try to solve it since it will require you to learn a few tricks and skills that will really come in handy if you ever *have* to do it. I thought I knew innodb pretty well before, but I found that there is always much more to learn.

  • Gavin,

    Congratulation! 🙂

    The scenario if fully valid (if exclude transformation, that does not happen so often). May be not all steps you made, but that or another part is used for for real data recovery.

Leave a Reply