解决数据库因某些原因导致主索引不连贯的问题,让主索引重新排序
alter table 表名 add old_id int(10) not null;
update 表名 set old_id=主索引名;
alter table 表名 drop 主索引名;
alter table 表名 add 主索引名 int(10) not null;
alter table 表名 modify column 主索引名 int(10) not null auto_increment, add primary key (主索引名);