mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 07:17:35 +00:00
LibSQL+SQLServer: Do not re-open databases
Both `Database` and `Heap` were allowed to be opened twice. Prevent this, and change SQLServer to only open databases that are not already opened. This fixes a Ladybird crash where opening the application twice would erroneously duplicate free heap block indices.
This commit is contained in:
parent
c05e08decb
commit
70ca295404
3 changed files with 8 additions and 4 deletions
|
@ -23,6 +23,7 @@ Database::Database(DeprecatedString name)
|
|||
|
||||
ResultOr<void> Database::open()
|
||||
{
|
||||
VERIFY(!m_open);
|
||||
TRY(m_heap->open());
|
||||
|
||||
m_schemas = BTree::construct(m_serializer, SchemaDef::index_def()->to_tuple_descriptor(), m_heap->schemas_root());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue