Skip to content

Conversation

@davidzhangbj
Copy link

goInception版本:goInception-linux-v1.3.0-94-g2f06c61b95.tar.gz
mysql版本:8.0.20
mysql表结构:create table t1 (id bigint unsigned not null primary key auto_increment, c1 int not null default '0');
alter语句:alter table t1 change column c1 c1 varchar(256) not null default '';
使用goInception审核这��alter语句时报:“slice bounds out of range [:7) with capacity 3”错误,原因是同一个建表语句,mysql5.7为int(11),mysql8.0为int
mysql8.0.20
image
mysql5.7.44
image
所以在截取时对foundField.Type做判断,如果foundField.Type长度小于7位,以实际长度进行截取,如果大于等于7位,就按照7位进行截取

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant