Bug in mysql-4.1 with having and ambiguous clause ?

Bug in mysql-4.1 with having and ambiguous clause ?

am 09.11.2002 19:36:18 von Jocelyn Fournier

Hi,

How-to-repeat :

mysql> SELECT a,b as a FROM (SELECT '1' as a,'2' as b) HAVING a=1;
ERROR 1052: Column: 'a' in having clause is ambiguous

this is ok.

However :

mysql> SELECT a,2 as a FROM (SELECT '1' as a) HAVING a=2;
+---+---+
| a | a |
+---+---+
| 1 | 2 |
+---+---+
1 row in set (0.00 sec)

mysql> SELECT a,2 as a FROM (SELECT '1' as a) HAVING a=1;
Empty set (0.00 sec)

I assume there should have a ambiguous clause too ?

Regards,
Jocelyn

------------------------------------------------------------ ---------
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 bugs-thread12924@lists.mysql.com
To unsubscribe, e-mail