Skip to content

Preserve temporary tables when starting transactions - #357

Merged
quinnj merged 1 commit into
masterfrom
fix/temp-table-transactions
Sep 23, 2026
Merged

quinnj merged 1 commit into
masterfrom
fix/temp-table-transactions

Conversation

@quinnj

@quinnj quinnj commented Sep 22, 2026

Copy link
Copy Markdown
Member

Starting a transaction can delete existing temporary tables. The shared transaction function changes PRAGMA temp_store to MEMORY; SQLite deletes the temporary schema when that setting changes. This also makes load!(...; temp=true) fail on a fresh connection with no such table.

Remove that assignment so transactions preserve temporary objects and the connection's storage policy. Default or explicitly file-backed temporary storage now stays in effect. Applications that require memory storage can configure it before creating temporary objects.

Fixes #330.

Validation: the new regressions fail on the unchanged source (4 errors). Full suites pass on Julia 1.9.4 and 1.13.0 (245 checks each). Tests cover default/FILE/MEMORY settings, direct rollback, nested savepoint rollback, outer commit, and fresh temporary-table loading. Another 34 checks cover helper callers and file-backed connection lifetime.

Co-authored by Codex

@quinnj
quinnj merged commit bbd205e into master Sep 23, 2026
6 checks passed
@quinnj
quinnj deleted the fix/temp-table-transactions branch September 23, 2026 01:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Temporary table creation doesn't work

1 participant