소스 검색

Swap to using SQLITE_SERIALIZED instead of SQLITE_MULTITHREADED.

Kestrel 1 개월 전
부모
커밋
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(),
                 ),
             )?;