mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-11-02 15:30:25 +08:00
fix: 执行脚SQL脚本时解析SQL失败
SQL脚本中包含use mayfly-go,应为use `mayfly-go`。
This commit is contained in:
@@ -198,6 +198,10 @@ func (d *Db) ExecSqlFile(rc *req.Ctx) {
|
||||
if err == io.EOF {
|
||||
break
|
||||
}
|
||||
if err != nil {
|
||||
d.MsgApp.CreateAndSend(rc.LoginAccount, ws.ErrMsg("sql脚本执行失败", fmt.Sprintf("[%s][%s] 解析SQL失败: [%s]", filename, dbInstance.Info.GetLogDesc(), err.Error())))
|
||||
return
|
||||
}
|
||||
sql := sqlparser.String(stmt)
|
||||
execReq.Sql = sql
|
||||
// 需要记录执行记录
|
||||
|
||||
Reference in New Issue
Block a user