Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Re: PM Confessional

by Tux (Abbot)
on Jan 17, 2011 at 07:44 UTC ( #882620=note: print w/replies, xml ) Need Help??

in reply to PM Confessional

Does the SQL command "delete from huge_table; where key = 12;" count as well? I did that once :(

Enjoy, Have FUN! H.Merijn

Replies are listed 'Best First'.
Re^2: PM Confessional
by ambrus (Abbot) on Jan 18, 2011 at 18:08 UTC

    I know it's stupid, but I often have the urge to delete editor backup files. I don't dare to type rm *~ though, for fear of accidentally pressing enter too early, so I have an alias rmt which does that.

Re^2: PM Confessional
by Jenda (Abbot) on Jan 19, 2011 at 17:48 UTC

    That's why I (prettymuch always) stick the handwritten updates and deletes between BEGIN TRANSACTION and ROLLBACK and if and only if I get a sane "N rows affected" message do I select and run just the statement.

    Saved my butt a few times.

    Enoch was right!
    Enjoy the last years of Rome.

      Sane way of operating. It will also protect you fro the less obvious mistake of writing

      delete from table where key > 0;

      instead of

      delete from table where key < 0;

      which is only one key apart. I know someone else who did that.

      This thread is not about errors someone else made, but I will still tell one from the recent past:

      After months of preparing and exercising all the needed commands for the move of one production platform to a newer platform of a more modern architecture, someone (not in our company) issued the main "rsync" command (which also had a --delete) THE WRONG WAY AROUND and deleting two days of work. The restore from backup took 6 hours and regained 1 day of work.

      Enjoy, Have FUN! H.Merijn
Re^2: PM Confessional
by gnusosa (Initiate) on Jan 28, 2011 at 20:25 UTC
    Oh Man, That is the worst. I did the same, but with a worst SQL command, something like these: delete from unindexed_table order by id where key = AF0425; Worst experience of my newb times, but that led me to the discovery of MySQL logs. The Good ol' days.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://882620]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (6)
As of 2018-04-23 20:31 GMT
Find Nodes?
    Voting Booth?