MySQL and truncate
I just ran truncate statement on a table and committed. What options do I have to restore the table to the state pre truncate?
Edit: I did this in my dev setup, hence nothing to 开发者_如何学编程worry for me, I was just curious to know do I have any options.
You are probably out of luck, sir. If you cannot restore from backup / replay logs (because you don't have them), then your next option is forensic recovery. That's beyond trying to explain. To succeed at that, you need to take the machine offline before anything else is written. Copy the whole disk if its MyISAM tables, or just the InnoDB files if it's InnoDB. Find an expert who can read the file internals and maybe you'll get it back.
精彩评论