[MDEV-354] virtual columns don't work with enum or set as data type Created: 2012-06-18  Updated: 2012-06-23  Resolved: 2012-06-23

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: 5.5.24, 5.3.7, 5.2.12
Fix Version/s: 5.5.27, 5.3.8

Type: Bug Priority: Minor
Reporter: Heinz Wiesinger Assignee: Igor Babaev
Resolution: Fixed Votes: 0
Labels: None


 Description   

Trying to use an ENUM data type for a persistent virtual column results in an error

CREATE TABLE table1 (
a INT not null,
b char(2) not null,
c enum("Y","N") as (case when b = "aa" then "Y" else "N" end) persistent
);

ERROR 1033 (HY000): Incorrect information in file: './database/table1.frm'

Changing the datatype results in a successful table creation.

CREATE TABLE table1 (
a INT not null,
b char(2) not null,
c char(1) as (case when b = "aa" then "Y" else "N" end) persistent
);

Query OK, 0 rows affected (0.16 sec)



 Comments   
Comment by Elena Stepanova [ 2012-06-18 ]

Reproducible on 5.2, 5.3, 5.5. I haven't found anything in documentation that suggests it's an intentional limitation.

Comment by Igor Babaev [ 2012-06-19 ]

Fixed the bug and sent the patch to Sanja for a review.

Comment by Oleksandr Byelkin [ 2012-06-19 ]

the fix is OK

Comment by Igor Babaev [ 2012-06-20 ]

The fix was pushed into the 5.2 tree. Buildbot did not show any problems.

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