【 使用环境 】测试环境
【 OB or 其他组件 】
【 使用版本 】Server version: 5.7.25 OceanBase 3.1.4 (r10000092022071511-b4bfa011ceaef428782dcb65ae89190c40b78c2f) (Built Jul 15 2022 11:45:14)
【问题描述】建表后想再添加主键定义失败
【复现路径】
【问题现象及影响】
【附件】
# 先建表
obclient [test]> create table t1(id int, c1 int);
Query OK, 0 rows affected (0.159 sec)
# 再添加主键失败
obclient [test]> alter table t1 add primary key(id);
ERROR 1235 (0A000): Not supported feature or function
# 参考OB手册,用modify和change语法也失败
obclient [test]> alter table t1 modify id int primary key;
ERROR 1235 (0A000): Not supported feature or function
obclient [test]> alter table t1 modify id int auto_increment primary key;
ERROR 1235 (0A000): Not supported feature or function
obclient [test]> alter table t1 modify id int not null auto_increment primary key;
ERROR 1235 (0A000): Not supported feature or function
obclient [test]> alter table t1 modify id int not null primary key;
ERROR 1235 (0A000): Not supported feature or function
obclient [test]> alter table t1 change id id int not null primary key;
ERROR 1235 (0A000): Not supported feature or function
文档中没有相关案例,只好来提问了,谢谢。