Seriously, WTF?

Toby Corkindale tjc at
Tue May 6 03:14:44 BST 2008

MySQL lets you set DEFAULT values for everything *except* DATETIME.. WTF?
You *can* have TIMESTAMP default to something, however it seems to return
different formats of data depending on the versions of MySQL you're running,
thus confounding attempts to work on multiple versions (and breaking
DateTime::Format::MySQL too).
How do you guys deal with this? Am I missing something stupid?

MySQL's 'REPLACE INTO' command. What were they thinking?
I suppose it seemed like a good idea at the time, but try this at home kids:
create table A. Create table B which has a foreign key into table A, with 'on
delete cascade' set. Nowever do a REPLACE INTO table A for an existing row..
Note that table B has now deleted all related rows. Wonderful!

(I've been having to work with MySQL for over a year now and it STILL keeps
coming up with new ways to fall to pieces when I least expect it.. On the other
hand, I don't think Postgres (my preferred DB) would do the sort of replication
needed at this company. When oh when will they sort that out?)

More information about the mailing list