i-am-a-dummy
By Deane Barker | October 20, 2006 | 1 Comment
Here’s a command line switch for MySQL that’s both funny and pretty handy:
--i-am-a-dummy Synonym for option --safe-updates, -U.
Yes, there is a MySQL switch called “i-am-a-dummy”. It’s an alias of another switch, which provides more information:
--safe-updates Only allow UPDATE and DELETE that uses keys.
Now, that’s handy. This means you couldn’t accidentally wipe out your table because the system won’t process DELETEs or UPDATEs that don’t specify primary key values. Smart. It strikes me that the alias should be “i-am-not-a-dummy.”
Comments
-
Yes, the alias sounds silly, but that’s what catches the eye. Let’s say our SQL novice takes a look at mysql –help. What is the first thing that catches the eye? That silly option name. Now the user thinks “Oh wow! If they gave such a cute name to an option it might try it.”
And he starts using it so helpful error messages will prevent him from ever actually peeing on the electic fence. We all made that mistake once, right?
I mean, the SQL one.