[MDEV-3567] LP:607168 - Virtual columns do not work with CREATE ... SELECT Created: 2010-07-19  Updated: 2015-02-02  Resolved: 2012-10-04

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Philip Stoev (Inactive) Assignee: Igor Babaev
Resolution: Fixed Votes: 0
Labels: Launchpad

Attachments: XML File LPexportBug607168.xml    

 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.



 Comments   
Comment by Rasmus Johansson (Inactive) [ 2011-12-13 ]

Launchpad bug id: 607168

Generated at Thu Feb 08 06:49:34 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.