From: Lionel B. <lio...@bo...> - 2005-06-01 18:00:05
|
Michel Bouissou wrote: >Le Mercredi 01 Juin 2005 18:17, Lionel Bouton a =E9crit : > =20 > >>I checked the code and didn't spot any obvious mistake (no UPDATE >>involves first_seen). >> =20 >> > >Possibly an unwanted consequence of this column definition that may beha= ve=20 >differently in MySQL compared to PostgreSQL ? > >mysql> desc from_awl; >+---------------+--------------+------+-----+---------------------+-----= --+ >| Field | Type | Null | Key | Default | Extr= a | >+---------------+--------------+------+-----+---------------------+-----= --+ >| sender_name | varchar(64) | | PRI | | = | >| sender_domain | varchar(255) | | PRI | | = | >| src | varchar(39) | | PRI | | = | >| first_seen | timestamp | YES | | CURRENT_TIMESTAMP | = | >| last_seen | timestamp | YES | MUL | 0000-00-00 00:00:00 | = | >+---------------+--------------+------+-----+---------------------+-----= --+ > >Do you think this may cause first_seen to be automagically set to=20 >CURRENT_TIMESTAMP each time a record is updated without specifying anyth= ing=20 >about first_seen ? > =20 > Huh-hoh... In fact the conversion bug is in 1.5.6, not 1.5.5 (too much time since I did a release apparently). But I can't explain how "current_timestamp" got there. Especially since the "create_from_awl" method uses the very same declarations for first_seen and last_seen (and from the CVS, it always did). The fact that Null is "YES" for these 2 tables is suspicious too : both column are created "NOT NULL" in SQLgrey ! I'll run some tests on MySQL later. Lionel. |