From 9a90dbda9a3752527870f481b2694a810c7dee8b Mon Sep 17 00:00:00 2001 From: Anshul Khandelwal Date: Wed, 17 Jan 2024 17:06:31 +0530 Subject: [PATCH] cancellation fix --- statement.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/statement.go b/statement.go index 87116524..606255f8 100644 --- a/statement.go +++ b/statement.go @@ -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 }