dan [Fri, 11 Aug 2023 19:31:51 +0000 (19:31 +0000)]
If SQLITE_USE_SEH is defined, handle structured-exceptions thrown by MSVC builds if the *-shm file mapping is accessed after it becomes invalid for some reason.
stephan [Fri, 11 Aug 2023 18:04:53 +0000 (18:04 +0000)]
Bind sqlite3_sql() and sqlite3_expanded_sql() to JNI. Start marking C-side functions which would need explicit mutex support if we remove 'synchronized' from their Java entry points (but there are many more left to mark).
stephan [Fri, 11 Aug 2023 14:31:20 +0000 (14:31 +0000)]
Deprecate sqlite3_js_vfs_create_file() because, it was discovered today, its out-of-scope use of the sqlite3_vfs, sqlite3_file, and sqlite3_io_methods APIs triggers unresolvable assertions in the core when built with SQLITE_DEBUG.
drh [Fri, 11 Aug 2023 11:12:46 +0000 (11:12 +0000)]
Up until version 3.42.0, there was a bug in json_valid() such that it would
return False (0) for a NULL input. That bug is fixed in 3.42.0. This
check-in adds a compile-time option -DSQLITE_LEGACY_JSON_VALID that restores
the old buggy behavior for applications that depend on it.
stephan [Thu, 10 Aug 2023 21:50:52 +0000 (21:50 +0000)]
Mark _all_ JNI binding funcs as synchronized so that Java can lock them and protect our global-state access. The alternative is writing a mountain of C-side code to do the same thing.
stephan [Thu, 10 Aug 2023 21:29:59 +0000 (21:29 +0000)]
Work around jdk8 and jdk19 mangling the C name of sqlite3_db_config() differently. Correct the variadic arg handling of the JNI-side subset of sqlite3_db_config() options.
stephan [Thu, 10 Aug 2023 13:10:25 +0000 (13:10 +0000)]
Document that auto-extensions registered via JNI will fail if they open a db (to avoid triggering an endless loop in the auto-extensions). Discover the hard way that JDKv19 creates different mangled JNI names for some functions than JDKv8. Start reformatting much of the JNI API decls in prep for making them even longer.
stephan [Thu, 10 Aug 2023 12:36:40 +0000 (12:36 +0000)]
Resolve two assertions in the auto-extension JNI which were triggered via new SQLTester infrastructure. Move SQLTester's db-init SQL injection into an auto-extension.
stephan [Thu, 10 Aug 2023 01:44:48 +0000 (01:44 +0000)]
Move all of the SQLTester code into a single file, since it's only got 1 public class. Remove 'public' from many methods which don't need it. Add more documentation to it.
stephan [Wed, 9 Aug 2023 17:04:58 +0000 (17:04 +0000)]
Move the test command body's trim() back into the TestScript class (to simplify Command-level code) but do it after double-verbose has had the chance to emit it as-is (so that debug output is not mangled by the trim).
stephan [Wed, 9 Aug 2023 16:29:07 +0000 (16:29 +0000)]
Strip --oom commands from SQLTester input since (A) we can't currently do anything with them and (B) they can appear as body content of --testcase commands and the current parser cannot deal with that. If --verbose is provided once, emit the name and args of each command as it's run. If --verbose is used twice or more, also emit the command's body text, if any.
stephan [Wed, 9 Aug 2023 15:46:55 +0000 (15:46 +0000)]
Extend TestScript to be able to report why it should be skipped. Expand the test-skipping rules to account for the current spec doc. Add the {} empty-string case to the spec doc.
stephan [Tue, 8 Aug 2023 22:10:27 +0000 (22:10 +0000)]
Remove the current-statement tracking from the JNI internals because it will break down in the face of client-side mixed-mode native/java code, e.g. in cases like SQLTester. This makes tracing of sqlite3_stmt a micron slower but also reliably correct.
stephan [Tue, 8 Aug 2023 19:20:12 +0000 (19:20 +0000)]
When SQLTester hits an unknown command, emit a warning and skip the rest of that script instead of aborting the whole run, per /chat discussion. Reduce verbosity a bit.
drh [Tue, 8 Aug 2023 14:49:16 +0000 (14:49 +0000)]
Updates to the test script interpreter spec: Rather than failing immediately
upon encountering an incompatibility, simply abandon the rest of that particular
input file.
dan [Mon, 7 Aug 2023 17:09:25 +0000 (17:09 +0000)]
Enhance sqlite3_vtab_nochange() so that it works with "UPDATE ... FROM ..." statements. Use this to allow some updates on fts5 contentless-delete tables.
dan [Mon, 7 Aug 2023 16:15:56 +0000 (16:15 +0000)]
Changes so that sqlite3_vtab_nochange() works with "UPDATE ... FROM...". Use this to allow UPDATE on a contentless fts5 table if new values are supplied for all indexed columns.
stephan [Mon, 7 Aug 2023 11:18:44 +0000 (11:18 +0000)]
When converting a Java exception to a db error message, use Throwable.toString() instead of getMessage() so that the exception type's name is included. More internal API renaming for consistency.
stephan [Mon, 7 Aug 2023 09:44:00 +0000 (09:44 +0000)]
Rename fts5_api pContext parameters to pUserData, per /chat discussion. This is a cosmetic change made to reduce confusion between those parameters and the two other context-type parameters in that API.
stephan [Sun, 6 Aug 2023 22:09:09 +0000 (22:09 +0000)]
Rework the sqlite3_open(_v2)() order of operations so that pending auto-extension support can get ahold of the open-time Java state despite the Java/C (sqlite3*) binding not having yet been established.
stephan [Sun, 6 Aug 2023 21:29:13 +0000 (21:29 +0000)]
Completely rework how the JNI sqlite3_open(_v2) and sqlite3_prepare(_vN)() bindings deal with output pointers to give the JNI side full control over the origin of db and stmt handles (necessary for solving chicken/egg situations in auto-extensions and prepare-time trace). Lots of adjacent internal API renaming.
stephan [Sun, 6 Aug 2023 20:01:30 +0000 (20:01 +0000)]
Start adding JNI-side support for auto extensions, but hit a brick wall which requires slightly awkward semantics changes in the JNI bindings for sqlite3_open(_v2)() to resolve, so stash this #if'd out for the time being.