diff --git a/sqlmock_go18.go b/sqlmock_go18.go index c49429c..52b0e0c 100644 --- a/sqlmock_go18.go +++ b/sqlmock_go18.go @@ -75,7 +75,7 @@ func (c *sqlmock) PrepareContext(ctx context.Context, query string) (driver.Stmt select { case <-time.After(ex.delay): - return &statement{c, query, ex.closeErr}, nil + return &statement{c, ex, query}, nil case <-ctx.Done(): return nil, ErrCancelled }