We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
描述 表结构 CREATE TABLE test ( id int(5) DEFAULT NULL COMMENT 'test', ) check sql: ALTER TABLE test MODIFY COLUMN id varchar(4) default null COMMENT 'test' ;
test
id
runtime error: slice bounds out of range [:7] with capacity 6, goroutine 113 [running]: github.com/hanchuanchuan/goInception/server.(*clientConn).Run.func1() /data/goInception/server/conn.go:420 +0x7b panic({0x17a0240?, 0xc0006c00f0?}) /app/go/src/runtime/panic.go:770 +0x132 github.com/hanchuanchuan/goInception/session.(*session).checkModifyColumn(0xc000672008, 0xc0006b5a00, 0xc0072a3dc0) /data/goInception/session/session_inception.go:4115 /data/goInception/session/session_inception.go 有个字符串长度判断有问题 str := string([]byte(foundField.Type)[:7]) 此处 foundField.Type 为6: int(5)
str := string([]byte(foundField.Type)[:7])
int(5)
因没深入理解代码逻辑,采用这样的方式临时处理:
`
str := "" if len(foundField.Type) < 7 { str = foundField.Type } else { str = foundField.Type[:7] }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
描述
表结构
CREATE TABLE
test
(id
int(5) DEFAULT NULL COMMENT 'test',)
check sql:
ALTER TABLE test MODIFY COLUMN id varchar(4) default null COMMENT 'test' ;
runtime error: slice bounds out of range [:7] with capacity 6, goroutine 113 [running]:
github.com/hanchuanchuan/goInception/server.(*clientConn).Run.func1()
/data/goInception/server/conn.go:420 +0x7b
panic({0x17a0240?, 0xc0006c00f0?})
/app/go/src/runtime/panic.go:770 +0x132
github.com/hanchuanchuan/goInception/session.(*session).checkModifyColumn(0xc000672008, 0xc0006b5a00, 0xc0072a3dc0)
/data/goInception/session/session_inception.go:4115
/data/goInception/session/session_inception.go
有个字符串长度判断有问题
str := string([]byte(foundField.Type)[:7])
此处 foundField.Type 为6:
int(5)
因没深入理解代码逻辑,采用这样的方式临时处理:
`
`
The text was updated successfully, but these errors were encountered: