fix bug of recover early
This commit is contained in:
parent
1d64e41b58
commit
d019ac76cf
|
@ -62,10 +62,15 @@ func (mqp *MysqlQueryPiece) Bytes() (content []byte) {
|
|||
return mqp.jsonContent
|
||||
}
|
||||
|
||||
mqp.jsonContent = marsharQueryPieceMonopolize(mqp)
|
||||
mqp.GenerateJsonBytes()
|
||||
return mqp.jsonContent
|
||||
}
|
||||
|
||||
func (mqp *MysqlQueryPiece) GenerateJsonBytes() {
|
||||
mqp.jsonContent = marsharQueryPieceMonopolize(mqp)
|
||||
return
|
||||
}
|
||||
|
||||
func (mqp *MysqlQueryPiece) GetSQL() (str *string) {
|
||||
return mqp.QuerySQL
|
||||
}
|
||||
|
|
|
@ -19,7 +19,6 @@ func (mqpp *mysqlQueryPiecePool) Enqueue(pmqp *PooledMysqlQueryPiece) {
|
|||
mqpp.lock.Lock()
|
||||
defer mqpp.lock.Unlock()
|
||||
|
||||
|
||||
mqpp.queue <- pmqp
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue