Skip to content

Commit

Permalink
[KATC] Set immutable option when opening sqlite db (#1781)
Browse files Browse the repository at this point in the history
  • Loading branch information
RebeccaMahany authored Jul 16, 2024
1 parent a981f92 commit d0813b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ee/katc/sqlite.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func sourcePatternToGlobbablePattern(sourcePattern string) string {

// querySqliteDb queries the database at the given path, returning rows of results
func querySqliteDb(ctx context.Context, slogger *slog.Logger, path string, query string) ([]map[string][]byte, error) {
dsn := fmt.Sprintf("file:%s?mode=ro", path)
dsn := fmt.Sprintf("file:%s?mode=ro&immutable=1", path)
conn, err := sql.Open("sqlite", dsn)
if err != nil {
return nil, fmt.Errorf("opening sqlite db: %w", err)
Expand Down

0 comments on commit d0813b1

Please sign in to comment.