>Description:
I just created a simple table and ran a select query which gave a
wrong result.
>How-To-Repeat:
create table test(
Zeit time,
Tag tinyint not null,
Monat tinyint not null,
Jahr smallint not null,
index(Tag),
index(Monat),
index(Jahr)
);
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...
>Fix:
don't know :-(
>Submitter-Id: <submitter ID>
>Originator: Oliver Billmann
>Organization:
>MySQL support: none
>Synopsis:
>Severity: serious
>Priority: medium
>Category: mysql
>Class: sw-bug
>Release: mysql-3.22.21 (Source distribution)
>Environment:
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/2.7.2.1/specs
gcc version 2.7.2.1
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