Who, Me? Alas, the weekend is over, but The Register tries to make your entry to the working week a little more enjoyable by bringing you a fresh installment of Who, Me? – the column in which you explain your worst slip-ups.
This week, we have two readers for you to meet!
The first asked to be Regomized as “Reggie” because he thought that would be quite funny. We’ve indulged him.
“I was just a year out of college and in my first job, working on accounting systems for the phone company,” Reggie told Who, Me?
One day, Reggie’s boss assigned him to another team that needed someone to zero out a database field in a sub-record used to store important information about employees’ insurance.
It was a simple job that Reggie thought might take a day, so he whipped up a script, tested it against a copy of the production data, then showed it to senior folks who said the results looked fine.
Having passed that test, Reggie watched as his code ran on production systems.
“Quicker than you can say ‘WTF?!?’ my phone started ringing,” he told Who, Me? “I had accidentally erased about 1,500 employees’ private insurance records. It turned out the sub-record was actually a multi-type, and I was only supposed to update that field if it was the right type.”
Reggie protested his innocence because nobody had explained that to him. His boss backed him up, and even excused him from cleaning up the mess.
“That was a relief,” he told Who, Me? “Great learning experience, though.”
Our second story today comes from a reader we’ll call “Sam” who watched a colleague remove test records from a very large database.
“All of the records were flagged with a test number – 1 – in an unused field,” he explained.
Removing the records therefore looked easy. Mike suggested the following syntax:
DELETE FROM bigtable WHERE secretfield = 1;
Mike’s mate expected the job to run for a second. As the clock kept running, he started to worry.
“Surprise turned to horror when he saw secretfield -1
and noticed everything except his test records was gone,” Mike told Who, Me?
Thankfully, this outfit had proper backups and could rebuild the small number of lost records from web server logs.
“My friend carried the nickname ‘minus’ for years afterwards,” Mike told Who, Me?
What did you delete by mistake, and how did you recover it – and your reputation? Don’t delete your shameful story, click here to send this column an email so we can share it on a future Monday, with the same anonymity and good humor we always employ. ®