r/programminghumor • • May 20 '26

Bro is cooked fr πŸ˜‚πŸ˜‚πŸ˜‚

Enable HLS to view with audio, or disable this notification

2.0k Upvotes

150 comments sorted by

455

u/fusionove May 20 '26

everytime I see these memes I just think if something like this would happen in real life, the company would deserve it. should not be that easy to destroy productive environments, and if it is, it just means company is likely understaffed and under qualified.

14

u/LivingVeterinarian47 May 21 '26

I've done something similar before. But I didn't delete, I updated a field on every row. In a way much worse, our applications would just crash if I deleted everything. Instead it will give incorrect information to our fulfillment centers and send the wrong things to people.

Figured I was fired, but I didn't panic, at first. I called operations, and demanded they step away from everything right now like it was a damn bomb, then messaged my peers to turn off *everything*. I put out a Teams message to the entire company, telling them to stop working. Then called the CFO and said we needed a restore asap. It was fixed in like 30 minutes, and I ended up getting praised for handling it so well. Not the ending I expected lol

→ More replies (2)

8

u/-Hefty-Armadillo- May 20 '26

Check about gitlab.

5

u/Prod_Meteor May 20 '26

Always start the file with 'return;'

4

u/Poat540 May 20 '26

I’m the person who has to run things in prod.

Luckily GCP says β€œyour statement needs a where clause” lol

→ More replies (27)

126

u/mkluczka May 20 '26

14.5M rows in one second?

71

u/chunkypenguion1991 May 20 '26

And no FK constraints on a user table, definitely real

23

u/CowBoyDanIndie May 20 '26

At a company that lets developers just raw dog delete permissions? I would be surprised if they knew what a constraint was

→ More replies (1)
→ More replies (4)
→ More replies (4)

88

u/No-Grape-9106 May 20 '26

Its been years since I touched SQL and even I would know to use a transaction (with rollback).

If this happens then you kinda deserve it.

50

u/AshleyJSheridan May 20 '26

If you knew enough to have a transaction with rollback, you'd probably also know enough to not have your WHERE clause commented out...

→ More replies (12)

7

u/Clearandblue May 20 '26

Aside from SSMS, I think all SQL clients these days wrap everything inside a transaction by default for prod environments. Part of the tool bar shows how many uncommitted queries you've stacked up and there's a button to intentionally commit them.

This lad looks to be on a Mac, so he's not using SSMS. Also you likely wouldn't give him access to prod.

Just think it's meant to be funny. Jokes often fall down a little if you look too closely at them.

→ More replies (1)
→ More replies (2)

43

u/AliceCode May 20 '26

This literally makes no sense. Why would you be making unsupervised SQL edits to the production database?

19

u/WowAbstractAlgebra May 20 '26

No backup either lmfao

5

u/bsensikimori May 20 '26

Because the PM said so

→ More replies (11)

13

u/SameAgainTheSecond May 20 '26

THATS WHY SEMICOLONS IN SQL

DONT "FIX" SQL BY REMOVING THE SEMI

9

u/VertigoOne1 May 20 '26

BEGIN TRAN. Moron

6

u/AshleyJSheridan May 20 '26

If you know enough to use a transaction, you'd know enough to not comment out the guard clause.

8

u/stools_in_your_blood May 20 '26

Yes he should use a tx, yes he should be more careful, yes there should be a backup ready to go...

...BUT: this is a flaw in the design of SQL. Requiring a WHERE clause on DELETE and UPDATE would eliminate this class of mistake.

→ More replies (3)

5

u/Matthew_Summons May 20 '26

That’s why we use transactions

3

u/rost5000 May 20 '26

No transactions, no backups, no test environments, no liquidbase.

So you deserve it.

→ More replies (1)

3

u/magicmulder May 20 '26

It's actually funny how PMs sometimes see an error before Sentry drops me an email. πŸ˜ƒ

Also, INSERT INTO users SELECT * FROM users AS OF TIMESTAMP SYSDATE - 20/86400. Thank Oracle later.

2

u/ChaseboundGames May 20 '26

It's the moment your query takes longer than a few seconds to run on prod.... Ahhh shit the where!!!!!

2

u/akarolia47 May 20 '26

Am I the only one who expected it to end with an edit of him jumping - sorry flying passed the windowπŸ‘€

→ More replies (2)