drh
4d8eb16f07
Rename the decimal_sci() function to decimal_exp().
...
[forum:/forumpost/fa027bb0ab|Forum post fa027bb0ab].
FossilOrigin-Name: c48f1be8cc505a7e2902c79e26c1d9a121ff5c55785ac812d2e09232b2414695
2023-08-18 15:39:38 +00:00
stephan
656f6c0c80
Improve exception handling in OpfsDb.importDb().
...
FossilOrigin-Name: a4eedd63b58f5c273b671f687cb68a32259963dbb053a710770383c735fb7f26
2023-08-18 14:41:21 +00:00
stephan
ccbfe97cd5
Extend the importDb() method of both OPFS VFSes to (A) support reading in an async streaming fashion via a callback and (B) automatically disable WAL mode in the imported db.
...
FossilOrigin-Name: 9b1398c96a4fd0b59e65faa8d5c98de4129f0f0357732f12cb2f5c53a08acdc2
2023-08-18 14:16:26 +00:00
stephan
383df02b16
Remove some obsolete JNI-internal docs.
...
FossilOrigin-Name: 00a2a3736a6dcde81d920815520040f3c47f965165e7128ca1f4062e6ec7c17c
2023-08-17 22:04:07 +00:00
dan
e15b35d5a6
Fix an error in documentation comments in fts5.h.
...
FossilOrigin-Name: 24d96bd65d8ccdd50a6f4fe217d196728a2f8658d128f9352c287f64e034104a
2023-08-17 16:59:35 +00:00
dan
fab6882fd6
Add extra test to fts5synonym2.test.
...
FossilOrigin-Name: 39ea11be3b35c5ecde9bc0fe66af673b8f440dc523422887d05a29feef036b01
2023-08-17 16:49:06 +00:00
stephan
6c5f96fc4d
Tighten up the JNI auto-ext handling.
...
FossilOrigin-Name: c09c8d05a20d916a9d9304eeea723ef7666a862a9e53f5feeeb1b03f9153d4b2
2023-08-17 13:13:22 +00:00
stephan
1dcb246988
Minor internal JNI cleanups and fixes.
...
FossilOrigin-Name: 0e9437de026cbfb333b90bb3400f1c015f85d49d73a25ad1000623216b88bfa0
2023-08-17 12:44:52 +00:00
stephan
0fa2545e7f
Remove the FIXME markers related to threading. Code style cleanups.
...
FossilOrigin-Name: 154ab26dc6ba2d1fd976e8fe6dc1b1a06c734f7e9a276a3edc5c2f30b0d6d36a
2023-08-17 10:49:06 +00:00
stephan
ff9ff54801
Cherrypick [00ac653562a6] to remove stray JNI debug output. No functional changes.
...
FossilOrigin-Name: e12d70f38c0ed5c0abf9a1e30ce4db59a4426e1e8cb1f8f07834fc1bedfcc65a
2023-08-15 21:44:22 +00:00
stephan
c131675401
Cherrypick [653ed92dc391] (went to wrong branch). Doc change only, no code changes.
...
FossilOrigin-Name: 79a14457f0067814e7c33de709e2f9e19ab880d3eebbcb6f9fcce52a4720ecac
2023-08-15 20:57:42 +00:00
dan
8c5611a169
Fix problems in fts5 test code.
...
FossilOrigin-Name: c16ed3b1cc7b4c21bfa96062bf9028ae071c89e63df3b444b59f1753594e4e94
2023-08-15 14:53:49 +00:00
stephan
abfe646c12
Add note about the current threading limitation to ext/jni/README.md. No code changes.
...
FossilOrigin-Name: 653ed92dc39185cdedfab3ea518bc7ec2d2826120e5fa4cbdee3343301396184
2023-08-15 13:01:20 +00:00
stephan
6b51e35a9b
Minor reshaping of Tester1 moving towards making a multi-threaded run mode.
...
FossilOrigin-Name: f104c14c26c123ee78c09fc1bc59efb8668dc624da05c1d8dbeaf3c9dd02a393
2023-08-15 09:26:47 +00:00
stephan
39c3f5f363
Remove a piece of stray debug output. No functional changes.
...
FossilOrigin-Name: 00ac653562a66aad3112ea322d08be68e05e6bf7413c814dd3f81bf850fcf43b
2023-08-15 09:16:41 +00:00
stephan
9019e2e667
Bring handling of the Java auto-ext handler more in line with the core in terms of locking and mutability during traversal. This removes the explicit synchronous requirement from the Java open() and auto-ext bindings.
...
FossilOrigin-Name: 42994b952e092ae4fa319395208622e887387ca3ff8ac57961c824a6c272bf0e
2023-08-14 17:12:55 +00:00
stephan
24b4cdd8d3
Remove some obsolete, commented-out makefile code. No functional or build changes.
...
FossilOrigin-Name: ea574cd5de6dbc7db2f4cffe0b6c83c795c4ba634ae1984e5c95bb3529daa5bb
2023-08-14 14:21:28 +00:00
stephan
7f2dea75ad
More work on the JNI-specific mutexes. Rework the NativePointerHolder cache lookup to be slightly simpler and O(1) instead of O(N).
...
FossilOrigin-Name: c84ded0e59aea4861d72b53b4b40cf580747c0f6ca58c334a996f1a825276cb5
2023-08-14 13:27:40 +00:00
stephan
d518e94adb
JNI-internal docs and removal of obsolete code.
...
FossilOrigin-Name: b62d93258b6a661f3a9b61468b3b641c14faf2d2196f78aca95fe14de43c9444
2023-08-14 08:28:46 +00:00
stephan
6a1ed4c811
Internal API renaming for clarity's sake.
...
FossilOrigin-Name: 911e4fc5aaf9478214095a65f74af3ebca883922c36cf7a8d911116c42cf9de8
2023-08-13 20:58:12 +00:00
stephan
88381e53fc
Add a mutex for auto-extensions, tied in to the open() process since that's the route into auto-extensions.
...
FossilOrigin-Name: 8da97e0db4eeacf91aa6fd909fd7cb73b050d194dfc7739a502b55f7eca6d7b1
2023-08-13 12:40:27 +00:00
stephan
4b4a911c5f
Add some docs and metrics for the new mutex internals.
...
FossilOrigin-Name: 33d1780b43182d2574adbc1928707af825c485c99762738e58bc6d7c6c52ac6a
2023-08-13 10:28:35 +00:00
stephan
8a6888c19e
Remove SQLITE_DEBUG from JNI build.
...
FossilOrigin-Name: 82f004cf7408c503c5787b46c7b13ceb0a20a3ad1d4f69d56127772c40e214a1
2023-08-13 10:22:15 +00:00
stephan
71e5694cd5
An initial attempt at protecting the JNI global state via mutexes at the C level instead of relying on Java's synchronized keyword. It seems to work but increases the run time of the single-threaded batch tester by roughly 3 times.
...
FossilOrigin-Name: c64e6a52ac79164be37fe643a4a39bd187af198a379410def8b8419f7c2224d4
2023-08-13 09:53:27 +00:00
stephan
0c07549fd6
Bind sqlite3_interrupt() and sqlite3_is_interrupted() to JNI but with caveats regarding mutexing of the JNIEnv cache. Add a loud warning to the JNI 'dist' target that it should be built with JDK8 (a.k.a. Java 1.8) for compatibility reasons.
...
FossilOrigin-Name: fbf99a2423dd20e4544bdeea85f714e9368ce3b92fefe97efb39a0fb4a557abe
2023-08-12 23:47:58 +00:00
stephan
202651fe86
Merge the Java Native Interface (JNI) binding into trunk.
...
FossilOrigin-Name: 48b13edcec6935bf125b265b41a3e6f7b2407afff89d5b4daa2939e3c5679ca0
2023-08-12 21:39:18 +00:00
stephan
54402964b0
Update wasm's push-testing rule to exclude files which were recently removed from the build.
...
FossilOrigin-Name: 0a6930a7ff8f8c6ca244d1d654532f3d2a02d77ef67c6cae0c53092743d59ea6
2023-08-12 21:08:41 +00:00
stephan
d8a94dbb36
Correct JNI .jar rules to only include *.java/class files, not *.* (*~ files).
...
FossilOrigin-Name: 1ba7754045a009d9c94b23ac76b9bb8d9c9cb24d42dcdf1203ee75ac85765d3e
2023-08-12 20:50:29 +00:00
stephan
68522e1627
More JNI docs.
...
FossilOrigin-Name: 290028d3ca5638f3bb18a0b243c7ba3c31c8a2b1a837c36ec29e0fc4ed6533f0
2023-08-12 15:37:53 +00:00
stephan
5b3a754360
Further simplifications in the interface of the OutputPointer family of Java classes.
...
FossilOrigin-Name: 962c3e0de2d64ab8a2bcf1a19f9c4224df3d15a41ac9f9b29da685be95c4ef7a
2023-08-12 15:09:09 +00:00
stephan
c216df75c6
Tweaks and docs for the OutputPointer family of Java classes.
...
FossilOrigin-Name: 265c8fd0d4d425054f6bf7e9cb607ad2e0e46189f16c3014f7fdf9b650085497
2023-08-12 10:39:26 +00:00
stephan
613390680d
Bind sqlite3_db_status() to JNI.
...
FossilOrigin-Name: b79477a0af94127b0638a8822de01156bef855a7e167f678809e1c978e1a0c3e
2023-08-12 10:27:08 +00:00
stephan
238bea2ae6
Bind sqlite3_status(64)() to JNI.
...
FossilOrigin-Name: cefb6614e65ca1764ec72702f92f801382e63aa9b221fc9c68719d497e7499fd
2023-08-12 10:06:59 +00:00
stephan
48dcdd3b74
Add timing info to SQLTester.
...
FossilOrigin-Name: b69b5facbf94e03e74d4a739ab85c5baac1c9ecbea8c330b2135d77e525b5d8a
2023-08-11 21:25:33 +00:00
stephan
a6746456d9
Merge trunk into jni branch.
...
FossilOrigin-Name: 4f0aeeba0287e846908180eab6f7080ebe1323ebe49340771864d110e1ca5b2b
2023-08-11 21:24:08 +00:00
stephan
783f5b5aa2
Fix a makefile deps problem which caused ext/jni build to fail if sqlite3.c/h were not created beforehand.
...
FossilOrigin-Name: 101de670774f63757180282763730aa53e70198bd7a674c27e6044632d39d22a
2023-08-11 20:32:40 +00:00
stephan
16c8c96745
Minor SQLTester test tweaks and have 'make tester' include the out-of-tree tests if they are found.
...
FossilOrigin-Name: 6c8538d83495ce65dbd7417263b3b06dbbb2a649e9a61a743911944599d75ffc
2023-08-11 18:59:57 +00:00
stephan
7009c43eaf
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).
...
FossilOrigin-Name: c7fb32d1ef30d34449c3289c384ce33317c770927534af20d4b96fa385da40bc
2023-08-11 18:04:53 +00:00
stephan
c3b7e1c4e8
Add a doc link for the new sqlite3_js_posix_create_file().
...
FossilOrigin-Name: 0d7aac45b8e7078cc80757e12d6f0b2584f2b0b184dacc2348ad3519978e5bf9
2023-08-11 17:45:23 +00:00
stephan
b949244ea1
Add sqlite3.capi.sqlite3_js_posix_create_file() and oo1.OpfsDb.importDb() as alternatives for the newly-deprecated sqlite3_js_vfs_create_file().
...
FossilOrigin-Name: da6eaf8d8258f3e2c8633fd7faf4e90c3307b5c60bd8b69c626b3c82b19dbdef
2023-08-11 17:38:17 +00:00
stephan
7e13152952
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.
...
FossilOrigin-Name: f3647a3ac8eca8c821b0b1e403da7bfb0feabd0eb5ee83709cd4956dfc56a492
2023-08-11 14:31:20 +00:00
stephan
a0423e0fc1
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.
...
FossilOrigin-Name: afe190a940441de9bef8835c2dc6d278f861a772c3b7c7a2d399b2eabd4872e3
2023-08-10 21:50:52 +00:00
stephan
5c9f5e4022
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.
...
FossilOrigin-Name: 746894c3c043c47f8b4c231de8921df81c5d0634260d299359bea73132dc7867
2023-08-10 21:29:59 +00:00
stephan
0c08c8c208
Add a working dist zip file for the JNI bits.
...
FossilOrigin-Name: d6a4d212ceba662470d8957b6a8d7075d18a84bd0d3e13ce7adcab03604fc3b7
2023-08-10 20:52:14 +00:00
stephan
a52b8c8845
Initial pass at 'make dist' rules for the JNI bundle, but they still need a bare-bones, posix-make-compatible makefile to include in the bundle.
...
FossilOrigin-Name: ff54e66a4d43f2f0f8b25ded970779e6760865a05346e09b39607bb035b02bd7
2023-08-10 18:57:37 +00:00
stephan
2ee01b0c9a
Merge trunk into jni branch for the newly-relocated version-info tool.
...
FossilOrigin-Name: cc8e8cba67c0dcfb9b416041a19456cf5248d909f3efb6fee707a5950be4f374
2023-08-10 17:39:26 +00:00
stephan
bb51af68f4
Move ext/wasm/version-info.c to tool/ for re-use in build other dist bundles.
...
FossilOrigin-Name: 4b0871fd367b6d9706e892aa13f64604967f5e3ba92381960f73aeabd3d23f84
2023-08-10 17:32:37 +00:00
stephan
a22a2d266f
Add SQLTester --keep-going flag to allow it to continue to the next script after an error.
...
FossilOrigin-Name: 4d635f781b55ed9011bdf07ee6bed2d004b1c2ebba76aa110e26d8fe3152a733
2023-08-10 16:42:22 +00:00
stephan
92f699d384
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.
...
FossilOrigin-Name: 99c0941f1c006622932a9cca12661f354f363a6c8a2b5675ea66149e0a9eb927
2023-08-10 13:10:25 +00:00
stephan
1528014703
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.
...
FossilOrigin-Name: 2952906c30bc2b7987f2c39837d56bd121f5817dc094e6ccdb6d4eea5e9b8d17
2023-08-10 12:36:40 +00:00
stephan
61186d1243
Make test completion status more visible at a glance on modern terminals.
...
FossilOrigin-Name: a4e96c306c4c270f417243e7923d7e6c4f860528dd67990dfd8d9768a6c4873f
2023-08-10 11:15:20 +00:00
stephan
e51fae4134
Disable REQUIRED_PROPERTIES handling in SQLTester, per /chat. Scripts with that directive are now skipped.
...
FossilOrigin-Name: ddc534cb25b59faf18a860a51f2dd41a1a73963aeb541b9553301fe784608393
2023-08-10 11:04:46 +00:00
stephan
0a8cc1f634
Add a visual indicator (emoji) to TestScript verbose messages, dependent on the message's level of verbosity.
...
FossilOrigin-Name: dc323d3894f2d53470cd8be261632267fa3d2af73500acfa1e9adbfa53b771fd
2023-08-10 10:58:55 +00:00
stephan
34fac74362
Add the current --testcase name to SQLTester --verbose output.
...
FossilOrigin-Name: f87367402b25adf30f35ab75aa5efc495230d4a83f2fc10b99734c3f3f593840
2023-08-10 10:44:53 +00:00
stephan
ec8298fbd1
More SQLTester docs. Add --verbosity command to help zoom in on script areas while debugging. Spice up test-start/end output with some emoji.
...
FossilOrigin-Name: 8dd08021496f504c23945ecc2bbe1e4a13109fdd03457ca6269b4cb1cc4cd04c
2023-08-10 10:34:50 +00:00
stephan
63fb588d30
Give DbException the option of closing the db to simplify error handling in one case.
...
FossilOrigin-Name: 908c9a44505422a3a15bef3a174d8b931863bc9c74485311a0e62cfec30087bd
2023-08-10 05:25:13 +00:00
stephan
6a61a19f9a
Initial version of REQUIRED_PROPERTIES support for SQLTester, with TEMPSTORE_(FILE/MEM) and RECURSIVE_TRIGGERS options.
...
FossilOrigin-Name: 48d16c9d2fe5f54b09004b4f09759c4e2ad247ae84130feb557951e32f48976a
2023-08-10 05:14:22 +00:00
stephan
f703dfa381
Generic cleanups and fixes in SQLTester.
...
FossilOrigin-Name: fc5d3cc30d2b96da42ea10dfb39f1631ff93b8384514fffd641b343df51da2a6
2023-08-10 04:24:12 +00:00
stephan
eda67031de
Change the SQLite3Jni API annotations to use SOURCE retention (used only at compile-time).
...
FossilOrigin-Name: 3c3fea6bf284721ac376e2ab5a757cf30245dd39264aaf98a8d6cd5575484275
2023-08-10 02:09:12 +00:00
stephan
0c6df29cba
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.
...
FossilOrigin-Name: 2815d676951abdab674c374fd903486ea5796f8ee4cb338d41f19693419f8471
2023-08-10 01:44:48 +00:00
stephan
2a91065145
Defer static JNI-side init of SQLTester until main() is called so that its auto-extensions do not leak over to clients of the main library.
...
FossilOrigin-Name: e461fdd53bd3212bee24ec5f5d5c234011ab30f3f67e115de9f85fdb760e3848
2023-08-10 01:19:40 +00:00
stephan
58c2ca4483
Merge trunk into jni branch.
...
FossilOrigin-Name: 52fa6f78414c41073431c166550806bb8a835bd38cfc1236c9363784c78b81b9
2023-08-10 01:05:28 +00:00
stephan
50a17a1b3a
Treat all args to --glob as a single glob.
...
FossilOrigin-Name: 4737bd345732e34cabbf90821e007d3027e68d6583c2e05e1e8bf5920373a6dc
2023-08-10 01:03:19 +00:00
stephan
3a0e45d0af
Remove --print's ability to read ahead.
...
FossilOrigin-Name: 15cfee972bcbd857d18ea626c9a9da64b2a445516946f3dd83c75a4f6b8a92fa
2023-08-10 00:58:48 +00:00
stephan
84c1a7b49f
Replace the SQLTester infrastructure with a line-oriented, non-regex-heavy parser. Add --column-names command.
...
FossilOrigin-Name: 88863908ee2059c2d18a095cbd91f41674c7b0d0a8864ec21715a5317054df4d
2023-08-10 00:34:38 +00:00
stephan
e35a703b76
Port the SQLTester 'v1' commands to the 'v2' evaluation bits. Still TODO is swapping out v1 with these separate impls.
...
FossilOrigin-Name: 0cf57e5b0f90779e450e9db1ca009610df5e6f4487337d49017636bde3bb02d6
2023-08-09 23:47:14 +00:00
stephan
35af4c5ff1
Correct REQUIRED_PROPERTIES handling to not fail if there are no properties.
...
FossilOrigin-Name: 7a19bef4f572a90fb7896b9360f9c72b052955ca9b0549be870b2b245c1f1b2b
2023-08-09 22:30:10 +00:00
stephan
bef0369ff4
More for the SQLTester rework. Can read input and dispatch commands, but only --print is currently implemented.
...
FossilOrigin-Name: 4fa2ad33edbcef393dd98dbf90586ad8f32ec0beab02f197c8038a44be86c314
2023-08-09 22:18:22 +00:00
stephan
e41c09ac8c
Initial sketches of a line-by-line parser for SQLTester to overcome its compatibility shortcomings. Far from complete.
...
FossilOrigin-Name: 43534cd042499c1bef44ca5c4a8305a710d99e70e8b0adce6df50c6a1f0402b9
2023-08-09 19:51:39 +00:00
stephan
e0fb44090b
Adapt TestScript to skip REQUIRED_PROPERTIES, per [7a07863e082664da], and improve a couple of adject reasons-for-skipping messages.
...
FossilOrigin-Name: f937097e9b22a6c78c242cbf00c71bdc57f04b1b9a15ae24058bc2813c99688c
2023-08-09 18:25:50 +00:00
drh
7f66a3eeb2
Add an extra constraint to the test-script-interpreter.md spec.
...
FossilOrigin-Name: 7a07863e082664da2efcf4ecd36785d2583abbda12526cdb643cf1aa0568292e
2023-08-09 17:47:34 +00:00
stephan
16e620e07f
SQLTester --result command: do not double-{}-wrap error messages and do not throw on db error.
...
FossilOrigin-Name: f7be20f5a62f8970f957e5c3a1d1c6536995df5c078dbac34a44f09682e43945
2023-08-09 17:23:52 +00:00
stephan
5d2a618340
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).
...
FossilOrigin-Name: f15ecb68f7ca129478336b462508d2c40ea052b4040facefdbc67b13e6aea99d
2023-08-09 17:04:58 +00:00
stephan
583fc5b963
Tweak the SQLTester --verbose and double-verbose output a bit for legibility.
...
FossilOrigin-Name: 46b79afaafda40cb1f920cc96600adf11e8c688184c9559a08eb86776ccf3663
2023-08-09 16:56:42 +00:00
stephan
589857b965
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.
...
FossilOrigin-Name: 0770e8467d4bb9490d9ed6e8a20766ffee7049cc3667db6d036c13fccbb6f3ab
2023-08-09 16:29:07 +00:00
stephan
bd87174bae
Update the definition of "special characters" for the SQLTester and correct the code to match it.
...
FossilOrigin-Name: 217f6e0c9c09c576b09ea59fce085a53d1a133927046102b4d00fd58109efc93
2023-08-09 16:03:12 +00:00
stephan
65c7226e31
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.
...
FossilOrigin-Name: 4fcc8cb0cc2bbc0da71bdb99dacfdec54814af4c0e4c37619bad6a8e5fa62937
2023-08-09 15:46:55 +00:00
stephan
5b400552be
Add a test for the --null command.
...
FossilOrigin-Name: 83ac815debcc75dac1fbbdc17736f5e33fb675fdab0bf649367592a0d18074e4
2023-08-09 14:47:01 +00:00
stephan
aa6b35cc80
Extend SQLTester glob support with '#'.
...
FossilOrigin-Name: 756ef83f45b69d9f78965ef1171d36477a32f938fe179e59b95f32f07849c0e5
2023-08-09 14:43:54 +00:00
stephan
4340f27e17
Implement the SQLTester's result escaping rules.
...
FossilOrigin-Name: 61bb950873a1ec45a71b15a0ab5128a50417c4ecdd7d5bd9add0c18afcbadf34
2023-08-09 14:24:22 +00:00
stephan
5158a9a9a7
Add --json and --json-block SQLTester commands.
...
FossilOrigin-Name: 478129d901824e675d86494044f73c313532e9f80e7ee6f425474df8237a82f5
2023-08-09 13:51:50 +00:00
stephan
ff6b15fbb2
Add SQLTester --tableresult command.
...
FossilOrigin-Name: 8c5b6d893df4a4e82c6d8e07507fc160b11412ede4bb903ff4e3f5ffa59a9cb9
2023-08-09 13:16:10 +00:00
stephan
aec9aa9289
Clean up the SQLTester output a bit by using the module name, instead of filename, where appropriate.
...
FossilOrigin-Name: 5323e4fd254274cc527af7536c622b786394599c68eca2da6c7fc641727dbdb2
2023-08-09 12:05:17 +00:00
stephan
283e87146c
Document SQLTester's --print command and add some argument validation to it.
...
FossilOrigin-Name: ab9c945bb0b4210b3f47e6341f150f8a7cc45f9e4e4c2247e91d2528ed4772a6
2023-08-09 11:10:48 +00:00
stephan
e6c29da777
Rework how SQLTester's Command objects are dispatched and how TestScript stores its command entries.
...
FossilOrigin-Name: f929f1f7f70181813f74562614f3f2aa29e65590560e3fce1677b8b176e3c6de
2023-08-09 11:05:43 +00:00
stephan
23a35c2145
Some minor tweaks in SQLTester in prep for larger refactoring.
...
FossilOrigin-Name: 1d93f93ac9708839e62d2f1b489adc5d47ff290c2d5aef4dd56be4e1e46c81b2
2023-08-09 09:56:37 +00:00
stephan
41f9449016
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.
...
FossilOrigin-Name: 4c0ec89dca00a9199d1e36768c034aa5eff03b13b5e015cf580f160dc4f141ad
2023-08-08 22:10:27 +00:00
stephan
78fc4ae4d9
Adapt JNI build to be buildable with or without SQLTester.
...
FossilOrigin-Name: adae7d78692af73e770a9cc0a4264ab32ecc18a5c0deb64f3c1e790d959bab43
2023-08-08 21:22:56 +00:00
stephan
c783fd36dc
Add SQLTester dup() and dup_count() UDFs. Correct arg handling of the --run command.
...
FossilOrigin-Name: 0dba3073f44685a51a5db7ff8886295fe04dfd43f69cbf53ad3d5afce741076b
2023-08-08 21:05:39 +00:00
stephan
4d3aa08f67
Correct --result arg count check and add infrastructure to let us add custom C-side behavior to SQLTester via an auto extension.
...
FossilOrigin-Name: bb8321702eea52fa9d42987a4b053b32d8eba15580a39d7831cd8d6f1ceb62bf
2023-08-08 20:41:29 +00:00
stephan
c15dce9f92
If SQLTester now treats a no-args --result as comparing against an empty string.
...
FossilOrigin-Name: 49005ca5cc191c52279bc7fdb45d95eeb6f8e344f78ce9dbd97aac814bc21202
2023-08-08 20:15:42 +00:00
stephan
af825cd50b
Add glob/notglob commands to SQLTester and complete the interrupted-midway impls of the strglob() and strlike() JNI bindings.
...
FossilOrigin-Name: 4ba98ec0bf24c31cce498031cb3727e09f928f54ec13c76fec50e439e0f2ba15
2023-08-08 20:02:10 +00:00
stephan
746bb422ea
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.
...
FossilOrigin-Name: 3e78d22d04e6ac2606bfc5ce250a4c3b39a2062e14011ca0a8a0a85491efbfde
2023-08-08 19:20:12 +00:00
stephan
bff14ecfcc
Correct the spacing output of multi-select SQL blocks for SQLTester --result.
...
FossilOrigin-Name: 8d98645a9e524b30f7faa1cffd8f09e7aab3c25ac7b08dd6884141dfe9cdb0d3
2023-08-08 14:58:00 +00:00
drh
358c531e9b
Updates to the test script interpreter spec: Rather than failing immediately
...
upon encountering an incompatibility, simply abandon the rest of that particular
input file.
FossilOrigin-Name: d2c99b96f4b61561c3fa34947ca7bfd2cd214b1913aff7ba64b7b897a574fea3
2023-08-08 14:49:16 +00:00
stephan
671757f4d4
A number of baby steps for SQLTester.java. It can now handle basic --result cases.
...
FossilOrigin-Name: 0404f688f6a22b6bbe009de1bee3341ca00e19e2cc32081265cf151876dc032f
2023-08-08 14:40:47 +00:00
drh
aa29140637
Add a few words of clarification on how the SQLite Test Script Interpreter
...
should be initialized to start each test script.
FossilOrigin-Name: 3aa2b5a5cadb214dc64a3db412b7dfdd805abd8681b61da857b886cba3b937b5
2023-08-08 14:25:47 +00:00
stephan
5f4e94722b
Correct JNI sqlite3_prepare() to emit a null stmt handle when the C counterpart succeeds but results in a NULL pointer.
...
FossilOrigin-Name: 94628f88b5cc82832f0ca2b00fd5346bfe99323097c6e659c5ac818c4e31d3e9
2023-08-08 13:05:12 +00:00
stephan
405dffd591
Implement the new/open/close SQLTester commands.
...
FossilOrigin-Name: dc823bf00f78e7cd626329220c42c46da12d565e3273a08eda5fb512c1d807c6
2023-08-08 11:46:46 +00:00
stephan
ec9b37b33e
Add a JNI-layer sqlite3.toString() for debugging.
...
FossilOrigin-Name: 456691649aa2a7672d5d110acdde92426a9d34552863db3e0c86b73d9c5d9aac
2023-08-08 11:46:26 +00:00
stephan
c693bd59f7
Bind sqlite3_strlike/strglob() to JNI.
...
FossilOrigin-Name: eb5440f71be32812f6310756b8e30958002e8e8e41a7eb16f081058ff733b47c
2023-08-08 10:58:16 +00:00
stephan
aeae7904a5
SQLTester: add print command and improve argument error reporting infrastructure.
...
FossilOrigin-Name: 1b6e84f6aa5c7626a308b5e8efe5c3d83ec8e7eaa803f047576b7c65333c2d44
2023-08-08 09:45:33 +00:00
stephan
58eebdaa25
Add missing license header. Minor cleanups in SQLTester.
...
FossilOrigin-Name: 5be50fd5887e5378f7d66405bff3a44117a826a17e5f1a18c5129d1109ecdae2
2023-08-08 00:59:40 +00:00
stephan
ec8edf3295
Rework SQLTester dispatching and add stub impls for several commmands.
...
FossilOrigin-Name: 9e61af75ac83e74487a6ae681ee3ff891d8cf1f1d23bf895e9e3963ddf6eaf28
2023-08-08 00:37:31 +00:00
stephan
e9ed375876
Add command dispatcher to SQLTester.
...
FossilOrigin-Name: e0a06931e91459ea43fed2954568bfafa7ad6b794fcff66e0d3bf0ed181db386
2023-08-07 23:59:08 +00:00
stephan
b7f75b7bb2
SQLTester now ignores tests which contain constructs specified in the spec doc.
...
FossilOrigin-Name: ecaeee652aa2cc6893ded9231d7e9b2783465516016740b307b74e4e81598ae3
2023-08-07 23:04:17 +00:00
stephan
fdeaee5f57
SQLTester can now split a test script into a series of individual commands.
...
FossilOrigin-Name: d3d1accc8b4ba0cd396ee3a58d9710a54b8e1d1b171d67595d4ef1fc7faea8cb
2023-08-07 22:32:22 +00:00
stephan
70679d135d
SQLTester can now read a script and strip it of all noise content.
...
FossilOrigin-Name: 59bd392817ac69ffdf60ab7a2094b0d616bf593da060b6acf1b4ce9837847fcb
2023-08-07 22:02:43 +00:00
stephan
3897a882f7
Initial skeleton for adding an SQL-driven test script interpreter for the JNI bindings.
...
FossilOrigin-Name: 2aa8f0edecd3fc30eec28987cdbf1003ace154ddc1447b6f8715ecf38d3b06fb
2023-08-07 21:04:13 +00:00
dan
be3ab76bfb
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.
...
FossilOrigin-Name: 16cd2161e312cf97129011fc829079db8f762b822b2f4fabf7ff6742c071302f
2023-08-07 16:15:56 +00:00
stephan
c7f7b45a15
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.
...
FossilOrigin-Name: 2d44720d06d9e50cb037e92981d2473a3ad0b7560f2f5923d428f59de6fd6aaa
2023-08-07 11:18:44 +00:00
stephan
be7aef1f85
Lots of JNI internal API renaming, for consistency, and moving-around of utility functions. Make it safe for more callback types to throw.
...
FossilOrigin-Name: 9a494394b9eb28cf88dc5e7075a4b8c682c8e14fdd6837b595bec8011d7e9e72
2023-08-07 10:59:27 +00:00
stephan
becf29a36c
JNI API renaming to better match the C API.
...
FossilOrigin-Name: 6e0bd03d0ba9ee8422853241ba1c4e963d158d1f042855c0cb0026701907896e
2023-08-07 10:01:59 +00:00
stephan
7c26811c2f
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.
...
FossilOrigin-Name: 2ca064d8eb37252e16b0fec9924e9ba9289d96a737346431c6ba9cb1c161e5de
2023-08-07 09:44:00 +00:00
stephan
5d48fb1784
Make sqlite3_stmt() Java ctor private - it's only constructed from JNI code.
...
FossilOrigin-Name: ce82c42f151e38b23945e6f5dd99cb6a77b3c6440508f41abc35e9f6c29cd440
2023-08-07 01:06:27 +00:00
stephan
005baf67d5
Minor internal cleanups and additional test metrics.
...
FossilOrigin-Name: fa0a6b6e8e6c711585bca30357e465f7a2f08a1c7159ecf23031af1e5158b89d
2023-08-07 00:29:38 +00:00
stephan
8af781fc4d
Bind the auto-extension APIs to JNI.
...
FossilOrigin-Name: 746a5fa079ad80b3c59411202ee601e0b5c50e79e5994d5e464fa06d3c276324
2023-08-07 00:06:31 +00:00
stephan
60745265e1
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.
...
FossilOrigin-Name: 34da294ab558880e81eebd7d261bc590551d5a7d2855e844695cef6394647ea7
2023-08-06 22:09:09 +00:00
stephan
d85f9bf6d5
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.
...
FossilOrigin-Name: 644999caff9db79562d45520d94aaa24ee88c65e397b6fb9c20a4f0e7f84e1a5
2023-08-06 21:29:13 +00:00
stephan
af90dcf324
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.
...
FossilOrigin-Name: 77a32d238e80fe1d237768d88780043a7bd2b3543e6672536254782cbea0039c
2023-08-06 20:01:30 +00:00
stephan
1a2563a950
Doc cleanups.
...
FossilOrigin-Name: 5f56b007704f2aad4cbc6f0ccd1e1f1c974865971f99451352714ee7e077c284
2023-08-06 15:01:38 +00:00
stephan
5558624b43
Bind sqlite3_config() to JNI for call variants taking (int,int*) and (int,const char *) variadic arguments.
...
FossilOrigin-Name: 6119289da85ac0c83e2a7236d24bbfff22334d6cf1d852756dc658ad6a75dfec
2023-08-06 14:19:09 +00:00
stephan
9c4c16c80d
JNI-internal cleanups and API renaming. Add a C-side java-string-to-utf8 conversion.
...
FossilOrigin-Name: 672d85795d04131135b1dc6a02d64eceb8b5084217c17766afeca4af23c07ec4
2023-08-06 13:02:43 +00:00
stephan
6a9364a518
Remove doc outdated warning about sqlite3_trace_v2() JNI binding being incompatible with MUTF-8. Use new to-string capability to simplify Fts5ExtensionApi::xColumnText() JNI binding.
...
FossilOrigin-Name: ebcfc2379be12f76a96f3605b734f406b3354d4c985062cdbfca0cf7e3f31379
2023-08-06 11:05:17 +00:00
stephan
57645b67fa
Add a way to convert from standard UTF-8 to a Java string (JNI lacks this capability).
...
FossilOrigin-Name: 07dd082c9e371829a18aeb574f842891e545e1fc125760238ede7e7e2b6a4262
2023-08-06 10:49:47 +00:00
stephan
1bce6b468e
Bind sqlite3_db_filename() and (closely related) (A) add many more docs about the UTF-8/MUTF-8 discrepancy (B) start adding internals to enable us to perform the standard-UTF-8-to-Java conversion from C.
...
FossilOrigin-Name: 586720fa714ac74491cd85d0c6645242e55e5989ad312ef6e15e0b0acc6906ff
2023-08-06 10:14:53 +00:00
stephan
153288dc89
Bind sqlite3_set_authorizer() to JNI.
...
FossilOrigin-Name: e0fa03135942cd2fe732a74510d380ba78ab230c452168e638f32b4aee04b3f7
2023-08-05 22:41:36 +00:00
stephan
28e95830ad
Refactor the per-JNIEnv cache from a fixed-size static array to a linked list of dynamically-allocated entries. Uncache all per-db state (which is necessarily JNIEnv-specific) when the corresponding JNIEnv is uncached.
...
FossilOrigin-Name: 9dd8b78419e19e88bc3fbff9bf200390b146b2461af2bb6b93d8467036619e33
2023-08-05 21:35:58 +00:00
stephan
67214a9594
Add SQLite3Jni.uncacheJniEnv(), a way for Java threads to clear their thread-specific cached state from the JNI bindings when they're about to terminate (or are otherwise done using the library).
...
FossilOrigin-Name: 7468f8761bece58f7ced3d112bbe2fb454432d9c54c9b96cedb5a15bc2926d0f
2023-08-05 20:19:45 +00:00
stephan
27cb7d6a1d
In the JNI docs, note that the sizeof SQLITE_TRANSIENT and SQLITE_STATIC should ideally be the same as the platform's pointer size.
...
FossilOrigin-Name: 7d4ac44ec419ed0474bdb9d237b97660cf0d8faba8fe686f6a914d7bc04dfa3b
2023-08-05 19:20:15 +00:00
stephan
fdeb2c8121
JNI internal refactoring and cleanups.
...
FossilOrigin-Name: 7397973a2f191d75b149cf73a6d7ee1798820c1cd37d83af14e565067ede1b04
2023-08-05 12:48:33 +00:00
stephan
695d0b698a
Bind Fts5ExtensionApi::xUserData() to JNI and extend xCreateFunction() to accept that argument. In test code, use assert() instead of exceptions if assert() is enabled so that test failures (exceptions) thrown via callbacks do not get suppressed (which they otherwise necessarily are to avoid crashing the host app).
...
FossilOrigin-Name: e43837377696e468cd31cf71585fe235ffe67a9f4d3b036c5f9d0cb7141d0f57
2023-08-05 11:16:54 +00:00
stephan
4f07be39b7
Add missing Fts5PhraseIter.java to the build.
...
FossilOrigin-Name: 96281ad0d5b2f020622c4f85f8694886e6a29fb43e1fbeb2a346ed2e94f109fb
2023-08-05 04:30:31 +00:00
stephan
ec71e555c4
Bind fts5_api::xCreateFunction() to JNI and demonstrate it with a test.
...
FossilOrigin-Name: c653bf16cbdccae05ab14059b140191afd5c17740fb78d756d8822986e54b17c
2023-08-05 04:23:27 +00:00
stephan
977b6919f2
Start adding fts5_api to JNI.
...
FossilOrigin-Name: 14d18fe983c83412d72fd2005a45a2b8c48d347b7bbf8ef9630ae460cff85c32
2023-08-05 01:28:30 +00:00
stephan
0c179dd5b4
Bind the remaining Fts5ExtensionApi methods to JNI, noting that all are completely untested because the higher-level bits needed to do so are still missing.
...
FossilOrigin-Name: 23383c1dfd240ce47f504dd5c3402c9a31f166fbde5bb72d91309a5655074b33
2023-08-05 00:40:28 +00:00
stephan
195611d8e6
In the opfs-sahpool VFS's importDb() and exportFile() methods, throw if the actually-wrote/read amounts differ from the expected-to-write/read amounts, per feedback in [forum:a4122e986f|forum post a4122e986f].
...
FossilOrigin-Name: a617ebf4e5d1af1b5b15e9782ad111399caaa3ea7b99bb0c8691c8b4283b6d6e
2023-08-04 16:01:55 +00:00
stephan
cc8202b646
More work on the JNI binding of fts5 customization (still a long ways to go).
...
FossilOrigin-Name: 1a246fd21657f5bb13eeacc4059894ab787ea9a3c45bd9bdd3030a66643d2fef
2023-08-04 15:38:59 +00:00
stephan
c7795cfd47
Eliminate code duplication in the two JNI tester classes.
...
FossilOrigin-Name: 63e7bbe3d5fcfb531f9d7fa88398c1191570e69b5d11adcb9c5e64b8345b4e6c
2023-08-04 13:27:45 +00:00
stephan
5e208f712f
FTS-related JNI refactoring. Move FTS-specific tests into their own class and dynamically load it, if possible, from the main test app.
...
FossilOrigin-Name: b7a8428fcd969e7a29a23c2dae61883f69501094f2de0f79bbee3c02c672cbf5
2023-08-04 13:03:31 +00:00
stephan
b15223bce6
More work towards binding FTS5 customization to JNI. Add Fts*.java files missing from previous checkin.
...
FossilOrigin-Name: 91263178f463ca4623dd0203696eff6bcfd68abde5d2471be3f5a3edd791c52a
2023-08-04 12:44:06 +00:00
dan
b383744835
Change comment on Fts5ExtensionApi.iVersion from "always set to 3" to "always set to 2".
...
FossilOrigin-Name: b7de399c277394a6a3bbf253d4177aa82753271e5087b98b2c2268f629a7dfdd
2023-08-04 11:10:10 +00:00
stephan
c0952c11a7
Start including fts5 customization bits into JNI, but it's far from functional.
...
FossilOrigin-Name: abaf5edd0430e3301a11bd0acb9ce4b81b310237e1799701411db56ef7605e01
2023-08-04 11:08:25 +00:00
stephan
e133a0ec05
Improve internal error handling in the JNI create_function() impl.
...
FossilOrigin-Name: 2c88390faa108a60c8fb1eb7aad05d90f3daf4cfef14ca73987597aaf7be83c9
2023-08-04 09:53:13 +00:00
stephan
a24769454e
Resolve the timing/ordering issue of a JS-to-WASM-converted xDestroy() function being uninstalled from WASM right before the underlying native call tries to call it. This has been a long-unnoticed bug which appears only when removing such functions or replacing them.
...
FossilOrigin-Name: 031c9a76b6ad1572e7a88f4d2d62f206b0d37bd1170e2c8a24248c5ec628f2f5
2023-08-04 08:45:25 +00:00
stephan
444424dab8
Part 2 of the fix from [a0f808363318c00fd1db78b].
...
FossilOrigin-Name: 5c3104228d75c8fafbe24e46623777f3a8647f1b50267af61d46f7fad0e0434e
2023-08-04 08:41:55 +00:00
stephan
e98fa205f8
Fix a discrepancy between sqlite3_values_to_js() and its API docs/intended behavior.
...
FossilOrigin-Name: 7b85c68fe252c0aa69724c82a95a4432e33ebdfb879b4b1b2ee2f9b98e9b792a
2023-08-03 16:22:59 +00:00
stephan
ed86e0a0a7
More JNI-internal docs. Correct handling of a Java exception if a trace callback throws.
...
FossilOrigin-Name: 306b269a01037bc5c98276276fdb17b37027d1ee0d603183f42a65966245bdff
2023-08-02 17:29:18 +00:00
stephan
decc1425a3
Internal doc additions in the JNI bits.
...
FossilOrigin-Name: b56643644e065b03fe2c3545e02ed3b2f6fd9f77c39aa84a02a00d695e9a12dc
2023-08-02 17:20:52 +00:00
stephan
2877c43e6c
Filter the wasmfs-specific JS module result type check out of non-wasmfs builds.
...
FossilOrigin-Name: ef7c121049f77200ecc4da260a90776264af0e84122d0133b4986959aedc653a
2023-08-01 16:41:12 +00:00
stephan
887f6e5082
Fix part 2 of 2 for /fiddle: a make deps problem which caused fiddle to load but fail to run when sqlite3.c was missing.
...
FossilOrigin-Name: 6011bc26764760af750de68f1553f45382766dd2195633ae267bdb4f9ac75d0f
2023-08-01 16:38:08 +00:00
stephan
a08d363f67
Fix part 1 of 2 for /fiddle not running: build flags which were renamed during refactoring.
...
FossilOrigin-Name: 214ffeeff77997c3352d30aaa6e51e2dea9706f0d08f73f4eacfad1864817fc6
2023-08-01 16:17:00 +00:00
dan
c1a07d3bab
Fix an assert() in fts5_index.c that might fail when dealing with corrupt records.
...
FossilOrigin-Name: aa55c83f35c2ab134e0842201e46e021079283f9c65595c86664060b3aa8d715
2023-08-01 11:03:06 +00:00
stephan
ed77e13f05
More docs for the Java side of the JNI bindings.
...
FossilOrigin-Name: d8e9bcee96b90d56701f7907a8bd48853211caf757e1aa8decc7ed25eece6770
2023-08-01 10:19:05 +00:00
stephan
e209d144c3
Internal exception-handling cleanups in the JNI bindings.
...
FossilOrigin-Name: 057b1d4f6ffff73c120566895f61ea3fd8118968464d67ec9262096a7aa03f39
2023-08-01 09:44:26 +00:00
stephan
0bc72d2b91
Minor JNI-related doc tweaks and code re-ordering.
...
FossilOrigin-Name: b663b27e425966f34fb62482a18048f0e2934380e5c411ae3627f1fe6a765c04
2023-08-01 08:48:13 +00:00
stephan
db6f0bef91
Experimentally change the JNI sqlite3_trace_v2() callback type to have more convenient access to the current Java-side sqlite3_stmt at the cost of some uncomfortably fiddly current-statement tracking in the JNI layer. Subject to change.
...
FossilOrigin-Name: 459db332af6ea358b42bac096b9d26f1045b9ec32fad8463bca06807b2396b2c
2023-07-31 13:52:46 +00:00
stephan
e3e9bdcd0b
Add some JNI-internal metrics, accessible via passing -v when running Tester1.java. Document an OpenJDK bug which leads to incorrect -Xlint:jni warnings.
...
FossilOrigin-Name: a5d68a6b64abe3c2dfc3a32157f70fd8a4ad89feef2510b3bbb2d86b325d51ae
2023-07-31 12:10:32 +00:00
stephan
8f714e21a0
Correct a mis-cast in the JNI wrapper which just happened to accidentally work. Update JNI binding of sqlite3_context_db_handle() to return the bound-at-open() db instance instead of a new/temp proxy object.
...
FossilOrigin-Name: 9faca5d9ed4a749421e08bd1da8b7672c0fd31366124fdb613c46e19dece0fc1
2023-07-31 10:55:30 +00:00
stephan
ede8900912
Add another test for JNI-bound scalar UDFs.
...
FossilOrigin-Name: 8b322d92e247be606f83977767dc361ee4f7bc819122a630bdaa1110177db9b8
2023-07-31 10:42:05 +00:00
stephan
e2e696d11f
Update some internal docs for the past two checkins. Add a way to dump out some debug info about the current JNI environment.
...
FossilOrigin-Name: ac9b8bb1e64450d980e2986084996549ae5c59e68c9f0c4c69539c239b64468b
2023-07-31 10:22:34 +00:00
stephan
452108b4fc
Refactor the busy-handler-specific JNI hook type to use the generic hook type.
...
FossilOrigin-Name: d9efdc6dd20a34bfdaad5d4bf8e67cce7e35238299eb91e4459d59fda11978a6
2023-07-31 10:08:36 +00:00
stephan
46c46e400a
Refactor the collation-specific JNI hook type to use the generic hook type.
...
FossilOrigin-Name: 02c1d3b6501fedf3d6e6d1ca60699df268522182c5ba3b49ae8f4691499ef0fc
2023-07-31 09:45:49 +00:00
stephan
41a7ac637a
Internal JNI doc tweaks.
...
FossilOrigin-Name: f4aa2c82882cb6be1fd52977de19fd03c2e38abb857b520f951b32d610972ab6
2023-07-31 09:28:15 +00:00
stephan
9c1c6da930
Consolidate triplicated xDestroy()-calling code. Remove some unnecessary casts.
...
FossilOrigin-Name: 24c0763d0e025187c74002ffee11fd48d3cd7b40e01469d28484bb67f701884b
2023-07-31 07:15:25 +00:00
stephan
09947d0aad
Internal JNI API renaming.
...
FossilOrigin-Name: fcfc070673cef2f657f4737f096678439ed7c011fb2e5391e0721f82f5d8af51
2023-07-30 18:41:25 +00:00
stephan
91710673e7
Internal JNI refactoring towards consolidating support for callbacks with and without finalizers.
...
FossilOrigin-Name: 120983a570d6de055cef9d916096de3410897ea9f46d23ea6eff1f9b549e423a
2023-07-30 17:24:01 +00:00
stephan
72bb29283f
Mark the Java wrapper classes of the C-native types as 'final' (cannot be subclassed).
...
FossilOrigin-Name: 4fd3d93623d67c25fb8a490e0d4ea56d531d858067011ab1b28cce694098feff
2023-07-30 13:47:51 +00:00
stephan
13b059025f
Minor tweaks and optimizations in the JNI bindings.
...
FossilOrigin-Name: 41fb5898f1a78d9fd85a020e28a6048a7359b54e35632e9072917cbdbcd8b07d
2023-07-30 13:30:52 +00:00
stephan
502a5c2e26
Bind sqlite3_collation_needed() to JNI. Related adjacent cleanups and fixes.
...
FossilOrigin-Name: 16ff167691733350907d2d995c774a885214acd0fe8ec491c16b786f00fe85d4
2023-07-30 11:36:41 +00:00
stephan
45fe10d02b
Internal JNI refacoring to support the pending sqlite3_collation_needed() callback. Correct a bug in the linked-list handling of PerDbStateJni which triggered an assert().
...
FossilOrigin-Name: 7ac6614e69b03304d09745619ed83f12c7eb775aaf4a636a79289b01642ddd14
2023-07-30 10:47:38 +00:00
stephan
9c113744d1
Incremental checkin to minimize the diff while narrowing in on an assertion caused by refactoring.
...
FossilOrigin-Name: 2d7a91b1396d87852f1153ab7af7385514a9537cb64ba3bbd0faba2d28704214
2023-07-30 09:45:54 +00:00
stephan
70576de5e0
Consolidate some warnings for java callbacks which must not throw but do.
...
FossilOrigin-Name: 5e592ed2dfc89225fff3a1c76509adc799a238282413984e0c4b32af18525d18
2023-07-30 08:12:15 +00:00
stephan
fecad503a9
Bind sqlite3_update_hook() to JNI.
...
FossilOrigin-Name: a5bbaa9017839f8d8b92bfb44472d4c60fa3037bfae7846dc8350262c1332cde
2023-07-30 07:44:03 +00:00
stephan
b162c68d62
Bind sqlite3_rollback_hook() to JNI.
...
FossilOrigin-Name: 5f8ee44098d74ac2b98e4dd43ad80d3b919528358b3f992b425af7fa6262dcee
2023-07-30 06:44:21 +00:00
stephan
00c0c5883a
Add commit hook failure to JNI tests.
...
FossilOrigin-Name: be4459b495cc2555e4d8ca24dd56c3da1036d25af7cc077bbc3d93c2a3e8c40b
2023-07-30 06:00:53 +00:00
stephan
f52de0fdaf
Bind sqlite3_commit_hook() to JNI.
...
FossilOrigin-Name: c687297fcae082cbd7f9258c43f3841fd34904d8b62b0adf3cd61fcddeee483d
2023-07-30 05:50:34 +00:00
stephan
ca379859c9
Bind sqlite3_progress_handler() to JNI. Add some metrics to Tester1.java.
...
FossilOrigin-Name: 437ecfe8abf8d294d429d191d811da6148e0b2ebb74cf66998480bfc8ef58bdf
2023-07-30 04:31:56 +00:00
stephan
f0c701c410
Add tests for SAHPoolUtil.exportFile() and importDb().
...
FossilOrigin-Name: 4aa88b8fb1c99137ed7531e5c82a241738a2b0554f7af82c0ed0ce8d16a0879a
2023-07-30 03:54:10 +00:00
dan
808cf29b55
Fix a buffer overread in the fts5_structure virtual table (test code).
...
FossilOrigin-Name: b837aff79cd159061b46af59eaf96a1a1920eeece27e9e27931cf3387068d96a
2023-07-29 20:13:19 +00:00
stephan
5d800cdb6e
SAHPoolUtil.importDb() now accepts either a byte array or ArrayBuffer.
...
FossilOrigin-Name: 3848f04e542e2f0f8975e82632af598aac3b60312bd244b0472f7ddf1dda77df
2023-07-29 15:53:53 +00:00
stephan
33c8e9d233
Internal JNI binding docs.
...
FossilOrigin-Name: 991c66197e4dc7297fce3b20a1b4846873bcd4ce8add36aac71bd2e0e73c207b
2023-07-28 18:44:11 +00:00
stephan
888e14f551
Fix an incorrect file path in ext/jni/README.md
...
FossilOrigin-Name: bcefa2df563260933c7ab5df90872580f71010c11419f6b1de7b1e2747237ff8
2023-07-28 18:02:02 +00:00
drh
f69084aaf7
Fix minor typos in the JNI README.md file.
...
FossilOrigin-Name: e21cf2e8f13465dbff33f9c21580752c1d8c077d6a253f56f04dab0d47eb99b8
2023-07-28 15:58:09 +00:00
stephan
ab12b750de
Correct a recently-introduced falsehood in ext/wasm/README.md regarding ssh port forwarding.
...
FossilOrigin-Name: 2a3f3a9cf28849c99d83c256f813405a2f47f84532e1192d67bb7aa655dd98a3
2023-07-28 11:52:58 +00:00
stephan
c7f602497b
Minor java cleanups recommended by a modern IDE.
...
FossilOrigin-Name: f92a9bbabebc33a771835e259b04a57d07add1eacf3d9aec5fddf929ce8a3022
2023-07-28 10:37:17 +00:00
stephan
069029011e
Add Java tests which ensure that xFinal() is called with no aggregate context when the result set is empty.
...
FossilOrigin-Name: 7ac8c66a6b62d6bb345e8b9957a26de463019ae7d30ff442f19482c3a6827fc7
2023-07-28 10:01:01 +00:00
stephan
f326577619
Tweaks to the Java-side UDF docs.
...
FossilOrigin-Name: 48e0079d8db675a8761f27348bc6795aa6b6e49a3f76bd4adece83309dcf2aff
2023-07-28 09:54:39 +00:00
stephan
09c2640fe3
More Java docs about making use of the aggregate context. Change the JNI mapping to set the sqlite3_context::aggregateContext member directly, instead of via a superflous setter, because that way is faster.
...
FossilOrigin-Name: 7af0cb998f7161296d5e5e50a42e9db26ec13c145c61194a999a1a0104818d45
2023-07-28 09:25:05 +00:00
stephan
75d3b1b5a2
More docs and cleanups related to the aggregate UDF state. Correct the OOM check to behave properly if xFinal() is called without a matching xStep(), xValue(), or xInverse().
...
FossilOrigin-Name: ff53f1ccdc1780f2d9bd5f59804a76dbdf4f6b70696d3a7dbdbd96d1f8f6fa5c
2023-07-28 01:51:14 +00:00
stephan
7d207bf483
Add an OOM check to the previous check-in. Minor internal API renaming.
...
FossilOrigin-Name: 6b56e4d62b4945e52978d00aa8e2984faa731c92a7e002e81524fcfcf8ba0cce
2023-07-28 01:19:44 +00:00
stephan
48a8352a39
Add support making use of sqlite3_aggregate_context() (in a roundabout way) from Java to accumulate state within aggregate and window UDFs.
...
FossilOrigin-Name: 640574984741c7a9472d7f8be7bce87e736d7947ce673ae4a25008d74238ad90
2023-07-28 01:12:47 +00:00
stephan
8ba5d79c35
Reformulate jni tests to not require the -ea jvm flag to enable assert().
...
FossilOrigin-Name: dc356667a8f4fa31a3fef1ae35873d834d27fd6a9f0818d6fb85e4751fde9fe5
2023-07-27 22:53:02 +00:00
stephan
fd022a23a5
Add locking test for BusyHandler and clear up new -Xlint:jni warnings introduced by the busy-handler binding.
...
FossilOrigin-Name: 7dcde2bfce54b18f391776fa1cb93c0ff6153634bedcab0007b374c06c4d4079
2023-07-27 22:42:25 +00:00
stephan
1a95091b49
Bind sqlite3_busy_handler(). Correct mapping of pointers for, and cleanup of, JNI-level per-db state.
...
FossilOrigin-Name: 524747796a30a5c1c6c7567b49ffb1e35e2626c73e09c335c0ab74d4ddb5f005
2023-07-27 22:05:39 +00:00
stephan
fd250c2cb5
Replace some www: interwiki references in the JNI readme with their full URLs to make the doc more portable.
...
FossilOrigin-Name: 63ce0c9bdde210cf2f8b6099ae5c73caac18e6debc13c2f77090b77f3de72beb
2023-07-27 20:32:16 +00:00
stephan
eead0ffef8
Merge trunk into jni branch for compiler warning fixes.
...
FossilOrigin-Name: 0514fd340ae15a95760d50c747d6fb9eae5109cb5045eeabc2bc199be0a5ae35
2023-07-27 20:12:48 +00:00
dan
ea6bccaa44
Fix a couple of compiler warnings in fts5_index.c.
...
FossilOrigin-Name: bf71faa2a1d29ea762c4d2485522d6f4f8a5a7166981a92d3ba9c96ccbbe1213
2023-07-27 20:08:44 +00:00
stephan
dff3443939
Initial check-in of JNI (Java Native Interface) bindings for the core C API.
...
FossilOrigin-Name: b5374b9ef58fa0be80aefccde0721f5599fb820464b13940b6361b9aa09a59d5
2023-07-27 20:02:49 +00:00
dan
9cf8961557
Add the contentless_delete=1 option to fts5. For creating contentless tables that support DELETE and REPLACE statements.
...
FossilOrigin-Name: d66b182d2bc6ce0772e69401b7affe1adbc1b128c4631cb3c17f98dde72af00a
2023-07-27 19:13:35 +00:00