From caa0878004b547a0a952b5be4941e3529ad756d1 Mon Sep 17 00:00:00 2001 From: Scott Lamb Date: Tue, 26 Oct 2021 14:40:47 -0700 Subject: [PATCH] fix incorrect open uuid from f7aa71d --- server/db/db.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/server/db/db.rs b/server/db/db.rs index 192d37b..a11c446 100644 --- a/server/db/db.rs +++ b/server/db/db.rs @@ -2255,7 +2255,7 @@ impl Database { // Note: the meta check comes after the version check to improve the error message when // trying to open a version 0 or version 1 database (which lacked the meta table). - let (uuid, config) = raw::read_meta(&conn)?; + let (db_uuid, config) = raw::read_meta(&conn)?; let open_monotonic = recording::Time::new(clocks.monotonic()); let open = if read_write { let real = recording::Time::new(clocks.realtime()); @@ -2271,7 +2271,10 @@ impl Database { }; stmt.execute(params![open_uuid, real.0, boot_uuid])?; let id = conn.last_insert_rowid() as u32; - Some(Open { id, uuid }) + Some(Open { + id, + uuid: open_uuid.0, + }) } else { None }; @@ -2280,7 +2283,7 @@ impl Database { let db = Database { db: Some(Mutex::new(LockedDatabase { conn, - uuid, + uuid: db_uuid, flush_count: 0, open, open_monotonic,