Skip to content

Commit

Permalink
refactor(dbm-services): 降低mysql关键字检查等级 TencentBlueKing#4002
Browse files Browse the repository at this point in the history
  • Loading branch information
ymakedaq authored and zhangzhw8 committed Apr 17, 2024
1 parent 67d4b06 commit e0611ed
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ func (c CreateDBResult) Checker(mysqlVersion string) (r *CheckerResult) {
r = &CheckerResult{}
// 检查库名规范
if R.BuiltInRule.TableNameSpecification.KeyWord {
r.ParseBultinBan(func() (bool, string) {
r.ParseBultinRisk(func() (bool, string) {
return KeyWordValidator(mysqlVersion, c.DbName)
})
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func (c CreateTableResult) Checker(mysqlVersion string) (r *CheckerResult) {
r.Parse(R.CreateTableRule.SuggestEngine, c.GetEngine(), "")
r.Parse(R.CreateTableRule.SuggestBlobColumCount, c.BlobColumCount(), "")
if R.BuiltInRule.TableNameSpecification.KeyWord {
r.ParseBultinBan(func() (bool, string) {
r.ParseBultinRisk(func() (bool, string) {
return KeyWordValidator(mysqlVersion, c.TableName)
})
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
func (c CreateTableResult) SpiderChecker(spiderVersion string) (r *CheckerResult) {
r = &CheckerResult{}
if R.BuiltInRule.TableNameSpecification.KeyWord {
r.ParseBultinBan(func() (bool, string) {
r.ParseBultinRisk(func() (bool, string) {
return KeyWordValidator(spiderVersion, c.TableName)
})
}
Expand Down
2 changes: 1 addition & 1 deletion dbm-services/mysql/db-simulation/app/syntax/syntax.go
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,7 @@ func (ch *CheckInfo) runcheck(res ParseLineQueryBase, bs []byte, mysqlVersion st

func prettyErrorsOutput(warnInfos []string) (msg string) {
for idx, v := range warnInfos {
msg += fmt.Sprintf("Error %d: %s\n", idx+1, v)
msg += fmt.Sprintf("%d: %s\n", idx+1, v)
}
return
}

0 comments on commit e0611ed

Please sign in to comment.