MySQL Lists are EOL. Please join:

List:General Discussion« Previous MessageNext Message »
From:Michael Widenius Date:September 3 1999 10:17am
Subject:INSERT NOW() bug?
View as plain text  
>>>>> "Stan" == Stan van de Burgt <stan@stripped> writes:

>> Description:
Stan> 	When inserting NOW() in a DATETIME field is seems to insert
Stan> 	the first character of the time wrong.
>> How-To-Repeat:

mysql> create table t1 (d datetime );
Stan> Query OK, 0 rows affected (0.15 sec)

mysql> insert into t1 values (now());
Stan> Query OK, 1 row affected (0.01 sec)

mysql> select * from t1;
Stan> +---------------------+
Stan> | d                   |
Stan> +---------------------+
Stan> | 1999-09-03 50:31:75 |
Stan> +---------------------+
Stan> 1 row in set (0.00 sec)

mysql> select now();
Stan> +---------------------+
Stan> | now()               |
Stan> +---------------------+
Stan> | 1999-09-03 10:34:47 |
Stan> +---------------------+
Stan> 1 row in set (0.00 sec)



I can't reproduce this with MySQL 3.23.3 or 3.22.26
(Sorry, but that are my versions :( )

I will be away for the weekend, so I would appreciate if you could try 
to debug this with gdb?  This could be a gcc bug !

put a breakpoint in file sql/ at

void Field_datetime::store



and check what happens.

You can of course also try gcc 2.95 and check if this helps.


INSERT NOW() bug?Stan van de Burgt3 Sep
  • Re: INSERT NOW() bug?Stan P. van de Burgt3 Sep
  • INSERT NOW() bug?Michael Widenius3 Sep
  • Re: INSERT NOW() bug?Harry Brueckner5 Sep
Re: INSERT NOW() bug?Stan P. van de Burgt3 Sep
  • Re: INSERT NOW() bug?Michael Widenius7 Sep