Only return an executor to the pool once

The executor was being returned to the pool twice, which was resulting in nil interface{} errors when creating new executors concurrently, as the transaction would not be set properly.
This commit is contained in:
Tobie Morgan Hitchcock 2017-11-24 01:45:56 +00:00
parent 26e5ef3978
commit 37e015b482
2 changed files with 0 additions and 9 deletions

View file

@ -223,8 +223,6 @@ func Process(fib *fibre.Context, ast *sql.Query, vars map[string]interface{}) (o
executor := newExecutor()
defer executor.reset()
go executor.execute(ctx, ast)
// Wait for all of the processed queries to

View file

@ -47,13 +47,6 @@ func newExecutor() (e *executor) {
}
func (e *executor) reset() {
e.send = nil
executorPool.Put(e)
}
func (e *executor) execute(ctx context.Context, ast *sql.Query) {
var err error