Skip to content

Commit

Permalink
Return non-nil result
Browse files Browse the repository at this point in the history
  • Loading branch information
otoolep committed Jul 31, 2021
1 parent 91859f8 commit eb446c9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sqlite3.go
Original file line number Diff line number Diff line change
Expand Up @@ -829,6 +829,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
Expand Down

0 comments on commit eb446c9

Please sign in to comment.