Jump to content

Archived

This topic is now archived and is closed to further replies.

jbruns

ROLLBACK Question

Recommended Posts

Hi there-

I accidently executed a mysql command \"DELETE FROM `responses` WHERE `obj_id` > 123. What I really meant to say was delete the row where obj_id = 123. Needless to say I delete ALL my data.

 

Fortunately I backup all my tables every night, however, this won\'t reflect anything that was input after 3am. I\'ve logged in as root and am looking at my tables under /var/lib/mysql/ and it considering the size of the file, I think the data is still there, although I can\'t access it.

 

I have 3 files:

res.frm --> 16396

res.MYD --> 544360

res.MYI --> 1389568

 

Judging by the size, I assume the data is still intact, however it\'s just a matter of retrieving it. I issued a ROLLBACK command, immediately after I made the deadly delete mistake, and it said it was executed successfully, however, it still reads as have 0 rows. Any suggestions?? Thanks!

Share this post


Link to post
Share on other sites

What MYSQL Says :?:

 

By default, MySQL runs in autocommit mode. This means that as soon as you execute an update, MySQL will store the update on disk.

 

If you are using transactions safe tables (like InnoDB, BDB, you can put MySQL into non-autocommit mode with the following command:

 

 

SET AUTOCOMMIT=0

 

So your Roll back will not be useful because you havent executed them as a transaction. If you have backed up tables try restoring them

Share this post


Link to post
Share on other sites

Yeah, that\'s what I figured, I just thought due to the size of the files, maybe there was some way to do it through a back door.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.