2 messages in com.mysql.lists.bugsRe: Bug in UNION statement with alias...
FromSent OnAttachments
Giuseppe Maxia10 Sep 2003 15:16 
Indrek Siitan11 Sep 2003 07:35 
Subject:Re: Bug in UNION statement with alias '*'
From:Indrek Siitan (tf@mysql.com)
Date:09/11/2003 07:35:33 AM
List:com.mysql.lists.bugs

Hi,

Description:

When issuing a UNION query with a column having an alias starting with a '*' (star/asterisk) character, the database returns an error: ERROR 1051: Unknown table ''

How-To-Repeat:

select version() as `*` UNION select user() as `anything`; Notice that the '*' is properly quoted with inverse quotes. The simple statement SELECT version() AS `*`; works fine. The error only shows up with UNION.

Thanks for a fine bug report. This has been filed as bug #1249. You can follow its progress at: http://bugs.mysql.com/bug.php?id=1249

Rgds, Indrek