List:General Discussion« Previous MessageNext Message »
From:Harry Brueckner Date:September 5 1999 7:06pm
Subject:Re: INSERT NOW() bug?
View as plain text  
Hello,

I tried this on my Linux 2.0.36 libc5 machine with MySQL 3.22.25 which was
compiled with gcc 2.7.2.1.
The problem did not occur for me there. I did the steps which Stan provided
but the date/time which was inserted was correct.

Harry

--On 03.09.99 10:43 +0200 Stan van de Burgt <stan@stripped> wrote:
>> Description:
>	 When inserting NOW() in a DATETIME field is seems to insert
>	 the first character of the time wrong.
>> How-To-Repeat:
> 
> mysql> create table t1 (d datetime );
> Query OK, 0 rows affected (0.15 sec)
> 
> mysql> insert into t1 values (now());
> Query OK, 1 row affected (0.01 sec)
> 
> mysql> select * from t1;
> +---------------------+
> | d                   |
> +---------------------+
> | 1999-09-03 50:31:75 |
> +---------------------+
> 1 row in set (0.00 sec)
> 
> mysql> select now();
> +---------------------+
> | now()               |
> +---------------------+
> | 1999-09-03 10:34:47 |
> +---------------------+
> 1 row in set (0.00 sec)
> 
> mysql>
> 
>> Fix:
>	 
> 
>> Submitter-Id:	SPV
>> Originator:	Stan van de Burgt
>> Organization:
>  Q-go
>> MySQL support: none
>> Synopsis:	inserting NOW() in a DATETIME field leaves stange chars 
>> Severity:	non-critical
>> Priority:	low
>> Category:	mysql
>> Class:		sw-bug
>> Release:	mysql-3.22.25 (Source distribution)
>> Server: /usr/local/bin/mysqladmin  Ver 7.11 Distrib 3.22.25, for
>> unknown-linux-gnu on mipsel
> TCX Datakonsult AB, by Monty
> 
> Server version		3.22.25
> Protocol version	10
> Connection		Localhost via UNIX socket
> UNIX socket		/tmp/mysql.sock
> Uptime:			1 day 16 hours 40 min 34 sec
> 
> Threads: 1  Questions: 706  Slow queries: 0  Opens: 42  Flush tables: 1
> Open tables: 13
>> Environment:
>	 
> System: Linux ideabox.q-go.com 2.0.33 #1 Fri Apr 3 04:21:29 PST 1998 mips
> unknown Architecture: mips
> 
> Some paths:  /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc
> /usr/bin/cc GCC: Reading specs from
> /usr/lib/gcc-lib/mipsel-linux/2.7.2/specs gcc version 2.7.2
> Compilation info: CC='gcc'  CFLAGS=''  CXX='c++'  CXXFLAGS=''  LDFLAGS=''
> Configure command: ./configure  --with-mit-threads
> Perl: This is perl, version 5.003 with EMBED
> 

 ===================================================================
  PGP fingerprint: B9 EE 83 0C 1F 48 54 50  9F A7 7A 00 6C 94 36 02
  PGP public key available by fingering harry@stripped

Thread
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