From: Lionel B. <lio...@bo...> - 2005-06-02 08:28:22
|
Who Knows wrote: > Lionel Bouton wrote: > >> MySQL may change its behaviour from versions to versions, anyway, it >> doesn't seem to like 'NOT NULL' for timestamps... : >> >> Here's from_awl freshly created with SQLgrey 1.5.7 : >> >> +---------------+---------------+------+-----+----------------+-------+ >> | Field | Type | Null | Key | Default | Extra | >> +---------------+---------------+------+-----+----------------+-------+ >> | sender_name | varchar(64) | | PRI | | | >> | sender_domain | varchar(255) | | PRI | | | >> | src | varchar(39) | | PRI | | | >> | first_seen | timestamp(14) | YES | | NULL | | >> | last_seen | timestamp(14) | YES | MUL | 00000000000000 | | >> +---------------+---------------+------+-----+----------------+-------+ >> >> > As I understand MySQL behavior the first field of type 'timestamp' is > automatically updated updated to reflect the time of the last update > to any field in the record. MySQL really doesn't want to behave :-( If there isn't a workaround to disable this behaviour, then switching first_seen and last_seen would be a quick fix. I'll have to be sure about this though. Michel, what is the exact MySQL version you are currently running ? I'll emerge the most close from Portage and do some tests with it. Lionel |