Posts Tagged funny

mysql –i-am-a-dummy

Posted by on Thursday, 9 April, 2009

I thought it was a joke when I first heard about it, but the MySQL command line client has this option where you can actually tell it you’re stupid:

 mysql --i-am-a-dummy -uroot test

Otherwise known as --safe-updates , this option prevents MySQL from performing update operations unless a key constraint in the WHERE clause and / or a LIMIT clause are provided, e.g.:

mysql> DELETE FROM bigtable;
ERROR 1175: You are using safe update mode and you
tried to update a table without a WHERE that uses a 
KEY column

This would wipe out bigtable – unless bigtable is an InnoDB table and the command is wrapped in a transaction. (If you don’t use transactions, you should have a lot more to worry about anyway).


Note that the --safe-updates / --i-am-a-dummy option causes the following statement to be issued on connection:

From the man page
–safe-updates, –i-am-a-dummy, -U
Allow only those UPDATE and DELETE statements that specify which rows to modify by using key values. If you have set this option in an option file, you can override it by using –safe-updates on the command line. See the section called MYSQL TIPS, for more information about this option.

Funny quotes

Posted by on Tuesday, 7 April, 2009

Funny Quotes

Funny Unix csh/sh commands:
% cat "food in cans"
cat: can't open food in cans
% nice man woman
No manual entry for woman.
% rm God
rm: God nonexistent
% ar t God
ar: God does not exist
% ar r God
ar: creating God
% "How would you rate Quayle's incompetence?
Unmatched ".
% [Where is Jimmy Hoffa?
Missing ].
% ^How did the sex change operation go?
^ Modifier failed.
% If I had a ( for every $ the Congress spent, what would I have?
Too many ('s.
% make love
Make: Don't know how to make love. Stop.
% sleep with me
bad character
% got a light?
No match.
% man: why did you get a divorce?
man:: Too many arguments.
% !:say, what is saccharine?
Bad substitute.
% %blow
%blow: No such job.
/* not csh but sh */
$ PATH=pretending!/usr/ucb/which sense
no sense in pretending!
$ drink bottle: cannot open
opener: not found
(thanks volker - i got these off your site)

Last-Modified: 2007-03-07 19:38:50