Skip to content

Commit e2748c1

Browse files
authored
add config to sqlite3 to be SQLITE_CONFIG_SERIALIZED (#428)
1 parent 5086507 commit e2748c1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Leanplum-SDK/Classes/Utilities/LPDatabase.m

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@ - (id)init
5050
- (sqlite3 *)initSQLite
5151
{
5252
const char *sqliteFilePath = [[LPDatabase sqliteFilePath] UTF8String];
53+
54+
sqlite3_shutdown();
55+
sqlite3_config(SQLITE_CONFIG_SERIALIZED);
56+
sqlite3_initialize();
57+
5358
int result = sqlite3_open_v2(sqliteFilePath, &sqlite, SQLITE_OPEN_CREATE | SQLITE_OPEN_READWRITE | SQLITE_OPEN_FULLMUTEX, NULL);
5459
if (result != SQLITE_OK) {
5560
[self handleSQLiteError:@"SQLite fail to open" errorResult:result query:nil];

0 commit comments

Comments
 (0)