News for hackers. Stuff that matters.
Re:Summary of the Amazon S3 Service Disruption by duskwuff on Thursday March 02, 2017 @01:37PM (#13776839)
FWIW: Setting "safe-updates=1" in ~/.my.cnf will require UPDATE and DELETE statements in the client to have a WHERE clause which references a key. It's not perfect protection, but it will save you from a lot of mistakes.
Re:Summary of the Amazon S3 Service Disruption by amichal on Thursday March 02, 2017 @04:14PM (#13778281)
That's awesome,

My worst DELETE fail however was:

  DELETE * FROM table WHERE [long condition that resolves to true for all records]
Now i write SELECT or SELECT COUNT(*) over and over again until i see the data i expect and then change it to a DELETE/UPDATE.

It's not my personal habit but some folks I know turn off auto commit and BEGIN a transaction every time they enter an interactive SQL sessions. They then default to ROLLBACK at least once before COMMITing them.

That and having a user with read-only permissions or a read replica

Re:Summary of the Amazon S3 Service Disruption by tacon on Thursday March 02, 2017 @04:31PM (#13778432)
Is there a collection of data safety tips like this somewhere? I never knew this existed. What else am I missing?
Re:Summary of the Amazon S3 Service Disruption by gigatexal on Thursday March 02, 2017 @01:39PM (#13776854)
hmm, that's kinda cool. I'm in a MS shop and I don't know if SMSS has the same feature. My manager just looked at me and said "welp, go restore the table and be more careful next time." I was a new DBA at the time, still, kinda new.
Re:Summary of the Amazon S3 Service Disruption by jsudhams on Thursday March 02, 2017 @10:26PM (#13780523)
USE BEGIN TRANS as mentioned above