List:General Discussion« Previous MessageNext Message »
From:Oliver Billmann Date:April 26 1999 5:52pm
Subject:Strange problem (bug?) with CONCAT / UNIX_TIMESTAMP
View as plain text  
	I just created a simple table and ran a select query which gave a
	wrong result.

	create table test(
	  Zeit time,
	  Tag tinyint not null,
	  Monat tinyint not null,
	  Jahr smallint not null,
	insert into test values ("09:26:00",16,9,1998);
	insert into test values ("09:26:00",16,9,1998);

	SELECT CONCAT(Jahr,'-',Monat,'-',Tag,' ',Zeit) AS Date,
	       UNIX_TIMESTAMP(CONCAT(Jahr,'-',Monat,'-',Tag,' ',Zeit)) AS Unix
	FROM test;
	| Date               | Unix      |
	| 1998-9-16 09:26:00 |         0 |
	| 1998-9-16 09:26:00 | 905930760 |
	2 rows in set (0.00 sec)

	The column Unix should have the same result in both rows, because of
	the same date...

	don't know :-(

>Submitter-Id:	<submitter ID>
>Originator:	Oliver Billmann
>MySQL support: none
>Severity:	serious
>Priority:	medium
>Category:	mysql
>Class:		sw-bug
>Release:	mysql-3.22.21 (Source distribution)

System: Linux idefix 2.0.35 #4 Fri Oct 23 19:08:19 MEST 1998 i586 unknown
Architecture: i586

Some paths:  /usr/local/bin/perl /usr/local/bin/make /usr/bin/gcc /usr/bin/cc
GCC: Reading specs from /usr/lib/gcc-lib/i486-linux/
gcc version
Compilation info: CC='gcc'  CFLAGS=''  CXX='c++'  CXXFLAGS=''  LDFLAGS=''
Configure command: ./configure  --without-bench
Perl: This is perl, version 5.004_04 built for i586-linux
Strange problem (bug?) with CONCAT / UNIX_TIMESTAMPOliver Billmann26 Apr
  • Strange problem (bug?) with CONCAT / UNIX_TIMESTAMPMichael Widenius27 Apr