Kaynağa Gözat

Swap to using SQLITE_SERIALIZED instead of SQLITE_MULTITHREADED.

Kestrel 1 ay önce
ebeveyn
işleme
a68b8ad92b
1 değiştirilmiş dosya ile 2 ekleme ve 2 silme
  1. 2 2
      microrm/src/db.rs

+ 2 - 2
microrm/src/db.rs

@@ -58,7 +58,7 @@ impl PreparedKey for std::any::TypeId {
     }
 }
 
-/// Represents a single sqlite connection, in SQLITE_MULTITHREADED mode.
+/// Represents a single sqlite connection, in SQLITE_SERIALIZED mode.
 ///
 /// This translates to a struct that is Send, but not Sync.
 #[derive(Clone)]
@@ -75,7 +75,7 @@ impl Connection {
                 sq::sqlite3_open_v2(
                     url.as_ptr(),
                     &mut db_ptr,
-                    sq::SQLITE_OPEN_READWRITE | sq::SQLITE_OPEN_NOMUTEX | sq::SQLITE_OPEN_CREATE,
+                    sq::SQLITE_OPEN_READWRITE | /* sq::SQLITE_OPEN_NOMUTEX |*/ sq::SQLITE_OPEN_CREATE,
                     std::ptr::null_mut(),
                 ),
             )?;