>Description:
HAVING in SELECT is evaluated before WHERE. This is not the
correct behaviour as HAVING should deal with the remainder of the WHERE
selection (according to manual)
>How-To-Repeat:
mysql: create table tt (f1 int, f2 int);
Query OK, 0 rows affected (0.01 sec)
mysql: insert into tt values(1,1);
Query OK, 1 row affected (0.01 sec)
mysql: insert into tt values(1,2);
Query OK, 1 row affected (0.00 sec)
mysql: insert into tt values(2,3);
Query OK, 1 row affected (0.00 sec)
mysql: select * from tt where f1=1 having f2=max(f2);
Empty set (0.00 sec)
>Fix:
>Submitter-Id: <submitter ID>
>Originator:
>Organization:
>MySQL support: none
>Synopsis: HAVINg behaviour
>Severity: serious
>Priority: medium
>Category: mysql
>Class: sw-bug
>Release: mysql-3.23.46 (Source distribution)
>Environment:
System: Linux home 2.4.19 #2 Fri Oct 18 08:47:02 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-slackware-linux/2.95.3/specs
gcc version 2.95.3 20010315 (release)
Compilation info: CC='gcc' CFLAGS='' CXX='c++' CXXFLAGS='' LDFLAGS=''
LIBC:
lrwxrwxrwx 1 root root 13 Dec 28 2001 /lib/libc.so.6 -> libc-2.2.3.so
-rwxr-xr-x 1 root root 4783716 May 25 2001 /lib/libc-2.2.3.so
-rw-r--r-- 1 root root 24721042 May 25 2001 /usr/lib/libc.a
-rw-r--r-- 1 root root 178 May 25 2001 /usr/lib/libc.so
Configure command: ./configure --prefix=/usr/local/mysql --without-debug
--without-bench --enable-assembler --with-mysqld-flags=-all-static
---------------------------------------------------------------------
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