>Description:
You expect a little goophiness when you set up a column named timestamp.
This odd behaviour I consider a bug.
>How-To-Repeat:
show fields from minutely_inbound_handovers;
+-------------------------+----------------------+------+-----+---------------------+----------------+
| Field | Type | Null | Key | Default |
|Extra |
+-------------------------+----------------------+------+-----+---------------------+----------------+
| id | bigint(20) unsigned | | PRI | NULL |
|auto_increment |
| cell | smallint(5) unsigned | | | 0 |
| |
| timestamp | datetime | | MUL | 0000-00-00 00:00:00 |
| |
| attempted | smallint(5) unsigned | | | 0 |
| |
+-------------------------+----------------------+------+-----+---------------------+----------------+
15 rows in set (0.00 sec)
select max(timestamp) from minutely_inbound_handovers;
+----------------+
| max(timestamp) |
+----------------+
| NULL |
+----------------+
1 row in set (0.00 sec)
select timestamp from minutely_inbound_handovers where timestamp is null;
Empty set (2.74 sec)
select max(timestamp) from minutely_inbound_handovers where timestamp is not null;
+---------------------+
| max(timestamp) |
+---------------------+
| 2002-07-25 14:00:00 |
+---------------------+
1 row in set (3.73 sec)
>Fix:
>Submitter-Id: ??
>Originator: Jettero Heller
>Organization:
>MySQL support: none
>Synopsis: max() null bug with funny column name
>Severity: non-critical
>Priority: low
>Category: mysql
>Class: sw-bug
>Release: mysql-4.0.1-alpha (Official MySQL RPM)
>Server: /usr/bin/mysqladmin Ver 8.23 Distrib 4.0.1-alpha, for pc-linux-gnu on i686
Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license
Server version 4.0.1-alpha
Protocol version 10
Connection Localhost via UNIX socket
UNIX socket /var/lib/mysql/mysql.sock
Uptime: 55 min 52 sec
Threads: 1 Questions: 604 Slow queries: 10 Opens: 23 Flush tables: 1 Open tables:
11 Queries per second avg: 0.180
>Environment:
System: Linux mercury.msgexp.net 2.4.18 #1 Wed Jun 19 13:34:15 EDT 2002 i686 unknown
Architecture: i686
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/i386-redhat-linux/2.96/specs
gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-98)
Compilation info: CC='gcc' CFLAGS='-O6 -fno-omit-frame-pointer -mpentium' CXX='gcc'
CXXFLAGS='-O6 -fno-omit-frame-pointer -felide-constructors
-fno-exceptions -fno-rtti -mpentium' LDFLAGS=''
LIBC:
lrwxrwxrwx 1 root root 13 Jun 19 11:14 /lib/libc.so.6 -> libc-2.2.5.so
-rwxr-xr-x 1 root root 1343176 Apr 15 10:02 /lib/libc-2.2.5.so
-rw-r--r-- 1 root root 2310808 Apr 15 10:02 /usr/lib/libc.a
-rw-r--r-- 1 root root 178 Apr 15 09:55 /usr/lib/libc.so
Configure command: ./configure --disable-shared --with-mysqld-ldflags=-all-static
--with-client-ldflags=-all-static --without-berkeley-db --with-innodb
--enable-assembler --with-mysqld-user=mysql
--with-unix-socket-path=/var/lib/mysql/mysql.sock --prefix=/
--with-extra-charsets=complex --exec-prefix=/usr --libexecdir=/usr/sbin
--sysconfdir=/etc --datadir=/usr/share --localstatedir=/var/lib/mysql
--infodir=/usr/info --includedir=/usr/include --mandir=/usr/man --with-embedded-server
--enable-thread-safe-client '--with-comment=Official MySQL RPM'
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php