Bug #33505 AS-clause is incompatible with table-wildcards in SELECT
Submitted: 25 Dec 2007 9:40 Modified: 12 May 2008 17:06
Reporter: Alexander Nozdrin Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Parser Severity:S3 (Non-critical)
Version:5.1-bk/5.0bk OS:Any
Assigned to: Marc ALFF CPU Architecture:Any

[25 Dec 2007 9:40] Alexander Nozdrin
Description:
The following statement does not have meaning:

  SELECT table_name.* AS alias_name FROM table_name

However, it is accepted by the server.

How to repeat:
> CREATE TABLE t1(c1 INT, c2 INT, c3 INT);
> INSERT INTO t1 VALUES (1, 2, 3), (11, 12, 13);

> SELECT t1.* AS a FROM t1;
+------+------+------+
| c1   | c2   | c3   |
+------+------+------+
|    1 |    2 |    3 |
|   11 |   12 |   13 |
+------+------+------+
2 rows in set (0.00 sec)
[25 Dec 2007 13:04] Valeriy Kravchuk
Thank you for a bug report. Verified just as described.
[12 May 2008 17:06] Marc ALFF
This bug as already been fixed with Bug#27249, in 6.0.3