Skip to content

Commit

Permalink
cancellation fix
Browse files Browse the repository at this point in the history
  • Loading branch information
k-anshul committed Jan 18, 2024
1 parent d940582 commit 9a90dbd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions statement.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,10 +231,12 @@ func (s *stmt) execute(ctx context.Context, args []driver.NamedValue) (*C.duckdb
if ctx.Err() != nil {
return nil, ctx.Err()
}

dbErr := C.GoString(C.duckdb_result_error(&res))
C.duckdb_destroy_result(&res)
return nil, errors.New(dbErr)
}

return &res, nil
}

Expand Down

0 comments on commit 9a90dbd

Please sign in to comment.