[TriLUG] MySQL needs an "undo" button

TD via TriLUG trilug at trilug.org
Thu Dec 3 23:54:49 EST 2015


Yes, if only one could 'roll back' an action... Maybe even scope certain actions that belong together, all in the some grouped context. One could argue that this thing transcends a single action, we could call it a /trans/-action...

;)

Remember kids, always start with a BEGIN TRANSACTION and leave the COMMIT out. When you've all is good and worked as expected, then manually do the commit...

I'll stop being smug now... 

-----Original Message-----
From: "Wes Garrison via TriLUG" <trilug at trilug.org>
Sent: ‎12/‎3/‎2015 23:38
To: "Triangle Linux Users Group General Discussion" <trilug at trilug.org>
Subject: [TriLUG] MySQL needs an "undo" button

Oops:
update optionGroups set name="new name" *where id-30156;*
Query OK, 28829 rows affected (0.19 sec)
Rows matched: 28829  Changed: 28829  Warnings: 0

That should have said *where id=30156*;

Guess what the highest id was?

Yep, 30156.

Always backup first!

-Wes
_________________________________
Wesley S. Garrison
Network Engineer
Xitech Communications, Inc.
phone:  (919) 260-0803
pager:   (919) 869-1744
fax:       (919) 932-5051
__________________________________
"Lead us not into temptation, but deliver us from email."
-- 
This message was sent to: delrue.thomas at gmail.com <delrue.thomas at gmail.com>
To unsubscribe, send a blank message to trilug-leave at trilug.org from that address.
TriLUG mailing list : http://www.trilug.org/mailman/listinfo/trilug
Unsubscribe or edit options on the web	: http://www.trilug.org/mailman/options/trilug/delrue.thomas%40gmail.com
Welcome to TriLUG: http://trilug.org/welcome


More information about the TriLUG mailing list