fix bug of recover early

This commit is contained in:
hebo
2019-10-08 17:54:25 +08:00
parent 1d64e41b58
commit d019ac76cf
3 changed files with 12 additions and 4 deletions

View File

@@ -301,10 +301,14 @@ func (ms *MysqlSession) GenerateQueryPiece() (qp model.QueryPiece) {
}
}
return filterQueryPieceBySQL(mqp, querySQLInBytes)
mqp = filterQueryPieceBySQL(mqp, querySQLInBytes)
if mqp != nil {
mqp.GenerateJsonBytes()
}
return mqp
}
func filterQueryPieceBySQL(mqp *model.PooledMysqlQueryPiece, querySQL []byte) (model.QueryPiece) {
func filterQueryPieceBySQL(mqp *model.PooledMysqlQueryPiece, querySQL []byte) (*model.PooledMysqlQueryPiece) {
if mqp == nil || querySQL == nil {
return nil