aboutsummaryrefslogtreecommitdiff
path: root/sqlite3.go
diff options
context:
space:
mode:
Diffstat (limited to 'sqlite3.go')
-rw-r--r--sqlite3.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/sqlite3.go b/sqlite3.go
index 5ac9570..d72bcb3 100644
--- a/sqlite3.go
+++ b/sqlite3.go
@@ -828,6 +828,10 @@ func (c *SQLiteConn) exec(ctx context.Context, query string, args []namedValue)
tail := s.(*SQLiteStmt).t
s.Close()
if tail == "" {
+ if res == nil {
+ // https://github.com/mattn/go-sqlite3/issues/963
+ res = &SQLiteResult{0, 0}
+ }
return res, nil
}
query = tail