MySQL, possible bug with NOW()

wxdqz

New Member
I use mySQL version 3.23.37 running on FreeBSD.

The problem is related to the NOW() function. I have the following table and data:

mysql> CREATE TABLE email (
id int(9) unsigned NOT NULL,
date_received timestamp(14),
date_answered timestamp(14)
);
mysql> INSERT INTO email VALUES( '1', '20011212010101', '00000000000000');


What I want to do is update the date_answered field to the current time. I do this:

mysql> UPDATE email
SET email.date_answered = NOW() + 0
WHERE email.id = 1;

The query runs without errors, but the table now looks like this:

SELECT * FROM email;

+----+----------------+----------------+
|id | date_received | date_answered |
+----+----------------+----------------+
|1 | 20010908130415 | 20010908130415 |
+----+----------------+----------------+

The original date_received has been overwritten with the value I JUST wanted to set date_answered to.

Any comments? Maybe someone could try and reproduce this error? I suspect this to be bug as I have no problems if I "manually" insert the date created with php or some such.

Thanx in advance,
Jens
 
Back
Top