While prescanning a large database, minetestmapper may keep the database
locked for too long, causing minetest to complain, and even bail out
sometimes. Minetest will print warnings like:
SQLite3 database has been locked for <duration>
The new option --sqlite3-limit-prescan-query-size limits the number
of records queried from the database in a single query, thus limiting
the duration of the lock.
If minetest kept the database locked for 1 second or more, *and* if
the database was modified in that time, minetestmapper will issue a warning,
and suggest using --sqlite3-limit-prescan-query-size.
'Relative' in the sense that they can only sensibly compared to
another time value obtained using the same function during the
same program invocation.
Currently, this is only relevant when using LevelDB, and a newer version
of libstdc++, which uses a different C++ ABI which clang does not yet support.
A symptom of the problem are unexpected linking failures, caused by undefined
symbols, while other symbols from the same library do not cause errors.
The solution is a workaround, that avoids using the offending symbols, at the
cost of reduced functionality. As this currently only affects the text of an
error message, the impact is minor.
Primarily to prevent gcc6 complaining about it, as in practise,
there was no impact on behavior or correctness at all.
At the same time, the code in question was adapted slightly to
clarify the intentions and effects.
I.e. the extra version number that gets appended to the software
version number, and that should be incremented if a newer package
is built from the same software version, and installed or distributed.
This better reflects its purpose
Also removed a redundant check for existence of the file in CMakeLists.txt
In preparation for MSVC compilation support
This is required to be able to build on Windows.
open() is not a standard ANSI C/C++ function and only available on POSIX systems.
Using fopen() provides better portability.
If mapping while minetest is running and modifying blocks, modified
blocks queried by RowID, would not be found by SQLite3. Querying
by I64 exclusively did not cause such behavior.
The connection strings and database structure of the previous unofficial
versions (by Shadowninja and johhnyjoy) are also still supported, but
support will be removed in a future version of minetestmapper.