stephan [Tue, 7 Nov 2023 17:15:55 +0000 (17:15 +0000)]
JNI: during static init record whether the current JVM supports JNI-level access to java.nio.ByteBuffer raw memory, and add sqlite3_jni_supports_nio() to query that.
stephan [Mon, 6 Nov 2023 21:57:15 +0000 (21:57 +0000)]
Add -DSQLITE_ENABLE_COLUMN_METADATA to the JNI build, as per [forum:9205518c0568fdf0|forum post 9205518c0568fdf0]. Add tests for the functions that flag enables so that the build will fail if that flag is missing.
dan [Mon, 6 Nov 2023 18:40:25 +0000 (18:40 +0000)]
Fix an fts5 problem where a transaction consisting of (a) a DELETE on rowid X, (b) a prefix query, and (c) an INSERT on rowid X, could corrupt the index.
stephan [Sun, 5 Nov 2023 03:37:33 +0000 (03:37 +0000)]
JNI wrapper1 normalizeSql() now throws UnsupportedOperationException, instead of returning null, if built without SQLITE_ENABLE_NORMALIZE. Remove SQLITE_PREPARE_NORMALIZE from the JNI interface because it's a legacy no-op.
stephan [Sat, 4 Nov 2023 23:37:11 +0000 (23:37 +0000)]
Bind collation and collation-needed to JNI wrapper1 and correct the callback return type for collation-needed callbacks in the lower-level JNI binding.
drh [Sat, 4 Nov 2023 21:44:00 +0000 (21:44 +0000)]
Ensure that the YYYY-MM-DD input to date and time functions has been normalized
prior to returning a result.
[forum:/forumpost/6bb476897e|Forum post 6bb476897e].
stephan [Sat, 4 Nov 2023 12:53:00 +0000 (12:53 +0000)]
Bind the trace API to the JNI wrapper1 API and add a way to map the native-level db/stmt types to their high-level counterparts (required for translating callbacks such as tracers).
dan [Thu, 2 Nov 2023 21:02:53 +0000 (21:02 +0000)]
Fix a spurious "misuse of aggregate function" error that could occur when an aggregate function was used within the FROM clause of a sub-select of the select that owns the aggregate. e.g. "SELECT (SELECT x FROM (SELECT sum(t1.a) AS x)) FROM t1". [forum:/forumpost/c9970a37ed | Forum post c9970a37ed].
drh [Thu, 2 Nov 2023 12:05:55 +0000 (12:05 +0000)]
Update the srctree-check.tcl script and child script so that they can be run
on a read-only source tree and so that if any inconsistencies are found, the
script returns a non-zero exit code and thus halts the build.
drh [Mon, 30 Oct 2023 19:03:17 +0000 (19:03 +0000)]
Add a cast to i64 for an integer in an sqlite3OsWrite() offset
calculation. The cast is not strictly necessary, but it helps human readers
see that the code is correct.
drh [Mon, 30 Oct 2023 12:09:48 +0000 (12:09 +0000)]
With SQLITE_ENABLE_BLOCK_ATOMIC_WRITE enabled, if a transaction is committing
and there is a new freelist page at the end of the database file which would
cause the database file size to grow, ensure that page is written and the
file size grows before the block-atomic-write commits. Fix for the
problem identified by [forum:/forumpost/3bd8d497b2|forum post 3bd8d497b2]
larrybr [Sun, 29 Oct 2023 16:26:12 +0000 (16:26 +0000)]
Properly close a handle. Use a putatively effective runtime test for UTF-8 console I/O capability. (This makes the version test useful mainly for avoiding a warning that UTF-8 console I/O could not be setup.)
larrybr [Sun, 29 Oct 2023 00:24:22 +0000 (00:24 +0000)]
Condition default UTF-8 console I/O for Windows builds on OS version 10 or more. This is to accomodate an IsValidCodePage() API which may happily report CP_UTF8 as a valid code page when the stock console cannot, in fact, do UTF-8 I/O.
drh [Sat, 28 Oct 2023 11:53:14 +0000 (11:53 +0000)]
Update documentation for sqlite3_errmsg() to try to make it clear that if
the schema of a database contains table names or similar with invalid UTF,
then the error message generated by SQLite might also contain invalid UTF.
No changes to code.
drh [Sat, 28 Oct 2023 11:40:33 +0000 (11:40 +0000)]
Since SQLite considers NaN to be like NULL and NULL sorts before any integer,
make sure the sqlite3IntFloatCompare() routine reports that the integer
argument is larger if the floating-point argument is NaN.
stephan [Sat, 28 Oct 2023 03:54:28 +0000 (03:54 +0000)]
Remove the SQLITE_MAX_ALLOCATION_SIZE flag (set to 536mb) from the WASM and JNI builds because it can unduly limit db exports via sqlite3_serialize(), as reported in [forum:75524f7342c1ba45|forum post 75524f7342c1ba45]. It now defaults to whatever sqlite3.c uses, which is currently just shy of 2gb.
drh [Fri, 27 Oct 2023 18:16:15 +0000 (18:16 +0000)]
Disable two rtree test cases for Linux-i686. We do not have that platform
available for testing. The test cases work on all other 64-bit and 32-bit
platforms that we have at hand. So there is no way for us to debug this
problem. Better to disable the test.
[forum:/forumpost/ffcbf789b5386573|forum post ffcbf789b5386573].
larrybr [Fri, 27 Oct 2023 13:59:05 +0000 (13:59 +0000)]
Cleanup shell.c comments. Hide -utf8 option, as it is undocumented and accepted only for backward compatibility. No functional changes except for -help content.
drh [Fri, 27 Oct 2023 10:49:17 +0000 (10:49 +0000)]
Back out [2904fcbeebba9189], mostly. The page bitmap is needed even for a
partial integrity_check in order to avoid an infinite loops while walking the
database.
drh [Thu, 26 Oct 2023 17:30:54 +0000 (17:30 +0000)]
Enhance the "tool-zip" makefile target on Windows so that it uses more
universally available commands to build the ZIP archive. Fix other minor
issues with that makefile target at the same time.
dan [Thu, 26 Oct 2023 16:05:57 +0000 (16:05 +0000)]
Handle the case where a virtual table xBestIndex method called while coding a trigger fired by a top-level statement with a RETURNING clause prepares a statement that also contains a RETURNING clause.
drh [Thu, 26 Oct 2023 12:59:41 +0000 (12:59 +0000)]
Deal with the case of a reentrant INSERT on a virtual table where the
outer INSERT has a RETURNING clause but the inner does not.
dbsqlfuzz 3ac9a1e33f676254e02c0f297263b0a7aeb0c1a5.
drh [Wed, 25 Oct 2023 12:58:06 +0000 (12:58 +0000)]
Fix the amalgamation generator so that when it is reporting the Fossil
version number in the header comment of the amalgamation, it does not
elide the first hex digit of the version hash.
drh [Wed, 25 Oct 2023 10:37:11 +0000 (10:37 +0000)]
Enhance the new xIntegrity method of the sqlite3_module object with new
parameters that provide the name of the table being checked and
a flag to indicate a "quick_check". Based on feedback in
[forum:/forumpost/965c0d02ea|forum post 965c0d02ea].
dan [Tue, 24 Oct 2023 16:06:56 +0000 (16:06 +0000)]
Fix a problem with the fts5 highlight() and snippet() functions when used with tokenizers like "trigram" that output overlapping tokens. Forum post [forum:/forumpost/63735293ec|63735293ec].
dan [Tue, 24 Oct 2023 15:53:02 +0000 (15:53 +0000)]
Fix a problem with the fts5 highlight() and snippet() functions when used with tokenizers like "trigram" that output overlapping tokens. Forum post [forum:/forumpost/63735293ec|63735293ec].