DEV Community

Discussion on: What was the worst bug you've ever written?

Collapse
 
adammckerlie profile image
Adam McKerlie

Not technically a bug but I was once testing SQL injection on our dev site and dropped our database DROP DATABASE dev;. It worked, I patched the form and then started receiving emails saying the site was down.

I wasn't on dev, and our production database was called dev.

Collapse
 
theminshew profile image
Michael Minshew

Why on earth would anyone name their prod env dev..... ???!?!?!?

Collapse
 
adammckerlie profile image
Adam McKerlie

My guess is after initially developing the app, instead of wanting to change the variable name they just recreated the DB in prod.

Best part, dev was called dev_dev

Thread Thread
 
maccabee profile image
Maccabee

I feel like dev and prod DBs shouldn't even be on the same machine.

Thread Thread
 
adammckerlie profile image
Adam McKerlie

They weren't. I was sql injecting a PHP app and accidentally did it on prod instead of dev.

Collapse
 
blouzada profile image
Bruno Louzada

LOL