【 使用环境 】5.7.25-OceanBase_CE-v4.2.5.3
【 OB or 其他组件 】ob_compatibility_mode MYSQL
【 使用版本 】5.7.25-OceanBase_CE-v4.2.5.3
【问题描述】创建视图失败
【复现路径】执行:CREATE VIEW test_view AS
SELECT id, floor_plan_id, otn_link_name
FROM nps_general.otn_link;
nps_general> CREATE VIEW test_view AS
SELECT id, floor_plan_id, otn_link_name
FROM nps_general.otn_link
【报错】:
[2025-05-30 17:09:57] [0A000][1235] Not supported feature or function
– auto-generated definition
create table otn_link
(
id BIGINT UNSIGNED not null comment ‘主键,由应用生成(如Snowflake)’
primary key,
floor_plan_id BIGINT(19) not null comment ‘平面,字典id’,
otn_link_name VARCHAR(255) not null comment ‘OTN链路名称’,
a_ne_id BIGINT(19) not null comment ‘源网元名称(A)(关联节点表)’,
z_ne_id BIGINT(19) not null comment ‘宿网元名称(Z)(关联节点表)’,
a_port VARCHAR(255) not null comment ‘A端口’,
z_port VARCHAR(255) not null comment ‘Z端口’,
total_distance_km DECIMAL(10, 2) not null comment ‘总距离(km)’,
project_time VARCHAR(255) not null comment ‘工程’,
remark VARCHAR(500) null comment ‘备注’,
year BIGINT(19) not null comment ‘年份’,
create_time BIGINT(19) null comment ‘创建时间’,
create_by BIGINT(19) null comment ‘创建人ID’,
create_user_name VARCHAR(255) null comment ‘创建人名字’,
update_time BIGINT(19) null comment ‘更新时间’,
update_by BIGINT(19) null comment ‘更新人ID’,
update_user_name VARCHAR(255) null comment ‘更新人名字’,
is_del TINYINT(3) default 0 not null comment ‘是否已删除(0-未删除,1-已删除)’,
constraint otn_link_unique
unique (otn_link_name)
);
create index idx_del
on otn_link (is_del);
create index idx_station_id
on otn_link (a_ne_id, z_ne_id);