File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -1178,7 +1178,8 @@ func (i *MysqlDriverImpl) checkInvalidSelect(stmt *ast.SelectStmt) error {
11781178// checkUnparsedStmt might add more check in future.
11791179func (i * MysqlDriverImpl ) checkUnparsedStmt (stmt * ast.UnparsedStmt ) error {
11801180 if i .cnf .parsingSQLFailureCheckEnable {
1181- i .result .Add (i .cnf .parsingSQLFailureLevel , rulepkg .ConfigParsingSQLFailure , "语法错误或者解析器不支持,请人工确认SQL正确性。" )
1181+ parsingRule := rulepkg .RuleHandlerMap [rulepkg .ConfigParsingSQLFailure ]
1182+ i .result .Add (i .cnf .parsingSQLFailureLevel , rulepkg .ConfigParsingSQLFailure , parsingRule .Message )
11821183 }
11831184 return nil
11841185}
Original file line number Diff line number Diff line change @@ -2142,6 +2142,7 @@ var RuleHandlers = []RuleHandler{
21422142 Level : driverV2 .RuleLevelError ,
21432143 Category : RuleTypeGlobalConfig ,
21442144 },
2145- Func : nil ,
2145+ Message : "语法错误或者解析器不支持,请人工确认SQL正确性。" ,
2146+ Func : nil ,
21462147 },
21472148}
You can’t perform that action at this time.
0 commit comments