stephan
d9cf47e377
Remove the Java BusyHandler.xDestroy() method - it should not have had one. Eliminate the last of the potentially-significant MUTF-8 cases.
...
FossilOrigin-Name: c852f1ebbde273c3d28fe5aff0bf73cfc06b41dd371a94d7520536dc7a1dbcc1
2023-08-26 10:51:19 +00:00
stephan
6f8f587d2f
Improve threading support for all types of JNI-side callback hooks, making them safe to invoke if another thread is busy replacing them.
...
FossilOrigin-Name: f2af7bbf493fe28d92fc9c77425f8bb9d48c02af9a5eabceb0365c705651e114
2023-08-26 10:20:38 +00:00
stephan
25033b6b3b
Move the 3 Java SQLFunction subclasses from inner classes to package scope.
...
FossilOrigin-Name: 21fd47a68db9df1828f4cc4131d326a193b5751d56a40ae77ed0a78dc0621af1
2023-08-25 16:43:51 +00:00
stephan
9fed4aab77
Missed a straggler when renaming Java classes in [8ca528006533ac1]. Document threading limitations.
...
FossilOrigin-Name: 5786b95f5d09b4462aff0fdeac37992a2b64c47b004d18960f51e4e6a5796106
2023-08-25 16:26:16 +00:00
stephan
a5f09eb29d
Hopefully the last major API rename in the JNI bits: rename all lower_camel_case classes which do not have direct counterparts in the C API to UpperCamelCase, as that's more idiomatic. Java types which reflect C-style types are unaffected.
...
FossilOrigin-Name: 8ca528006533ac152e9b322e421cf5d339414c77332d9836a9ff429b793d0d2d
2023-08-25 14:17:36 +00:00
stephan
ad818380cc
More Java API renaming for consistency.
...
FossilOrigin-Name: 4e457778de189d8393e88f399dc521c8a5ad4ddd80a5fd69295bcb104fac5cbf
2023-08-25 13:23:45 +00:00
stephan
a899186c86
Re-enable SQLITE_THREADSAFE=0 in the JNI build and add multitest target which builds and runs the tests in all 3 threading modes.
...
FossilOrigin-Name: 6b1c816f6aae9face07ed7ead969257cf915c21ff9cdad9a21b7cf0e7496e09e
2023-08-25 12:29:59 +00:00
stephan
0199669fa1
Code restructuring. Force SQLITE_THREADSAFE in JNI builds for the time being, as threadsafe==0 leads to as-yet-mysterious JNI-level reference errors.
...
FossilOrigin-Name: 5a099caa2c21bec647f0a521e7f5d0d1cc2f96d388d3d6c53d5ec80947f33e8d
2023-08-25 11:32:56 +00:00
stephan
5ecb51c260
Only build in the JNI-side metrics tracking in SQLITE_DEBUG builds.
...
FossilOrigin-Name: 646e7fc3b5ba81c207f013c9a06781986138379f20e787320a811ba3ed5489dc
2023-08-25 04:27:17 +00:00
stephan
aec1361a2b
Javadoc and internal API cleanups.
...
FossilOrigin-Name: 10a43cba9bb2c23b5f31b31fcac81be34acec1940cca47d0b8e5a5ccbf1aa8eb
2023-08-25 04:02:33 +00:00
stephan
5276552083
Replace all of the JNI XyzHook/Handler classes with snake_cased ones which follow unified naming conventions to make them easier to apply.
...
FossilOrigin-Name: 76e62a381249b3b4262b22bdffe7fc2816c820115c9df266956ab8817b127aca
2023-08-25 02:57:30 +00:00
stephan
44b4b8260f
javadoc additions.
...
FossilOrigin-Name: bedf33d403677d243a1505ce549166850ab55671700b143278db5feb84883ab3
2023-08-25 00:27:28 +00:00
stephan
3401736694
Re-frame the incongruous SQLite3Jni.uncacheThread() API as sqlite3_java_uncache_thread().
...
FossilOrigin-Name: 7232b033954fae40df3db43e489e0e5a703c03308f500a1ae36fd9d707632d7f
2023-08-24 22:28:44 +00:00
stephan
70dcc2822d
Update some outdated JNI docs and account for a function renamed earlier this evening.
...
FossilOrigin-Name: 3f684ef5018116f4be46a07779451c8983ac87a5db182477f71ee7bf28287a04
2023-08-24 21:45:30 +00:00
stephan
0f0bf3ff9e
Do not pre-allocate sqlite3_aggregate_context() for Java UDFs, as it unduly complicates UDF initialization.
...
FossilOrigin-Name: e8308f0c6ec2d8999c8a2502fb130cb3501ba326f23f71f2cd8d452debae79b5
2023-08-24 21:31:56 +00:00
stephan
eef599dbd4
More code legibility and style improvements in the JNI pieces. Start work on a javadoc build.
...
FossilOrigin-Name: 62b404d62fd62f4d220838b59c9f38a71afa2d4a8c3af0a5c9495fa7020972cf
2023-08-24 18:43:25 +00:00
stephan
e336d92688
Doc, code style, and legibility cleanups.
...
FossilOrigin-Name: cf185bcd25629d882a030b8b87048179a120ab1f84aa1d68b279c499dbdf0dba
2023-08-24 17:25:05 +00:00
stephan
cf8a93f804
Doc style fixes.
...
FossilOrigin-Name: 862f9828e078ae138c3533658c45e4c45155975794e752b9b3a71a693842f37a
2023-08-24 15:42:08 +00:00
stephan
e6c299a5c8
Add a new non-goal to the JNI README.md.
...
FossilOrigin-Name: 53000cdae9b265752f8d8616679da621a571a6590c6eaeca23cf87a0e13aa4c4
2023-08-24 15:11:28 +00:00
stephan
8e52281659
Merge the jni-threading branch into trunk, eliminating the JNI API's prior threading limitations.
...
FossilOrigin-Name: 3739c8aa7080d8e1044ca51ab7b699b50da4d29620b35acfcea2745059b65bac
2023-08-24 14:49:29 +00:00
stephan
e7a4685837
Correct JNI layer's misuse of an sqlite3-internal error-reporting API (no mutex held). Style cleanups. Eliminate lookups of per-thread state by approximately 85% across the test suite.
...
FossilOrigin-Name: 1f46ba8d3bc61af771c1e33d09ad25f0da4fc4f915f7a9f6223ebfd99526d81d
2023-08-24 14:31:36 +00:00
stephan
bfdc7ab5a7
Add more JNI docs, tests, and a handful of Java-side overloads.
...
FossilOrigin-Name: d19a431facbde6a6b960664674753ee85d2c051a76109ce7db0b079c65fbdea0
2023-08-24 11:57:51 +00:00
stephan
8cafdfa916
JNI cleanups regarding building with certain features disabled.
...
FossilOrigin-Name: a9e6d5158b8a4a6b8554a5f8f0a35785ee450d42ea877275dc27085e89716c18
2023-08-23 17:52:51 +00:00
stephan
1c3bf8a3e1
Remove unnecessary jclass-type struct members.
...
FossilOrigin-Name: d67255f7251cc5d1d27d77d4c84ff216e2da71202db989718189a6b4beff1cd0
2023-08-23 17:15:48 +00:00
stephan
495046ef88
Add a note to the JNI README explaining why the Java API has callback names like xFunc() and xPreUpdate().
...
FossilOrigin-Name: 415447a310f6a7d06b4aa9ef51f110cf8e2ef9545c69cb5983c367c50fe641d2
2023-08-23 13:36:27 +00:00
stephan
bea9ed0f1f
Bind sqlite3_preupdate_hook() and friends to JNI.
...
FossilOrigin-Name: d0c425b5c1d3aac5ead18a501a3760b4506d68d373cb3be484247042cf2fa8d4
2023-08-23 13:17:37 +00:00
stephan
4e97ab4296
Bind a subset of sqlite3_config() to JNI: threading modes and sqllog.
...
FossilOrigin-Name: fce8ecaf7f2e69a168978e6993e58c452c45f76c39da33f2869c9d947c16cab1
2023-08-23 10:36:12 +00:00
stephan
4c8ef3894e
Numerous minor cleanups and code style conformance improvements.
...
FossilOrigin-Name: 6c92d884920e4ace54913fc60ceef6e43a4351f45a4cb3c4a0ed3d29d544a31b
2023-08-23 09:05:16 +00:00
stephan
336bc8a281
Improve C-side exception handling from Java-side UDF callbacks.
...
FossilOrigin-Name: aebbc24afb339ed07b7cd767fbc0d25f3e9c3d9bb5ef3d1c10b04b605c7261bc
2023-08-23 00:17:28 +00:00
stephan
d53565b4f8
Minor Tester1.java cleanups.
...
FossilOrigin-Name: 70d936953ba55cfed32efe7e3a9d4b71da9a7ffc8818b6540471e0bf311bc688
2023-08-22 23:00:44 +00:00
stephan
3600976bf1
Fix Tester1 so that exceptions triggered via threads are not silently ignored. Disable auto-extension tests in multi-thread mode because concurrent threads rightfully interfere with that.
...
FossilOrigin-Name: 56b2a077ace6e6ad5834e1a597b710f212a5b7d5db5b9a27a41f2aa0f6952c55
2023-08-22 22:13:08 +00:00
stephan
d1c7216b2f
More work on the JNI multi-threaded test runner.
...
FossilOrigin-Name: 9a74ad716bded1e14333bf7c72392916f800d58a96240eabe4988ca5fc9e8752
2023-08-22 20:10:28 +00:00
stephan
87bb103038
Disassociate JNI db handles from the thread that created them, as it's no longer relevant.
...
FossilOrigin-Name: 8b78b737e66a399b04e555a8197f63a73198a4105cb2f37ffd5b0e6014302caf
2023-08-22 18:36:30 +00:00
stephan
c675add616
Correct JNI binding of sqlite3_shutdown() to clean up all cached JNIEnv objects.
...
FossilOrigin-Name: 02e868690f97ca728b0f2dd018aa79a9d13c85dd85b164caa895d319ae8f3ff5
2023-08-22 17:51:57 +00:00
stephan
a7e3a1c09b
JNI internal cleanups and correct two leaked db handles in test code.
...
FossilOrigin-Name: f927a30b5bba35991f472084ebaf02779e84c343a4e84f0efb3df7679ff212f8
2023-08-22 17:36:59 +00:00
stephan
9828aa223a
Move the JNI per-thread cache of NativePointerHolder refs into global space. This allows better-targeted mutex locks and incidentally eliminates the lagginess and post-run hangs in Tester1's multi-thread mode (presumably caused by deadlocks).
...
FossilOrigin-Name: e209f56a9745695aadc04418c7bebe62b79e38e5aee26c3248a30f73bfa460c2
2023-08-22 15:30:35 +00:00
stephan
0a102087d8
Move most of the per-JNIEnv global Java class refs into the global state, saving a bit of per-thread overhead.
...
FossilOrigin-Name: 7342bf578790e1a87c128a7c1c7745fe2e7c442890370feb160d406597d4d8ec
2023-08-22 11:34:34 +00:00
stephan
484f9bed4e
Minor JNI cleanups.
...
FossilOrigin-Name: b88910aaaaaaa0936974379bb3eb8a5a3a634395b14e67cc9030f8a520f471f1
2023-08-21 23:45:19 +00:00
stephan
1089277105
JNI cleanups.
...
FossilOrigin-Name: 0a84131008a2e7886dac64a3545dea634811f6eac2b90885ec9c61ed1e6544c3
2023-08-19 14:49:08 +00:00
stephan
6f92f35449
Merge trunk into jni-threading branch.
...
FossilOrigin-Name: 8254479c6ff1ea3cc9e56de1698db8405c03da90b9bf4c401182e47e0842baf8
2023-08-19 12:34:23 +00:00
stephan
bfa486d5fc
JNI doc additions.
...
FossilOrigin-Name: 0c7ac34f30e1f7e35a2ac4e5e55e5f24857b24afa81a7abecba60f1c9c68b9ff
2023-08-19 12:32:00 +00:00
stephan
187da43379
JNI test code cleanups.
...
FossilOrigin-Name: e202b6e69da8cced114d027cf2e91a04dfdd50b601b3274214783f7d750c558c
2023-08-19 11:52:36 +00:00
stephan
8d9179bd07
Minor JNI cleanups.
...
FossilOrigin-Name: 1cecb9e0383aa78c491f9ba88c831a88b4b2d40ceef1b87be494b6ddc0789e41
2023-08-19 11:26:52 +00:00
stephan
3cf6c0f276
Add multi-thread run mode to JNI Tester1. It works but hangs on exit sometimes for Java reasons as yet not understood.
...
FossilOrigin-Name: bdbaf7a4534f40e550b646979e67e7b7731566bb5a2631ed376ac85a9bec40a7
2023-08-19 10:43:05 +00:00
stephan
46d677e713
Replace JNI::NewStringUTF() for the remaining cases where output may be incompatible with MUTF-8. It is now only used when we know the output to be plain ASCII.
...
FossilOrigin-Name: 2d955eef25ab116c487ebc34c6f2d2836d310af239ef1993f5aeee5a3f68d590
2023-08-19 08:22:34 +00:00
stephan
383df02b16
Remove some obsolete JNI-internal docs.
...
FossilOrigin-Name: 00a2a3736a6dcde81d920815520040f3c47f965165e7128ca1f4062e6ec7c17c
2023-08-17 22:04:07 +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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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