Skip to content

Raise when open_v2 or open16 is called on an open database - #729

Merged
flavorjones merged 1 commit into
mainfrom
card-303-open-v2-guard
Aug 11, 2026
Merged

Raise when open_v2 or open16 is called on an open database#729
flavorjones merged 1 commit into
mainfrom
card-303-open-v2-guard

Conversation

@flavorjones

Copy link
Copy Markdown
Member

The private open_v2 and open16 methods could be called on a database that already had a live connection, reachable only via send since initialize calls them once. The second open replaced the connection and leaked the first sqlite3* handle.

Both methods now raise SQLite3::Exception when the database already has a live connection.

The private `open_v2` and `open16` methods could be called on a database
that already had a live connection, reachable only via `send` since
`initialize` calls them once. The second open replaced the connection and
leaked the first `sqlite3*` handle.

Both methods will now raise `SQLite3::Exception` when the database
already has a live connection.
@flavorjones
flavorjones merged commit 1d86b7a into main Aug 11, 2026
135 checks passed
@flavorjones
flavorjones deleted the card-303-open-v2-guard branch August 11, 2026 19:59
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.

1 participant