The page http://www.sqlite.org/threadsafe.html mentions:
Which mode is the sqlite that is integrated in iOS 5 compiled in?
OK, so sqlite3_threadsafe() returns 2 so it is compiled with SQLITE_CONFIG_MULTITHREAD on iOS. That is unfortunate, I would have liked Serialized.
sqlite3_config(SQLITE_CONFIG_SERIALIZED) unfortunately gives me SQLITE_MISUSE
As per this answer - https://stackoverflow.com/a/7799021/40444
It appears you can do the following:
sqlite3_shutdown();
if (sqlite3_config(SQLITE_CONFIG_SERIALIZED) == SQLITE_OK) {
NSLog(@"sqlite configured to be threadsafe);
}
sqlite3_initialize();
However it's unclear if this officially works.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With