请问 auto_increment 的 auto_id_cache 能否在建表后修改?
为何不测试下。
支持的
ALTER TABLE t_cache AUTO_ID_CACHE 100;
我其实是想改成 mysql 兼容模式也就是
alter table ${tab_name} AUTO_ID_CACHE 1;
但是报这个,这个的意思是不能在建表后改模式么
[HY000][1105] Can’t Alter AUTO_ID_CACHE between 1 and non-1, the underlying implementation is different
我的5.4.3版本是可以修改成1的,
你是6.5版本吗?提示应该是不能修改成1?
是 6.5,但是这个提示也不大确定是版本的问题还是表的其它配置的问题
发现如果建表时设置 auto_id_cache = 1 的话,也没有办法改成大于 1 的值,会报同样的错误
create table "test_tab"
(
"id" bigint(20) not null auto_increment,
primary key ("id") /*T![clustered_index] CLUSTERED */
) engine = InnoDB
default charset = utf8mb4
collate = utf8mb4_bin
auto_id_cache = 1;
alter table test_tab auto_id_cache 1000;
我上6.5.0版本库上测试了下,确实建表的时候auto_id_cache = 1不能再修改成其他的值了,应该就是这个 TiDB 6.5.0 Release Notes | PingCAP 文档中心 这个版本升级的,改成1之后兼容mysql,但是不允许再改成其他了
此话题已在最后回复的 60 天后被自动关闭。不再允许新回复。