I often joke that if I was stuck on a desert island, the book I’d want to have along is the MySQL Reference Manual. There’s an endless source of amusement within the 4400+ pages. I recently found myself stuck in the West Virginia mountains with no quick source of internet, and discovered several bits of new trivia.

Here’s just one item:

Adding the –i-am-a-dummy flag to your mysql client (or within a configuration file, of course) keeps you from making updates or deletes on a whole table without a “where” clause. Yes, that’s such a common new DBA mistake, they created a configuration variable for it.

[root@encr_percona ~]# mysql –i-am-a-dummy
mysql> update t3 set charcol1=‘asdf’;
ERROR 1175 (HY000): You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column
mysql> delete from t3;
ERROR 1175 (HY000): You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column

It also limits select results to 1000.

Good one.

(The album I’d want on a desert island is the Foo Fighters’ Colour and the Shape.)