Skip to content

Commit

Permalink
Using stored ParamsCount for capacity per review suggestion.
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Farr <Peter@PrismaPhonic.com>
  • Loading branch information
PrismaPhonic committed Nov 19, 2019
1 parent bb7f9fb commit 0da79a8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions go/mysql/conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -898,8 +898,7 @@ func (c *Conn) handleNextCommand(handler Handler) error {
if stmtID != uint32(0) {
defer func() {
prepare := c.PrepareData[stmtID]
paramsCount := len(prepare.BindVars)
prepare.BindVars = make(map[string]*querypb.BindVariable, paramsCount)
prepare.BindVars = make(map[string]*querypb.BindVariable, prepare.ParamsCount)
}()
}

Expand Down

0 comments on commit 0da79a8

Please sign in to comment.