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
drh
80c438613a
Minor cleanups in sqlite3Int.h. By reordering some fields in the Parse
...
object, it packs more tightly and uses less memory and less CPU to
initialize.
FossilOrigin-Name: aa6de539c09faa320b68c63659e602107145c4263fa680d5b40fe4d7d7ac4534
2023-08-08 17:36:03 +00:00
drh
73cdbeb632
Fix an issue in the amalgamation generator in which it was not correctly
...
expanding the SQLite version in the header comment.
FossilOrigin-Name: 293f6191e9b328cb8a8d3fff0f7bd5a6f5390b5ff090497a170c791b6ea22917
2023-08-08 16:53: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
786a9dcf5d
Enhance sqlite3_vtab_nochange() so that it works with "UPDATE ... FROM ..." statements. Use this to allow some updates on fts5 contentless-delete tables.
...
FossilOrigin-Name: 27ff86e4d8d251dbbcc9f0682d3d7b040518cbeee891cfe253661d1fdbec4e4f
2023-08-07 17:09:25 +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
47c5db7f77
Tiny doc typo fixes from [forum:31eb707250|forum post 31eb707250]. No code changes.
...
FossilOrigin-Name: 8ede50082e7bcf0226a3b42a590f188b5a139bbf081c9eed7ff8f6f2a6a274a0
2023-08-05 19:15:19 +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
drh
b87278f414
Fix a bug in the jsonLookup() routine used to search JSON. Bug was
...
introduced by the recent (unreleased) JSON caching enhancements
check-in [a4c1af616e672a0d] merged into trunk at [df099ad713011b67].
FossilOrigin-Name: ba7a66db13b28da0b41f03be825a593608474a5ebda89e12d58d89db709b8f65
2023-08-04 13:19:11 +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
drh
1050f1d2a1
Fix harmless scan-build warnings.
...
FossilOrigin-Name: 65a8716d8a1b7c5cffe9cdd25e4cbfa6528fcb146ff0fe67b0ce771b0537473d
2023-08-03 18:14:09 +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
drh
86d77fd95d
Fix build problems associated with SQLITE_OMIT_WSD and SQLITE_OMIT_TRIGGER.
...
FossilOrigin-Name: de031a5ec863b11f0216d1a114740c8cf4572adb034a5d35ff1a5c07d81df800
2023-08-03 13:30:00 +00:00
drh
038ac625af
Fix a test case whose value changes under the no_optimization permutation
...
due to the recent change to add the ability for SQLITE_TESTCTRL_OPTIMIZATION
to disable one-pass.
FossilOrigin-Name: 976e39c6322f9e51054546e2d9bc135b683d141054c645c9098002cdc310c7c7
2023-08-03 13:07:58 +00:00
drh
9b1334b7d3
Unix builds now assume the presence of nanosleep() in the standard library.
...
The -DHAVE_NANOSLEEP=0 compile-time option can be used to build on systems
(if any still exist) where this is not the case.
FossilOrigin-Name: 779d5dc8797ea246d0397f7e94b1be716b0baa735e8d9f5a6fc4cffd887a7420
2023-08-03 12:41:30 +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
drh
c874d60353
Performance optimization for JSON rendering logic.
...
FossilOrigin-Name: ea0b9aecbaca9a8e784fd2bcb50f78cbdcf4c5cfb45a7700bb222e4cc104c644
2023-08-02 16:06:02 +00:00
drh
d3229ce23e
Remove an unreachable branch in the ascii-to-floating-point conversion that
...
was added by [e989a37ff9d5b52e].
FossilOrigin-Name: c4347e4400e96f932ac12f8f22484a2ebce2a578d1b2181977954c432f117bfd
2023-08-02 13:45:16 +00:00
drh
b1dcebfea3
Stricter enforcement of the idea that a MATERIALIZED common table expression
...
is an optimization fence.
FossilOrigin-Name: 354425f8d97437bd156265a6914f98cce91b42abc9e773453ef4d817e308dc9a
2023-08-02 13:38:02 +00:00
drh
26cf4af5d7
Remove a condition from query flattening that is now taken care of by
...
the caller. Factor out the reverse_unordered_selects processing from the
main loop of sqlite3WhereBegin() for performance.
FossilOrigin-Name: f068f105fb158634321bf6401f0774c81059932d213a18b627ae98bcffc10912
2023-08-02 13:29:01 +00:00
drh
aa250db66a
Simplify the select.c logic that enforces the optimization fence around
...
a MATERIALIZED common table expression. Do not allow the
reverse_unordered_selects setting to affect a fenced CTE that itself has
an ORDER BY clause.
FossilOrigin-Name: 165b9bda243777ae7fb6f51ee7ad58771c581b82ef9a70268eb9764e9e6eba6f
2023-08-02 12:39:56 +00:00
drh
5e82c06cf8
Never flatten a CTE that is labeled MATERIALIZED. This is really something
...
of a bug fix because the documentation says that a MATERIALIZED CTE is an
optimization barrier.
FossilOrigin-Name: b7ef9796f548ce43e06673f86bbec68157aae5e4ee8451e1d87ee5f70af1bb27
2023-08-02 11:06:27 +00:00
drh
4178849736
When a query is inside an AS MATERIALIZED CTE, do not attempt the
...
omit-ORDER-BY optimization. If the developer specifies MATERIALIZED,
that means he wants the sort to actually happen.
FossilOrigin-Name: aa769ee7477171f26a091cadff98aa4f48da7752ade20b405a95c4525456f62e
2023-08-02 00:09:15 +00:00
drh
cbaef88980
Avoid ASAN warnings when converting over-sized long double values into double.
...
FossilOrigin-Name: e989a37ff9d5b52e0090d59be077ad2260c8df5d4c2c2d8088b1160de64dffd4
2023-08-01 19:10:30 +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
drh
b9894f88b8
Remove redundant comparison operator.
...
FossilOrigin-Name: 018984329892c243b21adb10aa8efc7f49313ecf80477e6b61dc6365f62c489d
2023-08-01 01:07:45 +00:00
drh
d192b4441d
Restore part of the UPDATE one-pass optimization that was removed by
...
check-in [2c56b984a0bd3be5]: only disable one-pass if the WHERE clause
contains a subquery. Allow subqueries in the SET expressions.
Fix for performance problem reported by
[forum:/forumpost/8ab195fd44e75ed0|forum post 8ab195fd44e75ed0].
FossilOrigin-Name: 42916af9fc0f379a608a08db894400bd735a28e26ab1ffd604d1fddfbdb3ec0c
2023-08-01 00:34:03 +00:00
drh
00d635dda4
Restrict the new column cache to table-btree, which is the common case anyhow.
...
That way, writes to indexes do not need to clear the column cache.
FossilOrigin-Name: 659284ab0e22a4746c1337b3489e7b166d497fb7e5301e24dc115d2b0c4e097d
2023-07-31 22:03:24 +00:00
drh
98ab970bac
The original column-cache implementation from check-in [ab1edcc7fedcf279]
...
(merged to trunk at [771fe35074b50b8d]) is unsound. This check-in fixes
the issue. Had to give back a little performance, the optimization is still
a overall win.
FossilOrigin-Name: ec95e970fb737adf0fab3cb4363040b036949e5eb966fc2d030a20f95e2bde60
2023-07-31 20:02:11 +00:00
drh
1f097a2f29
Add bit to sqlite3_test_control(SQLITE_TESTCTRL_OPTIMIZATIONS) that will
...
disable the one-pass optimizating in DELETE and UPDATE.
FossilOrigin-Name: 22f6dd5cd32ed9e7b932fdba98aa8652fde999df79f4995d3d8ac1acf430cf53
2023-07-31 17:39:36 +00:00
drh
c8c6763782
Improved debug tracking of the Parse.nQueryLoop value.
...
FossilOrigin-Name: 4a8a17498ecaccca5e5aab65d4596cbca9799547f50683237d08c1fa3556f1cf
2023-07-31 17:20:12 +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
drh
b47e1c7866
Do not try to add MEM_Term to an MEM_Static string either.
...
FossilOrigin-Name: 8920dcef1f75f578e3f274ab2b980a83d6ea6b761d99fc48410b26886170597b
2023-07-29 22:58:47 +00:00
drh
e809d84618
Do not try to apply MEM_Term to a MEM_Ephem strings.
...
FossilOrigin-Name: 2a378a66783ce4d749f7e1e7d08d8404a4aa78d47aeeefd6794b6753188438f6
2023-07-29 21:22:26 +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
drh
fb546c0bf4
Simplification to the sqlite3_stmt_explain() implementation.
...
FossilOrigin-Name: dd5eb4c7f71c658aff8c2f11ff163c5e79f0ebfd49fd13ca8e28381fe63cc82f
2023-07-29 17:05:35 +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
drh
0c6b869263
Enhancements to the new sqlite3_stmt_explain() interface implementation and
...
documentation.
FossilOrigin-Name: dc98ac6b6de27fc096a715e650067154a545709cf1eecd6c2722ab30a91c2d1d
2023-07-29 15:31:48 +00:00
larrybr
104e225074
Fix doc error noted in [forum:/forumpost/11fc7308d5e607f2|the forum] and a misspelling.
...
FossilOrigin-Name: 6b79cc7dd07d41da6034386b39c0dff32f80a977db42a9602330ffd15706ab9b
2023-07-28 21:38:50 +00:00
drh
3e053c50b4
Do not allow the same JSON parse to be input to both arguments to the
...
json_patch() routine.
FossilOrigin-Name: 8e781c6742792b3899ca60efc49c7eaee1df9f6b03d27c254b0e148b82946e19
2023-07-28 20:59:25 +00:00
drh
9a897cb0de
Merge the latest trunk enhancements into the wal-shm-exceptions branch.
...
FossilOrigin-Name: c44fb4d06591ef4872f015aa9e81ce8b93a38bd9143cf20db38cbe5c77a0d71f
2023-07-28 19:07:25 +00:00
stephan
33c8e9d233
Internal JNI binding docs.
...
FossilOrigin-Name: 991c66197e4dc7297fce3b20a1b4846873bcd4ce8add36aac71bd2e0e73c207b
2023-07-28 18:44:11 +00:00
drh
58b5921ca4
Add the sqlite3_stmt_explain() API.
...
FossilOrigin-Name: 0443c0ef85f8f6f3efdee68bf59126c9459f08a58458756f8cbeeaf043d43a86
2023-07-28 18:37:13 +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
58bf53d573
Minor tweaks to the JSON performance measurement documentation.
...
FossilOrigin-Name: 0bed957e46aa3bf6a70292ae100de0459486c1469dd03de61207a708cc59a594
2023-07-28 16:12:39 +00:00
drh
f69084aaf7
Fix minor typos in the JNI README.md file.
...
FossilOrigin-Name: e21cf2e8f13465dbff33f9c21580752c1d8c077d6a253f56f04dab0d47eb99b8
2023-07-28 15:58:09 +00:00
drh
8a056d486f
Enhancements to the JSON performance testing scripts and instructions to
...
cover the recent optimizations involving updates to large JSON strings
that indexed.
FossilOrigin-Name: f9213289d09adfb0461d9644e80c7e889f4bae51563ae2e575a2c95336052bcb
2023-07-28 14:20:31 +00:00
drh
859dd4fc2f
JSON performance improvements: (1) Add a cache for large string values
...
on OP_Column to avoid having to extract the string multiple times.
(2) Internal JSON caching improvements.
FossilOrigin-Name: 771fe35074b50b8d4a6583e61c53871b2445f7a58c82f3fc3bf6776e562e63af
2023-07-28 13:52:08 +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
drh
b1926192fa
Mark an unreachable branch as ALWAYS().
...
FossilOrigin-Name: 8fd06d1151c521515d9f7181575a04e451b522335135a27248052b067d4005ae
2023-07-28 11:30:07 +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
drh
93269a9e41
Remove some unnecessary and incorrect code that was mistakenly added in the
...
previous check-in.
FossilOrigin-Name: d3f458dcc379dd7648262f52579ec55ba931852065ed278367a0629228d0ed45
2023-07-28 00:54:38 +00:00
drh
caf7e26c4f
Switch to using jsonParseCached() for json_patch().
...
FossilOrigin-Name: 2ed9c59e6a51037e63485d0a92dae25443116beddfca1ac73d2f5d5be38d4ad3
2023-07-27 23:51:36 +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
drh
6bc4baf313
If the input JSON to a json function that uses cache comes from an RCStr
...
value, then use that RCStr value in the parse rather than making a copy.
FossilOrigin-Name: 509ae9c1470dd79d320e84371e1e6662fb85fa0571df5ed8c4d946d10cdfe821
2023-07-27 20:28:29 +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
drh
594f5e24c4
The OP_Column opcode caches large column values coming from overflow pages.
...
FossilOrigin-Name: ab1edcc7fedcf27922d5db4bc1bc673b1495ca9c66eb6debdda7b7776c068888
2023-07-27 19:39:53 +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
drh
95daf355a7
Merge trunk enhancements into the json-opt branch.
...
FossilOrigin-Name: 5739a16ad270a5aadcbb46b28c34fa6ba975422788dcbccb1a8e0d1e6ed75144
2023-07-27 18:19:46 +00:00
stephan
9fcca3d27c
Dynamically determine whether the wasm.xWrap() argc check can be applied, depending on how the wasm environment exposes its exports.
...
FossilOrigin-Name: fd59226b34fffb1479fb2d7bd7c0aff982aa4a1a73e6c0d81de6eaf9c075998c
2023-07-27 17:50:10 +00:00
stephan
4cfd54256d
Accommodate a breaking change in emcc 3.1.44.
...
FossilOrigin-Name: 2c5dd34199f5bcf729be814b8b46d9997821fe3a39ab12779c93df1bb2fd108d
2023-07-27 01:38:19 +00:00
drh
93853a4846
Fix a performance regression in JSON associated with generating small
...
snippets of JSON from a larger JSON string.
FossilOrigin-Name: 837f2907e10b026f6db1ca2d44b4bf60a6f069bf534bf369ad9b5c513cb0c6e4
2023-07-27 00:21:59 +00:00
drh
e94e132994
Reduce the number of memory allocations when parsing JSON.
...
FossilOrigin-Name: 9edd67162113df57dae21d4683f9495611e2cf4717c6d12f5b7b8e44156d5fe3
2023-07-26 23:22:32 +00:00
drh
f7a164f345
Minor changes to make coverage testing easier.
...
FossilOrigin-Name: ec8b43382e5402e15d9f2dda3cf21ac8be8c1589ddbe6c9433c33eef0036f764
2023-07-26 21:53:09 +00:00
drh
3f3dc2f5d8
Change a switch() case to default for coverage.
...
FossilOrigin-Name: 04f497074b9210326030f36107a43d6490a2a59c8a574e2c5429cd9bde681bf7
2023-07-26 19:22:43 +00:00
drh
beb3fb6904
Make sure jsonReplaceNode() always leaves the JsonParse in a consistent state even if an error is encountered.
...
FossilOrigin-Name: 01d52232dd6fbd253e77419a17df3df83d49434792d288ef96e14739a89cef3b
2023-07-26 19:11:47 +00:00
dan
5e22dfb6a5
Add a comment describing the contents of the ExceptionInformation[] array for win32 EXCEPTION_IN_PAGE_ERROR exceptions. No changes to code.
...
FossilOrigin-Name: 8e20354242d5f34a90b6c00d9034535ef6f6086ee4971230c7fd69985e2777d2
2023-07-26 18:34:34 +00:00
dan
5028dd89ab
Add the ".scanstats vm" command to the shell tool. For profiling VM code in SQLITE_ENABLE_STMT_SCANSTATUS builds.
...
FossilOrigin-Name: 0cbec3990d4101142bfb831f8e6527b73baabebbd30fa7f59275b217dbce6a8d
2023-07-26 17:51:05 +00:00
dan
a1016b4275
Improve the output when ".scanstats vm" is enabled.
...
FossilOrigin-Name: 7df08fd35e9d4bc471aa9fbc4c81d2ebcfd2be6c4c38143342b3d9d727c9df22
2023-07-26 16:41:23 +00:00
drh
9095063e14
Improved caching and reuse of JSON parses.
...
FossilOrigin-Name: df099ad713011b67b09cb1e5f0fa2e6b45f9cee0ce9d3c118c5dbca3563d20a5
2023-07-26 14:18:06 +00:00
drh
7286c59896
Change the debugging "json_parse(X)" function so that it shows a more
...
complete description of the JsonParse object on standard output and returns
the mimified JSON. Former behavior was to return the text of a decode
of the aNode array.
FossilOrigin-Name: 1bf85d4e388714a88f8940dcdec353c3e0267456697eff6963d34637912aecc9
2023-07-26 13:17:43 +00:00
drh
2b57197066
More comment improvements in json.c. Do not run jsonLookup() following
...
an OOM error.
FossilOrigin-Name: cd5fda8c2e354da7458b7c1a82ff18c5946f8dab16095bb0293bec57f6804f17
2023-07-26 11:53:14 +00:00
drh
7725370ff4
Improved comments and other cleanup for the changes on this branch.
...
FossilOrigin-Name: bac953a80d1a541e7a12aef00c86c002133859237143ad670b39ea19799a8900
2023-07-26 11:43:39 +00:00
stephan
8c7ee455ff
Remove the batch SQL runner from the JS build's 'all' target, as it's long-since unused and adds noticable build time. Add makefile comments about JSPI.
...
FossilOrigin-Name: b8f708e35d4fa027d12089ac7c5589c36da5f68b98cf9792bb11276bf233a860
2023-07-26 11:41:41 +00:00
stephan
aef4fbf203
Add SAHPoolUtil.getFileNames() method, and tests for it, per [forum:a3da1e34d8|forum feedback]. Add a test to demonstrate that two SAH pools can coexist so long as they have different names.
...
FossilOrigin-Name: 72dc3f8c3255186ec412412b685b0b51ddcd08240f2353ac742fc7da8c23568e
2023-07-26 11:11:39 +00:00
drh
9a184daad3
Fix jsonForceRCStr() to also add the NULL terminator.
...
FossilOrigin-Name: 134b01f37f8f741d7f7b7eda81384695d1cbe4c39751d87f08832d5c9afdcef2
2023-07-26 11:00:47 +00:00
stephan
3ba6914121
Reformulate [907dfc4a7aa1] using awk instead of sed for better cross-platform portability.
...
FossilOrigin-Name: 82ff7cc6a4b0331677be87bc069da414a56fd531bae402d0f0808b5d2b0d45da
2023-07-26 07:57:55 +00:00
drh
a757026c5e
Merge the latest trunk fixes into the json-opt branch.
...
FossilOrigin-Name: ef4e1664d159b98854d9aa580b0bb942f1726f32a190e2ea659c171131ddce9a
2023-07-26 01:15:34 +00:00
drh
02e683e467
Add the concept of an RCStr string - a "Reference Counted String". Use
...
these to keep track of big JSON strings that might need to be used in
multiple places at the same time with different lifetimes. Add two
different JSON string values to each parse - one with and one without
changes. The net result is a large reduction in the number of parses
that occur when doing an UPDATE of a indexed JSON field using
json_replace() or similar.
FossilOrigin-Name: a4c1af616e672a0d4d04f2652e645617758231598fb7161b956883512303ae87
2023-07-26 01:12:08 +00:00
drh
44f53b9647
Extend the enhancement to json_set() and json_replace(). Clean up cruft.
...
FossilOrigin-Name: 2dbb22c75e86f2e3ced38ac14b4943570d5c2f86cd5e37e875bf0c863be28836
2023-07-26 01:05:08 +00:00
drh
0f200bc580
Add the JsonParse.zAlt field to old revised JSON text after a change.
...
Demonstrate that this elminates the need for reparsing after a change
by using it in the json_remove() function. This is an incremental check-in
containing lots of cruft.
FossilOrigin-Name: f930b139d6db0ee799bc90397b225175103c4bf22923d1c9cbcd32509adc1738
2023-07-26 00:48:45 +00:00
drh
59b8e666f6
Clarify ownership of the various objects involved in parsing JSON.
...
FossilOrigin-Name: afe02a398a16d51bd7482b6fbe2fbd15d9ac4fd9cdbc9d2bf81f38b3391fc567
2023-07-25 20:26:47 +00:00
drh
440e696d5e
Incremental improvements to JSON parsing - trying to fold in the RCStr object.
...
FossilOrigin-Name: 4cb15d934a85ebc290fe6dd8cd3bd47b159561ca75d72bbffef30b9ea4623b09
2023-07-25 18:28:03 +00:00
dan
0c39b13e46
Fix a harmless "set-but-not-used" compiler warning in sqlite3session.c.
...
FossilOrigin-Name: 54b3c43fdfdaca6b129a5f0ee93c34eb001663775d33c087066650f5e164d1c1
2023-07-25 17:54:25 +00:00
dan
cbf4a0fa8e
Merge trunk changes into this branch.
...
FossilOrigin-Name: 719973d7f5a47b110e9919fcb96d21feab1e41356dbb3ec674c1116c17bbb778
2023-07-25 17:11:29 +00:00
dan
5326953e57
Add extra test for 'deletemerge'.
...
FossilOrigin-Name: bc33cff4203cef12518e0f43d380a06d53d67c725fb96cfe6e934b7dc97a7efd
2023-07-25 16:48:54 +00:00
dan
3f874b58fb
Change the name of the fts5 'delete-automerge' option to 'deletemerge'. And add tests for it.
...
FossilOrigin-Name: 1079300db2a7d1fbc86a01c215c234a3af64889c5396e6da63ff4f3c7efae4c5
2023-07-25 15:48:58 +00:00
drh
4bca124845
Fix a minor problem with error reporting in JSON.
...
FossilOrigin-Name: c456e4a8999066cd96246327101b3cca78294511a71a2ac07939bb702bfcb5f4
2023-07-25 15:43:01 +00:00
drh
f02cc9a324
Create the new RCStr class of strings and try to use them for JSON storage.
...
FossilOrigin-Name: c1b8725089bb3d006ec69add28f4fcb3f4e79412c7f438b5b1067c2227e77b9c
2023-07-25 15:08:18 +00:00
dan
039d494d5f
Further tests for 'delete-automerge'.
...
FossilOrigin-Name: ca26c7a37a7e680be633f43be28f8877bdf9917448ea51c3bedc9b2352a00601
2023-07-25 13:53:42 +00:00
stephan
322a325703
Reformulate a (sed -i) construct in ext/wasm/GNUmakefile to account for Mac's sed -i being different than GNU's.
...
FossilOrigin-Name: 907dfc4a7aa129cdcedeb3ba2d75e1b68a8f22c2545ee1c8cf7d705041644e5c
2023-07-25 12:26:05 +00:00
drh
b715fe9d80
It is an error to try to insert a BLOB value into JSON.
...
FossilOrigin-Name: 28c6e964b1e2257527df02b352f02e135f7c4b764b8b41eda6461f9538f5d042
2023-07-24 23:27:05 +00:00
drh
3d2a559ecb
Clean up some #defines in json.
...
FossilOrigin-Name: 327fff501e36f75d4901c520123c5ca45e0e0da1d9cc8fa8fa877ceb68c686d2
2023-07-24 22:45:59 +00:00
drh
27553579c0
Rework the JSON parse structure to facilitate better caching. Passes all
...
tests.
FossilOrigin-Name: ecdcb1ded76e9a0591bf7a2009679f49fc3aa639d3cc12406c6d29243ed8e1c5
2023-07-24 22:34:26 +00:00
dan
24730de8d1
Add the fts5 'delete-automerge' integer option. A level is eligible for auto-merging if it has a greater than or equal percentage of its entries deleted by tombstones than the 'delete-automerge' option. Default value is 10.
...
FossilOrigin-Name: b314be66b9ac0190b5373b3b6baec012382bc588c2d86c2edab796669a4303c3
2023-07-24 19:13:06 +00:00
drh
9125d5ab6c
Incremental progress toward improved caching of parsed JSON.
...
FossilOrigin-Name: f2c063884685a79d5a787590447c292f51e898a98c9508159c788f505227ba85
2023-07-24 17:59:25 +00:00
stephan
c76a8862a7
Resolve an ES6 module export construct which is incompatible with node.js, as reported in [forum:b9680fa9ad|forum post b9680fa9ad].
...
FossilOrigin-Name: 80927c3913561dddf75cf73be871d93ae06b16f83e8cc36fc360765014209615
2023-07-24 15:41:58 +00:00
drh
5202b7ca75
Update the latest trunk enhancements into the wal-shm-exceptions branch.
...
FossilOrigin-Name: 3187ee3f69fc28a259ba0e951ac10a65c07ef2c3866acbefaf9544333a930cc6
2023-07-24 12:59:53 +00:00
drh
7d70571142
Merge the latest trunk enhancements into the json-opt branch.
...
FossilOrigin-Name: 00bfc4918be49ac74a3e7851c88ab7ec226e6a37853f8ad4c77f758751960456
2023-07-24 12:37:23 +00:00
stephan
479cfd5af3
When writing the filename header in a opfs-sahpool file, ensure that all remaining bytes in that part of the header are zeroed out to avoid the downstream problems reported in [forum:d50ec48a293988a5|forum post d50ec48a293988a5].
...
FossilOrigin-Name: c1b080e39397c983c13a5e79303223827de7b4946c18a79396851ec1814782f3
2023-07-23 22:14:41 +00:00
stephan
2ecadd8869
Add the opfs-sahpool sqlite3_vfs implementation to JS, offering an alternative to the other OPFS VFS (with tradeoffs).
...
FossilOrigin-Name: d2e602cda44bf35e76167143262b4f91826d25780d0e095e680a31d5dedb2018
2023-07-22 19:57:42 +00:00
dan
2159292ce0
Integrate contentless delete with auto-merge.
...
FossilOrigin-Name: 85c1589ab1fc69d1eef4bbc1bdefa2b10af5f6b9c08e813130b93829b592f416
2023-07-22 19:47:46 +00:00
drh
5d03b1610f
Do not read past the end of a text buffer looking for a zero terminator, as
...
that space might not be initialized. If the buffer is owned, just set the
null terminator. This is a better fix for the OSSFuzz-detected
use-of-initialized-value problem.
FossilOrigin-Name: 931bccb0cc290b8bf3027641e7a7fac30e3244d7dc84aa9e38b24b7e9544ca06
2023-07-22 16:37:28 +00:00
drh
61a5b6e3bc
Fix a harmless use-of-initialized-value warning from OSSFuzz that results
...
from recent large string optmizations.
FossilOrigin-Name: 1a6b3dd1c40277a0d0f0bb562ddc4868aadd632fc2d29be1b17bb33fc22c46c8
2023-07-22 15:21:41 +00:00
drh
b2ee272075
Performance enhancements for queries using very large string values.
...
FossilOrigin-Name: 3661b9cd98565ea23b0cafd030668f09885dcbd54eb12b7b3cd85c289aef4c3c
2023-07-21 22:28:34 +00:00
drh
21f22f9088
Mark an unreachable branch as NEVER().
...
FossilOrigin-Name: 414a4d660c3b505640227066b468db1268fcb1bd3fad931644a769617c6c00cd
2023-07-21 22:22:13 +00:00
dan
330e36c2c6
Fix fts5 incremental optimization so that it too can handle an index that consists of a single segment with one or more tombstone hash pages.
...
FossilOrigin-Name: e61c9b083f5e0b6b6ee18f9394581ad816f445dbfb72ed1fe954f4182755a576
2023-07-21 21:10:33 +00:00
dan
4e0c157d02
Ensure the fts5 'optimize' command correctly rewrites any index that consists of a single segment and one or more tombstone hash pages.
...
FossilOrigin-Name: f4926006b371d9a1439a25384bd50a50c2f1c03f75a7c2c3134ae72abb971c91
2023-07-21 19:33:35 +00:00
drh
89f07b1276
Fix harmless compiler warning introduced by the previous check-in.
...
FossilOrigin-Name: 06f829e9e57c5aa495f519ad7bb379be611e8e21ef60d36e63d055e45f7a6117
2023-07-21 19:17:26 +00:00
drh
028acd974f
Avoid a potentially large strlen() in sqlite3DecOrHexToI64().
...
FossilOrigin-Name: 5413b02bb629b9cbb76f7e688e94ebcf24276c01436d3feb73ff57c036e1d2aa
2023-07-21 18:38:59 +00:00
drh
569700a72e
Further improvements to large string handling in relation to JSON.
...
FossilOrigin-Name: 1e5df0aa3dae5cadbf1d07c718ae2a5212543300b68e49d35e8c96855a7f619c
2023-07-21 18:09:07 +00:00
drh
eee8687a9f
Fix harmless compiler warning about signed/unsigned comparison.
...
FossilOrigin-Name: 75cc3c89ee2dcfefa9421ce60bee77e85d2895918e8c5cfd05c434f8932a99b5
2023-07-21 15:07:56 +00:00
drh
7a2280fe65
Multiple optimizations that try to preserve or infer the zero-terminated
...
property of TEXT values. Avoid unnecessary copying of text values destined
to become function parameters. All changes help improve performance of
doing UPDATEs on large JSON values that are indexed multiple ways.
FossilOrigin-Name: d0278cdedfa04fb0b61838ab9622be8a2c462f58d5c3ebc4c5f802a727d0974e
2023-07-21 15:01:53 +00:00
drh
c8f4fec2de
More infrastructure changes towards improving JSON cache performance.
...
Incremental check-in.
FossilOrigin-Name: 1955e66cfc4614df97b8d68b0e662f309513d62dc8aeec71af5a54e66b79c707
2023-07-21 11:09:53 +00:00
stephan
bfe6dd0100
Minor internal cleanups in the opfs-sahpool VFS.
...
FossilOrigin-Name: 74ad31e2908af8225b7aa527dbcd1877423d58163e365317a78453b31e322ea3
2023-07-21 10:51:35 +00:00
stephan
3068d6622e
Internal cleanups in the async part of the JS library bootstrap phase.
...
FossilOrigin-Name: b6d57ab63793241a500ea527c5b3216c54b3ff1972d3adbbf42a9a53bfec0aa1
2023-07-21 09:10:42 +00:00
stephan
35325a37ce
Minor internal cleanups in JS code.
...
FossilOrigin-Name: 21a2ca9fc46bf746874579897872e2a45cb07f278abb670dd22b122f7d6a9a6c
2023-07-20 23:25:32 +00:00
dan
3a51f8c307
Fix some divide-by-zero errors that could occur when handling corrupt tombstone hash records.
...
FossilOrigin-Name: 7567ca0676f0d45026f5cd4f3fbcd09119c2eaab8ec1711499609c16c452b5e4
2023-07-20 20:29:56 +00:00
dan
d6f5aa824e
Avoid an infinite loop that could be entered when dealing with corrupt fts5 tombstone hash pages.
...
FossilOrigin-Name: 69ce2ce035279f2a00c2238187cf4d2a9092c3410f5900e4613fe4e46311169e
2023-07-20 20:09:26 +00:00
drh
51d7869096
Experimental framework upon which to build a better JSON parse structure that
...
supports cached of modified JSON. All of these changes are tentative and
subject to change or removal. Incremental check-in.
FossilOrigin-Name: e384163a4763c10b5838cbf28f9c4d8ea799bbbed6e890e8aa91b2bd1458646d
2023-07-20 17:45:09 +00:00
dan
0b3791b537
Add tests and fixes for the new code on this branch.
...
FossilOrigin-Name: 5aac50e92e956b15367c75c20c17bc1c75e84e2752bfffe4ad0a266cb9bd3b8a
2023-07-20 16:07:04 +00:00
stephan
0b518b8d65
Filter the OPFS VFSes out of the sqlite3-node.mjs build. Add another level of subdirectory to the sahpool to later enable transparent support of client-provided files under the VFS's root dir. Rework the awkward sahpool-via-oo1 mapping.
...
FossilOrigin-Name: 080a4d0aba30d8f3802b49be4a113205f069b3bdea8cebf525d654055642ff62
2023-07-20 09:06:42 +00:00
drh
f9bfc32b73
Performance enhancements to the JSON parser and code generator.
...
FossilOrigin-Name: 0a745897d66e9f36ea6e787fad54f0c413d52c226dc96fad36ccd33a0aa1930e
2023-07-19 23:02:45 +00:00
drh
93b3c1f398
Revise the new JSON parser performance test to make the test run 25 times
...
longer, and thus provide a more repeatable number.
FossilOrigin-Name: bee9e403ae47103938aabb9a7a7e120dfa741b464875965e58788a51fa56a8fe
2023-07-19 20:23:34 +00:00
drh
5e4d77fa88
Describe JSON parser performance testing procedure in test/json/README.md
...
FossilOrigin-Name: c47056e158073ee746c233dd2729cf224ea9e38821b15aa71ebf97607e602281
2023-07-19 19:23:30 +00:00
dan
d1fbaa071b
Fix various issues with code added to this branch.
...
FossilOrigin-Name: 8d09011fa2c6ae9cc88e1766f9aad4578efbf9e0e311b8c6efdffe7a3f88f923
2023-07-19 18:47:02 +00:00
stephan
55f318e53f
More internal refactoring and docs for opfs-sahpool.
...
FossilOrigin-Name: 64ccf6177a019eab46fb3345ad1e8ba80eaf2c9da55767031f9f04ccd16afb4d
2023-07-19 17:47:02 +00:00
stephan
96cb7007a9
Update the development-over-ssh docs for the wasm build.
...
FossilOrigin-Name: 500109bd0a4c134b91c37f397ff1ee828e09c17f7ecd153f975ede748caee7bb
2023-07-19 17:46:28 +00:00
drh
50834d8b74
Further improvement to JSON parser performance.
...
FossilOrigin-Name: 144c8ccf6e5bb2527dd98742f0d67e0a16c627e7c67f754ce8ed4c4fb5b8d8b6
2023-07-19 17:24:36 +00:00
drh
8376ae7295
Further performance enhancements to JSON parsing and rendering. Total
...
performance gain for large JSONs so far on this branch is about 11%.
FossilOrigin-Name: adb4d6b007cbe9d7c9670f5fc196443ebe0f3a89df1f3290ba6247fcf83fe5bd
2023-07-19 15:06:29 +00:00
drh
7a816e771a
Performance optimization for parsing large JSONs that contain lots of text.
...
FossilOrigin-Name: c9fbe0185cd5d64950724b00cd0bfb3a7939a985040465a0f35f445acb6e94a6
2023-07-19 13:50:31 +00:00
stephan
eafb4418a0
Major restructuring of opfs-sahpool to improve maintainability and hopefully make it easier to reuse these pieces in the upcoming JSPI-based VFS experiment.
...
FossilOrigin-Name: 534481cd0c2e6f62dd0a82f25d4b78fdcc671eb70d6966693c98212a6420891c
2023-07-19 13:31:29 +00:00
stephan
cd302a5e32
Appearance and legibility improvements for tester1.js.
...
FossilOrigin-Name: 4fd3ed1b6405f690825c9993e56b199d4a7fb497cf9131815c803150b8b96528
2023-07-19 11:33:52 +00:00
drh
47079b19df
Merge the latest trunk enhancements into the sqlite3_stmt_explain branch.
...
FossilOrigin-Name: 06eae046c1a1155f22590b88942db72f01482f2363da9753f8adfdb322679055
2023-07-19 10:17:42 +00:00
drh
37fd50df1f
Two minor improvements to sum(), one of which was inspired by
...
[forum:/forumpost/af5be98dbc|forum post af5be98dbc].
FossilOrigin-Name: a0d3e7571aded8d1e03908059d2d5aa5d62ec49bff099cb38f6f35df5e4b18b5
2023-07-19 09:52:10 +00:00
stephan
780bc4c557
Internal refactoring in opfs-sahpool. Move OPFS tests to the end of tester1.c-cpp.js.
...
FossilOrigin-Name: 6bd5a7413dd830ca41b587a2826fb599a2196fb0186646a2333500f950b3cf4d
2023-07-19 08:18:25 +00:00
drh
9246c85b61
Do not use the [/info/609fbb94b8f01d67|viewscan optimization] on a query
...
that has only a single loop, as the cost adjustments can cause problems
for outer queries. Proposed fix for the performance regression reported by
[forum:/forumpost/64d36440e473516c|forum post 64d36440e473516c].
FossilOrigin-Name: 76152ad2ffe56034f2fd93d9a1ce9358e1677a7e9cd3dcd9f3a34a5c956a463e
2023-07-18 21:06:19 +00:00
drh
6a9be2cbc7
Improved ".wheretrace" for the VIEWSCAN optimization.
...
FossilOrigin-Name: 27057ea76b5f72c73fb6f16094736685019643c665b49fd0bb8d60a812ce2338
2023-07-18 20:41:09 +00:00
dan
d05bf0fe61
Fix various problems with fts5 contentless_delete=1 tables.
...
FossilOrigin-Name: 0d005112b8aca9e9eca9d86d5fed9168f6a0218fd290b5489b9e7b05714610f4
2023-07-18 19:52:32 +00:00
stephan
aed5abcc0f
More opfs-sahpool tests.
...
FossilOrigin-Name: 60713fa9c4627ef17e0b8778eee37913d2b930c5a06414721a00af30e1395090
2023-07-18 19:47:19 +00:00
stephan
0649a1a05d
Fix a shadowed var in opfs-sahpool and add more tests.
...
FossilOrigin-Name: 9c8a73aff0f291e0c18072372e0d8961d3a05910489598d0d342227d99871954
2023-07-18 19:27:11 +00:00
stephan
b0dd9d427f
Further refactoring of opfs-sahpool and start integrating it into tester1.c-pp.js.
...
FossilOrigin-Name: 91c789234963b660ae900f0738906b28a477993709e286d8125b2f4d6101601c
2023-07-18 18:52:41 +00:00
drh
3f47e7551c
Merge the FTS5 memory leak fix from trunk.
...
FossilOrigin-Name: fb65cb73d7ea22a8b20dccfa3abdaaa809eee4fcee6fe4846bd2e598ceb49aa4
2023-07-18 17:43:47 +00:00
drh
d1db37a2f3
Enhance the sqlite3_stmt_explain() interface so that avoids unnecessary
...
reprepare operations.
FossilOrigin-Name: 050f773addd605f6690348c98e9000a9a3663bbc26288a71973fd7b40468e8ab
2023-07-18 17:29:05 +00:00
dan
a5b1f34125
Fix memory leak in fts5 introduced by [def41225].
...
FossilOrigin-Name: 4dcad2db743fdb9ef72871ca5a4d1384f76cb697161b0f5110e2670a83a18e8a
2023-07-18 16:29:34 +00:00
stephan
d69e6e6efb
Major restructuring of the opfs-sahpool bits to better support multiple instances per app (each sandboxed from each other). Eliminate the pesky promise resolution race condition when two such instances are loaded in parallel.
...
FossilOrigin-Name: 95e5fa498f71708caeb3394636c4853530a8b2d54406e503f32750732d6815d5
2023-07-18 16:24:51 +00:00
dan
cb1d6b997e
Merge trunk changes with this branch.
...
FossilOrigin-Name: 5f66eb4e2603278dcc9dbfe4bf506cba1aa03180cfb492a0dfc3a8be32cc994b
2023-07-18 13:55:55 +00:00
dan
263a8e8c0a
Fix a buffer overrun in fts5 that could occur in 'secure-delete' mode when dealing with corrupt database records.
...
FossilOrigin-Name: def41225b2f10b0294ab506f28bc87873688d4030f7056839298ff18e058ece5
2023-07-18 13:55:19 +00:00
stephan
dec4cea24c
Refactor opfs-sahpool to support multiple instances, each with a separate VFS name and directory.
...
FossilOrigin-Name: d036eaf6ac60c576428db40f015733c5d5425f7d613194fd8d9d4d98659077c4
2023-07-18 12:09:16 +00:00
dan
2cccced140
Fix cases where a row is inserted into a contentless_delete=1 fts5 table and then deleted within the same transaction.
...
FossilOrigin-Name: d928856a226fb7f001e55ff7e8eb58a656b982f1efa811de46c382b8b7cd778c
2023-07-17 18:40:39 +00:00
dan
55e0fd4a9d
Do not allow the 'delete' command to be used on contentless_delete=1 fts5 tables.
...
FossilOrigin-Name: cc694b83408ccb5d42204cb624145c76e95329cbe1d1fe8815c70a7a00af231a
2023-07-17 17:59:58 +00:00
dan
24433bea19
Merge trunk changes into this branch.
...
FossilOrigin-Name: c4fb2f2ea0afe638fd7cffd89fbdb0a91589577c6f8299c7bbc17ac121be518b
2023-07-17 11:47:42 +00:00
stephan
99d4a2db46
Another -DSQLITE_TEMP_STORE=3 to 2 change for the wasm build.
...
FossilOrigin-Name: 5ad8f9987c11b5db67edd69a3471ff388140d6268d5d3f5a05dec6bb6d92ac05
2023-07-17 07:43:04 +00:00
stephan
ed640943c4
sahpool vfs: rename defaultCapacity to initialCapacity, per feedback.
...
FossilOrigin-Name: 2c9c95d087c7db2a975ffae15af5ade621411c493145b889f0c9157a55c4952a
2023-07-17 07:14:12 +00:00
stephan
2bf2ff605f
Change wasm build's -DSQLITE_TEMP_STORE=3 to -DSQLITE_TEMP_STORE=2, primarily so that clients can optionally shift temp files from memory to OPFS storage.
...
FossilOrigin-Name: 764430e804332b8f7b2f63a3c0c8acf8f6cc92534858d89de2d310938c1c0d27
2023-07-17 07:13:44 +00:00
stephan
039081123c
Remove an extraneous JS script import.
...
FossilOrigin-Name: 5a205b25912f3feea594a2161a4b8f3955bd29163b39cb0e621b3abdb81fc24d
2023-07-16 21:07:01 +00:00
stephan
8d67d501e3
Add sqlite3-vfs-opfs-sahpool.js to ext/wasm/api/README.md.
...
FossilOrigin-Name: 58d05201042804c682a417495f13ab47a535e353da6cc307f9d726a289e71ca2
2023-07-16 20:42:19 +00:00
stephan
1ff2903785
Minor doc tweaks.
...
FossilOrigin-Name: 0cb0d7a9e73e48406f146ebebf211311fd0a0b14b285f0af9e2b645c3d2f172a
2023-07-16 20:20:03 +00:00
stephan
d703d25a35
Correct a missing assignment. Minor doc additions.
...
FossilOrigin-Name: 1c4957d0ef23ff14d4f7bfb33a809dd92712ee9faf77b6052f823eb55de15cf6
2023-07-16 19:29:50 +00:00
stephan
a34f27daed
Doc tweaks only, no code changes.
...
FossilOrigin-Name: 044c28dffd45f7c4484686995edd4a1b92151450743968e7d0f662b5c850aa6b
2023-07-16 19:20:45 +00:00
stephan
24873723f4
Add a way to remove the opfs-sahpool's persistent state from OPFS or unlink() an individual file. Doc cleanups.
...
FossilOrigin-Name: 80982daac3c098033dbc249bb7a17ef84ae218d2d789f8644e7f4af18b553d24
2023-07-16 17:51:43 +00:00
stephan
da6a42a921
Move SAH pool configuration options from the library-level config to a config passed to the VFS install routine. Extend and document the PoolUtil object.
...
FossilOrigin-Name: d2ed99556fa1f40994c1c6bd90d1d5733bebc824b1ebfabe978fae9e18948437
2023-07-16 16:52:09 +00:00
stephan
d62c464541
speedtest1.js: only install opfs-sahpool if it's provided via --vfs flag, to avoid locking errors in concurrent speedtest1 tabs with other VFSes. Add opfs-sahpool reserveMinimumCapacity().
...
FossilOrigin-Name: aa94c8abfbdfc4c7b36554c4b3ea90a5065e7e3f4294c64c8cbf688b4688300d
2023-07-16 14:07:59 +00:00
stephan
aa1b2a80ee
During "opfs" VFS init, check for URL param opfs-disable and, if set, do not install the VFS. Added per forum suggestion to provide a way to help rule out misinteraction between the "opfs" and "opfs-sahpool" VFSes.
...
FossilOrigin-Name: 29905b7a75b73e32125bf9116033cae7235a135b668a3b783a3d8dcb0bc80374
2023-07-16 12:02:37 +00:00
stephan
8449dacbd4
Micro-optimizations in opfs-sahpool.
...
FossilOrigin-Name: 52f23db948ae9694df69c00177b85cb569e9b211350a4a2dbf249e7cd8de700c
2023-07-16 11:49:18 +00:00
stephan
d0ae50411f
Redefine what the opfs-sahpool installation promise resolves to. Fix addCapacity(). Add utility methods to import/export files.
...
FossilOrigin-Name: 809c6f4de3653ad7a7751af45a7a0d6cb20c3ee3be80c69833c729242227d970
2023-07-16 10:02:41 +00:00
stephan
28d46cce0b
Minor cleanups in the opfs-sahpool VFS.
...
FossilOrigin-Name: 279e09070918dab7b60c39179ebb7eb931ca6bd4e589b414f436740499a2f910
2023-07-15 21:08:48 +00:00
stephan
38d1db9b79
Correct opfs-sahpool VFS after the pebkac involving the previous speedtest1 runs. Make that VFS explicitly opt-in to avoid certain unfortunate locking situations.
...
FossilOrigin-Name: 41bf1fe31f2f3d0daa2bac25dc57262a4b90f22fed6fa97e4e92467c32ae02dc
2023-07-15 19:08:58 +00:00
dan
0dac350f3c
Store large tombstone hash tables in multiple database records. Ensure the same hash tables handle rowid 0.
...
FossilOrigin-Name: 4410e60d0c76e057ee962124f9239c6e17fd5ccafdbb4d9b703448eabd7781e3
2023-07-15 18:57:57 +00:00
drh
e393f6eff0
Add the experimental sqlite3_stmt_explain(S,E) interface.
...
FossilOrigin-Name: 5683743ddf0bb051f2fe5d137cc18407e000e77e9faa9010a22e3134b575638b
2023-07-15 16:48:14 +00:00
stephan
eadabc6513
speedtest1 JS: only add --memdb flag by default if no --vfs is provided.
...
FossilOrigin-Name: 676ffe6280c1ce787b04d0cdb4a0664229c6125c601af4b18d1bfa125aac3675
2023-07-15 16:30:46 +00:00
stephan
bb65feb869
Rename opfs-sahpool removeCapacity() to reduceCapacity().
...
FossilOrigin-Name: fff68e9f25a57045e9d636b02ffa073cf1b984b2587d4fce10f6e35c9988469c
2023-07-15 11:37:34 +00:00
stephan
88af76f62d
opfs-sahpool VFS now seems to work, in that it runs fine (and blazingly fast) in speedtest1. Add sqlite3.config options for the high-level configurable parts of opfs-sahpool.
...
FossilOrigin-Name: 5d92d5f4d8ac4cfa37ba473e5cc861628b783bbf1ae4d138bcae8b9d6cc6e798
2023-07-15 11:23:57 +00:00
stephan
100bc4429a
More work on porting the sahpool bits. Revert to random backing-store names because it works better with the capacity-reduction algorithm.
...
FossilOrigin-Name: b4e005fd38b06b8d2f2317b955b93807e80a6a18db5f06d7747978d3bfa11411
2023-07-15 01:02:38 +00:00
stephan
bee3213145
Switch opfs-sahpool to use deterministic backing-store file names. Delay VFS registration until after the pool's files are all opened. Fail vfs init if the client's OPFS API has an async FileSystemSyncAccessHandle.close() method (indicating that it's outdated).
...
FossilOrigin-Name: 7c6697ededee9a64962ac6fd78934c6d6e39258b9558a03c1a6c02bf3be1759e
2023-07-14 23:02:58 +00:00
stephan
92bf6fd4f6
Integrate the opfs-sahpool VFS into the JS build and get it loading (but it's still far from functional).
...
FossilOrigin-Name: ef96e6b586825a2b3ed011174309cba8ce1031876c86dc59ed87ab9bbc64f57f
2023-07-14 21:48:45 +00:00
stephan
50c61825fc
Initial sketches for an alternate OPFS VFS which uses a pool of pre-opened SyncAccessHandles to bypass the need for a dedicated I/O worker and the COOP/COEP HTTP response headers. Currently completely non-functional.
...
FossilOrigin-Name: a93de9f2a553a3a4edd1b361dd6f465a1b0b5b51f7bb8ede432067aedcfefda4
2023-07-14 21:17:29 +00:00
stephan
a02d6d8237
Minor internal cleanups in the OPFS VFS.
...
FossilOrigin-Name: 984d491eb3fe06f714bf07d6873321f3992a072812b46508e599bfefd39dff3e
2023-07-14 21:06:00 +00:00
stephan
8ba619b5f5
Minor wasm build cleanups.
...
FossilOrigin-Name: 816b503f093c4e6d92d0eb2f9fbd841acd01cc9bc89ee58d961b56c64f71406a
2023-07-14 12:21:05 +00:00
stephan
f4449dc0ba
Reintroduce WASMFS+OPFS support, albeit as a separate (less portable) WASM build.
...
FossilOrigin-Name: 7e4c594e9591101f6b727212c99f561498444e86d3d059e5864a717c614f903a
2023-07-13 18:35:48 +00:00
stephan
d655290c99
Minor cleanups related to reintroducing wasmfs support.
...
FossilOrigin-Name: 6918a927b5ecd1df5916b70d52d8d5ce289869c3f323e577b7dfc7c939084400
2023-07-13 18:13:52 +00:00
stephan
bb9549e0be
More work on the wasmfs build and its test apps.
...
FossilOrigin-Name: 953b8557194e9451dcf9f3bb433eafb67961487325e6519e675e73fecf850bfb
2023-07-13 17:27:05 +00:00
stephan
d51cefd1bb
Get speedtest1 wasmfs variant running again.
...
FossilOrigin-Name: 0f77e031daf0121f7603409cedf57f138edbb43083cbbcf00d2a423e16de25a7
2023-07-13 16:33:45 +00:00
drh
bc6d949aa3
Fix an off-by-one error in tests for cells overflowing the end pages. The
...
error is completely harmless for the default page cache, but might cause
problems for application-defined page caches that pack pages tightly
together.
FossilOrigin-Name: ce6793e954f291b6f5c29175baf730ce217328de1f0601b8935daac62af5f448
2023-07-13 14:49:39 +00:00
stephan
cc336321f8
Significant surgery on the wasm build on the way to incorporating wasmfs as a first-class build option.
...
FossilOrigin-Name: 215c37fce38cf647e073480689b79d952af7eb8165ae08c7f5caed27003fecfc
2023-07-13 14:08:30 +00:00
stephan
d41d454fc1
More work on the wasmfs build. Resolve the inconsistent argument type passed to sqlite3InitModule() in such builds.
...
FossilOrigin-Name: 4850a9e2d2b41b91e91b9ef99a6d26ddf11a161b4c970fc00d2d095606729a04
2023-07-13 10:41:41 +00:00
stephan
0f0e5700ba
Minor cleanups in the wasmfs build.
...
FossilOrigin-Name: f64477f21040c265061ad9b7f601e74159fd6141e7e4b122c80bf244ab6ddb76
2023-07-13 04:54:18 +00:00
stephan
01bdff7a1c
Get wasmfs build and its bare-bones test app working again, albeit currently in ES6 mode only.
...
FossilOrigin-Name: 647761ed422f196f94facc88bbddd7219a2c1a6301a5f847b0a32d3e405233a7
2023-07-13 04:26:13 +00:00
stephan
81602595a0
Replace 'self' with 'globalThis' in some JS test code.
...
FossilOrigin-Name: 53eeffc9b1ea8c3ee7d7cdcc220997ed893403e45b35d8ea10805ea3b0435587
2023-07-13 03:46:43 +00:00
stephan
5da49ff562
JS: change the default OPFS VFS journal mode from PERSIST to DELETE, as DELETE is faster in current browsers.
...
FossilOrigin-Name: a061a43e36b8f3cb7c465fd2e54cfcd9dceb07e232ee78602bbdd1818acd05ea
2023-07-13 01:51:16 +00:00
stephan
a5512fb179
Remove obsolete ext/wasm/api/sqlite3-wasi.h.
...
FossilOrigin-Name: f661a6e0c1ac081ee402e64590eabd427440db1b717be9166bdfc025d0b0d899
2023-07-13 01:48:53 +00:00
dan
fc158d3870
Avoid a case of an infinite loop in fts5 when dealing with corrupt records.
...
FossilOrigin-Name: 0e801f11cd2d50fc710a80c2b3b805c7801e660cff1bcc87be89133d43796524
2023-07-12 20:24:23 +00:00
dan
9f6c0d0027
Fix a crash that may occur when handling corrupt records in contentless_delete=1 mode.
...
FossilOrigin-Name: 74d7610a8e32ac62a608141ff16bfe517c8d2cdfd43f81ef3a5df2b2003e541a
2023-07-12 19:34:32 +00:00
drh
9faa3bbdbb
Get access to SQL functions and virtual tables used for debugging and analysis
...
of FTS5 using SQLITE_FTS5_DEBUG and without the need for SQLITE_TEST.
FossilOrigin-Name: 383de8e2259adb3f8881a618b8b5e06c1f3b2bd7ac274bd047410ad7d2a18f0f
2023-07-12 18:38:47 +00:00
stephan
b3b64179df
Internal JS doc fix.
...
FossilOrigin-Name: 7c5ea02205a360a11fa9043be12c678eb7fe6f6a0b63b09a3dc976beae881e3f
2023-07-12 09:30:13 +00:00
stephan
a17b04f840
Correct handling of the speedtest1 --without-rowid flag in the HTML front-end to speedtest1.wasm. Reduce default speedtest1-with-OPFS workload size in ext/wasm/index.html to speed up manual testing.
...
FossilOrigin-Name: 2daba2cdd3890c87899ff3eb0c1706c814f0ae62e72822eef3b0d4a885679a6b
2023-07-12 09:16:18 +00:00
dan
b184c91076
Have contentless_delete=1 tables support REPLACE statements.
...
FossilOrigin-Name: 2f553a660e00564e51bc4209c92bd3628fb1266f4a52832792fbf91e4234a0ba
2023-07-11 20:57:19 +00:00
dan
b92669db73
Have contentless_delete=1 tables support regular DELETE statements, instead of just the special INSERT syntax.
...
FossilOrigin-Name: fffb8616905501669a94231d5d9f53446bf09553353f2cdab7c43ca54bbb7fa6
2023-07-11 20:19:46 +00:00
drh
8a1104940d
Reduce divergence between branches: trunk and wal-shm-exceptions.
...
FossilOrigin-Name: d38ed6b1fc6b572997d520c36f256c11404fb1bd5f28acab07466bfc96554a8f
2023-07-11 19:54:17 +00:00
dan
d23f210377
Use a hash-table instead of a flat list to store tombstone rowids.
...
FossilOrigin-Name: 948267b066d0dbe667881b3d26a007fa24576da6e57c112676fadeb846c13f0b
2023-07-11 18:55:19 +00:00
drh
66422b57f9
Get fault injection for testing working correctly. Other code clean-up.
...
FossilOrigin-Name: ff492277ed00c1f637a5b4ccd6d8193ea22f6781f90073861588a2b7d5c045b7
2023-07-11 15:52:52 +00:00
dan
6788c7b7c0
Begin adding support for deleting rows from contentless fts5 tables.
...
FossilOrigin-Name: e513bea84dfaf2280f7429c9a528b3a1354a46c36e58ab178ca45478975634e0
2023-07-10 20:44:09 +00:00
mistachkin
c0b6112d04
Minor style changes to the previous MSVC makefile changes on this branch.
...
FossilOrigin-Name: 4c950872c870a5968fa4cb8840cf60569a66c0e508811ee79992825ec9c02da3
2023-07-10 19:21:09 +00:00
drh
7994d9dab7
Compile for SEH if the USE_SEH=1 option is specified on the nmake command line.
...
FossilOrigin-Name: 0e67a82f6cfe681d4676ac5c92d92e95b9dcc3198df21516bccdde002f5e52ae
2023-07-10 19:13:40 +00:00
drh
5d3cc0c09b
Fix a warning. Unclear yet if the code is correct this way or not.
...
FossilOrigin-Name: 2df4fd76ef48bb63389df8d783059af6b8f2cbb2c11d07953b408e71f50b625b
2023-07-10 18:16:49 +00:00
drh
cc9380f68d
Merge the latest trunk enhancements into the wal-shm-exceptions branch.
...
FossilOrigin-Name: f655d08d019bab0c578886e91ca24fd956d1b3dea9b9c9104812b3cf62e5e556
2023-07-10 18:05:23 +00:00