Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add OPEN_FULLMUTEX flag when opening mbtiles #2185

Merged
merged 9 commits into from
Oct 21, 2020
2 changes: 1 addition & 1 deletion core/deps/SQLiteCpp
Submodule SQLiteCpp updated 56 files
+14 −0 .editorconfig
+7 −0 .gitbugtraq
+59 −0 .github/workflows/build.yml
+48 −0 .github/workflows/subdir_example.yml
+1 −1 .gitignore
+106 −128 .travis.yml
+188 −0 CHANGELOG.md
+0 −111 CHANGELOG.txt
+221 −93 CMakeLists.txt
+2 −2 Doxyfile
+0 −58 FindSQLiteCpp.cmake
+1 −1 LICENSE.txt
+60 −24 README.md
+3 −6 TODO.txt
+44 −26 appveyor.yml
+7 −7 build.bat
+7 −3 build.sh
+66 −0 cmake/FindSQLite3.cmake
+11 −0 cmake/SQLiteCppConfig.cmake.in
+323 −0 docs/README.md
+38 −1 examples/example1/main.cpp
+25 −0 examples/example2/CMakeLists.txt
+3 −0 examples/example2/README.md
+21 −0 examples/example2/build.bat
+18 −0 examples/example2/build.sh
+84 −0 examples/example2/src/main.cpp
+1 −1 googletest
+1 −1 include/SQLiteCpp/Assertion.h
+9 −18 include/SQLiteCpp/Backup.h
+55 −49 include/SQLiteCpp/Column.h
+123 −78 include/SQLiteCpp/Database.h
+19 −28 include/SQLiteCpp/Exception.h
+90 −0 include/SQLiteCpp/ExecuteMany.h
+5 −3 include/SQLiteCpp/SQLiteCpp.h
+178 −51 include/SQLiteCpp/Statement.h
+5 −7 include/SQLiteCpp/Transaction.h
+31 −0 include/SQLiteCpp/Utils.h
+54 −32 include/SQLiteCpp/VariadicBind.h
+40 −1 sqlite3/CMakeLists.txt
+1 −1 sqlite3/README.md
+49,805 −24,452 sqlite3/sqlite3.c
+1,963 −489 sqlite3/sqlite3.h
+6 −27 src/Backup.cpp
+12 −18 src/Column.cpp
+219 −81 src/Database.cpp
+2 −22 src/Exception.cpp
+89 −130 src/Statement.cpp
+2 −2 src/Transaction.cpp
+78 −66 tests/Backup_test.cpp
+33 −16 tests/Column_test.cpp
+199 −16 tests/Database_test.cpp
+47 −24 tests/Exception_test.cpp
+54 −0 tests/ExecuteMany_test.cpp
+297 −19 tests/Statement_test.cpp
+3 −2 tests/Transaction_test.cpp
+51 −14 tests/VariadicBind_test.cpp
4 changes: 2 additions & 2 deletions core/src/data/mbtilesDataSource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -233,11 +233,11 @@ bool MBTilesDataSource::loadNextSource(std::shared_ptr<TileTask> _task, TileTask
void MBTilesDataSource::openMBTiles() {

try {
auto mode = SQLite::OPEN_READONLY;
auto mode = SQLite::OPEN_READONLY | SQLite::OPEN_FULLMUTEX;
if (m_cacheMode) {
// Need to explicitly open a SQLite DB with OPEN_READWRITE
// and OPEN_CREATE flags to make a file and write.
mode = SQLite::OPEN_READWRITE | SQLite::OPEN_CREATE;
mode = SQLite::OPEN_READWRITE | SQLite::OPEN_CREATE | SQLite::OPEN_FULLMUTEX;
}

auto url = Url(m_path);
Expand Down