Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
Virtual columns do not work properly with CREATE ... SELECT and likely all other similar constructs:
CREATE TABLE t1 (f1 INTEGER, v1 INTEGER AS (f1) VIRTUAL);
CREATE TABLE t2 AS SELECT v1 FROM t1;
returns this error
1054: Unknown column 'f1' in 'virtual column function'
which is incorrect. My guess is that the server tries to find v1 in t2 instead of t1. It would be interesting what would happen if t2 did have a column named f1.