Details
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)
Gliffy Diagrams
Attachments
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions
Reproducible on 5.2, 5.3, 5.5. I haven't found anything in documentation that suggests it's an intentional limitation.