Просмотр исходного кода

Swap to using SQLITE_SERIALIZED instead of SQLITE_MULTITHREADED.

Kestrel 1 месяц назад
Родитель
Сommit
a68b8ad92b
1 измененных файлов с 2 добавлено и 2 удалено
  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(),
                 ),
             )?;