Bug #56480 | View is not properly prepared: Unknown column '*' in 'field list' | ||
---|---|---|---|
Submitted: | 2 Sep 2010 6:55 | Modified: | 10 Mar 2015 15:45 |
Reporter: | Tor Didriksen | Email Updates: | |
Status: | Can't repeat | Impact on me: | |
Category: | MySQL Server: Optimizer | Severity: | S3 (Non-critical) |
Version: | 5.0.91, 5.1.50, 5.1-bugteam, next-mr-bugfixing | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[2 Sep 2010 6:55]
Tor Didriksen
[2 Sep 2010 7:41]
Valeriy Kravchuk
Verified also with 5.1.50: C:\Program Files\MySQL\MySQL Server 5.1\bin>mysql -uroot -proot -P3310 test Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 3 Server version: 5.1.50-community MySQL Community Server (GPL) Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. This software comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to modify and redistribute it under the GPL v2 license Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> CREATE TABLE t1 (a VARCHAR(10), FULLTEXT KEY a (a)) engine=MyISAM; Query OK, 0 rows affected (0.13 sec) mysql> INSERT INTO t1 VALUES (1); Query OK, 1 row affected (0.00 sec) mysql> CREATE TABLE t2 (b INT, c INT); Query OK, 0 rows affected (0.08 sec) mysql> INSERT INTO t2 VALUES (1, 10),(2, 5); Query OK, 2 rows affected (0.01 sec) Records: 2 Duplicates: 0 Warnings: 0 mysql> create view v1 as -> SELECT t2.b, t2.c FROM t2 UNION SELECT t2.b, t2.c FROM t2 -> ORDER BY (SELECT * FROM t1) -> ; Query OK, 0 rows affected (0.06 sec) mysql> select * from v1; ERROR 1356 (HY000): View 'test.v1' references invalid table(s) or column(s) or f unction(s) or definer/invoker of view lack rights to use them
[10 Mar 2015 15:45]
Erlend Dahl
No longer repeatable in 5.7.