Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[KATC] Set immutable option when opening sqlite db #1781

Merged
merged 2 commits into from
Jul 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading