Jump to content

ROLLBACK Question


jbruns

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!

Link to comment
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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.