1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-10-21 11:13:54 +03:00
Commit Graph

5321 Commits

Author SHA1 Message Date
stephan
d1b64404b3 Determine the WASM environment's pointer size at runtime instead of baking it in at build-time via the preprocessor.
FossilOrigin-Name: 21ac6aaa03517841b637924720354b9800d6e8b7bd5f6ee54a99f5f45b2ccdec
2025-09-20 23:21:24 +00:00
stephan
3e205eff8e Add missing sqlite3_vtab::xIntegrity wasm mapping. Correct signatures for the (unused) xDlOpen and xDlError bindings. Disable OPFS-related tests in tester1.js in 64-bit builds.
FossilOrigin-Name: a106be90a2dba7476e54dbb4bdf47d0999031dae0ca82d73e51a48dadd6bcdc0
2025-09-20 22:10:59 +00:00
stephan
25e416dc3a Reinstate the working-again commit/rollback/update hook tests. The bug breaking those was the one-letter change at the top of this diff.
FossilOrigin-Name: c582513a77cd1d1d9479e5a4518ddf15ef5a213bed1bfb6af9bd21bf3be41f8a
2025-09-20 21:03:28 +00:00
stephan
7462b3749a Further tweaks towards 64-bit wasm. Fiddle is failing intermittently from the C level when importing a db and it's not yet clear what's happening there.
FossilOrigin-Name: 9fd82ebe31993c11e61a47205b7fc17a28283ec96cf278df1b6ea8a196d1fcb1
2025-09-20 20:23:59 +00:00
stephan
043136276a Get speedtest1's wasm build working.
FossilOrigin-Name: 2a61e3f1ccb1c2f115377d33af7d84d158b06c462e482fbbddf35c56d1fb58d8
2025-09-20 20:19:18 +00:00
stephan
93cd069fdf Improve deps handling of fiddle's gzipped output files to help avoid stale gz files during development (althttpd will prefer those over the uncompressed ones). Only compress the larger files, not the small html/js pieces.
FossilOrigin-Name: bb945f52909caa2577de38711883a79ca918b3716e5e0c2fed6e6ef12e19aeef
2025-09-20 20:17:17 +00:00
stephan
832dfd97d1 Get all but 3 of the tester1.js test groups running in 64-bit builds. The outliers are virtual tables and commit/rollback/update hooks.
FossilOrigin-Name: c135d9743698b3331e56f72160e2b78840aa2c8fa1a70daea9d4a0952dbda186
2025-09-20 18:51:10 +00:00
stephan
a8756afdbc Get several hundred more lines of tester1.js running in 64-bit mode.
FossilOrigin-Name: f5105ee5defa042508a68a1f4e23b9fff46a1697b1a727e01c3edea3030fbcb5
2025-09-20 17:11:57 +00:00
stephan
a2daecfc8c Further work on 64-bit WASM builds. It now gets through just shy of half of tester1.js.
FossilOrigin-Name: c8deed31365898e1379d577298fc80ef08a5531999d5b54a9f14337febed0260
2025-09-20 15:16:55 +00:00
drh
65a445d750 Fix the decimal_cmp() extension function to give correct results in
corner cases such as negative zero and two equivalent values where one
has extra trailing zeros to the right of the decimal point.
[forum:/forumpost/367c770224|Forum post 367c770224].

FossilOrigin-Name: 25b3626a018fa5916d0e129ee057c3f709c6e4d0b84a1a3102cad127a39a3db9
2025-09-20 14:32:12 +00:00
stephan
bd5d297fec Get the wasm tests running in a 64-bit build up through (but not including) the oo1 bits.
FossilOrigin-Name: a5af46174a05e1414370884d1a99827af9286a60eff1c8ae1551e7fad3903f7a
2025-09-20 11:09:20 +00:00
stephan
22f9ca64db Get about 1/3rd of the tests running with MEMORY64=1, but the code noise level added by the BigInt/Number discrepancy is making this very unattractive. There are apparently irreconcilable differences between MEMORY64=1 and 2, in that they have different argument type expectations for methods such as WebAssembly.Table.get(), where MEMORY64=1 requires a BigInt a MEMORY64=2 requires a Number. We have no way to make that distinction from the JS code, and don't know what other APIs are affected by that quirk.
FossilOrigin-Name: 1e3b003ff99d2788d93e179504b711cb78846605774bf472589440d0136f20fa
2025-09-20 03:02:36 +00:00
stephan
6a03f2029b Baby steps towards 64-bit pointers. Get it building and testing again in 32-bit builds.
FossilOrigin-Name: f35bb66e3eb939d321afb3545c184013633ce35fa4cbd67b6be17a64997ece9d
2025-09-20 00:43:47 +00:00
stephan
d6403a2d2e Initial experimentation with a -sMEMORY64=1 wasm build (full 64-bit). This compiles but does not pass tests due to friction between BigInt and Number types (e.g. Number(null)===0 but BigInt(null) throws, many functions are fussy about which of those types they'll take, and we cannot simply mix and match the two types transparently (1n+1 is not legal (but 1n>=1 is), so we can no longer do pointer arithmatic without hoop-jumping)). The library bootstraps but it's failing early on in tests due to this friction.
FossilOrigin-Name: cfd5c746a6111f49c9c83a56c3ef65223456306f2de6e20b36b1ca0c98b593e9
2025-09-19 23:21:00 +00:00
stephan
78202b9a3b Add some comments describing the ways in which building sqlite3.wasm with -sMEMORY64=(non-zero) fails.
FossilOrigin-Name: 0b14fd35ca37075bb65b2ab398f3324dc851347b1c042566eac23724013653f8
2025-09-19 20:10:05 +00:00
stephan
a09a8ffa62 Initial build-side tweaks to pave the way for a 64-bit WASM build. Such a build does not yet work for reasons given in the makefile comments, but is an eventual goal.
FossilOrigin-Name: fe2e1681b6dac81508ab67d1247e1f92018c9998386789846d1715c2cc13d6a8
2025-09-19 19:28:13 +00:00
drh
723e8c88fa Improve imposter tables: (1) Read-only unless writeable_schema=ON
(2) --unsafe-testing no longer required (3) Does not interfere with
PRAGMA integrity_check.

FossilOrigin-Name: a4430d262b3e129d7f00be1661af563907d7b2e98560a9847cd399129f91247b
2025-09-19 17:33:29 +00:00
stephan
d4cc844a2b Diverse cleanups and docs in the JS and kvvfs pieces. Functional changes: (A) ensure that the 'i32' JS/WASM func arg/result conversion works properly with a 64-bit-memory WASM build (which we neither use nor test but [https://webassembly.org/news/2025-09-17-wasm-3.0/ | the newly-ratified WASM 3.0] brings within potential reach). (B) Fix sqlite3_js_posix_create_file() to not deallocate its input array if the client passes in raw memory (the library has never used it that way but the API permits it).
FossilOrigin-Name: 79af65a694fbbb3d501fb2ebd835c259ca644e0dafdd71eeb9f0a7c0e9128a1e
2025-09-19 17:24:47 +00:00
drh
49a37f333a Improvements to imposter tables: (1) They are read-only unless writable-schema
is enabled.  (2) Because they are now read-only, the ".imposter" command
in the CLI no longer requires the --unsafe-testing command-line option.
(3) Imposter tables do not participate in a PRAGMA integrity_check and hence
do not cause false-positive errors.  However, you can still do an
integrity_check on the the imposter table itself by naming the imposter
table as the argument to integrity_check.

FossilOrigin-Name: ad152ddc4bcf6cfe840b9a36ab76a5ec36afdb1dd96eb7697e4b3df1bf63b00d
2025-09-19 17:24:12 +00:00
stephan
194d6edeb6 Wasm: (A) diverse internal doc updates. (B) when generating automated JS-to-WASM function proxies for converters which require an additional middle-man proxy, e.g. sqlite3_exec(), use the client-provided function, not the proxy function, as the cache key, to keep from re-generating the conversion in some common use patterns.
FossilOrigin-Name: 5e5139c2a162562cee0071d03954ebc0b8938da0b045ec3f5eba32dc8e19604d
2025-09-19 14:21:09 +00:00
drh
f5dc671a57 Fix a harmless compiler warning.
FossilOrigin-Name: 42c225a2ed7fc95f9b01467c64ba2bf97bca216fdcd6ab1ba3fb49c068650de9
2025-09-19 01:17:44 +00:00
drh
8f5503861f Try to make the carray extension easier to compile on VxWorks.
FossilOrigin-Name: 1a34c3f49ec48b551098f6781a3a6355aa3c9fd47fd9ebaef01f254b1dcafc9d
2025-09-18 19:59:56 +00:00
stephan
9290d70466 Improve the quote-stripping when importing a db into fiddle, as reported in [forum:264050a3f3 | forum post 264050a3f3].
FossilOrigin-Name: 1a87c16fddf174380deba9bbe58079328baf9f9ca95210f63bc628e3ef3eeb26
2025-09-17 20:05:12 +00:00
dan
e924087d30 Merge latest trunk with this branch.
FossilOrigin-Name: 0bb8c42951ed4fcda60f195b9cc84c80d5b8c0ff77c7517243708f43ba09cfdd
2025-09-15 16:09:54 +00:00
stephan
c35f07ec2f Diverse internal cleanups in the JS/WASM pieces. A potential fix for a hypothetical db-close-time resource leak of a subset of automated JS-to-WASM function conversions in Safari. That browser exposes WASM-exported functions via nullary wrappers, which causes a handful of them to misbehave (not clean up) at sqlite3_close_v2()-time.
FossilOrigin-Name: fabbc8b6d184d52a513e80fabd900f578424fc8a8055e3d64fac54b9e28ea18a
2025-09-15 14:11:55 +00:00
stephan
36595d0630 Expose sqlite3_set_errmsg() to the JNI bindings.
FossilOrigin-Name: 292866a46948e8d707bd14864fd1b40eec1bd2e22dcd249ec94711b646c8a70b
2025-09-14 12:55:57 +00:00
stephan
6b8d7ac599 Expose the new sqlite3_set_errmsg() to wasm. Refactor JS's sqlite3__wasm_db_error() to wrap that instead of the WASM-specific routine which previously did that job. This resolves the TODO added in [ead8a3a94e].
FossilOrigin-Name: e447a50f3a3791c264a68000948daa64edb1857d51d256fbd1ff0f2c2b330d5e
2025-09-14 12:14:42 +00:00
dan
0247e15f69 Updates to where.c to handle vtabs in joins more similarly to regular tables.
FossilOrigin-Name: 991383262b0d07ebc79fdb6bed448013cea3a0ac13292d5397dce012b1e6a673
2025-09-13 19:23:12 +00:00
stephan
a248d84fbe Add a TODO regarding replacing the internal sqlite3__wasm_db_error() with the new [34eda113c8819d | sqlite3_set_errmsg()], which serves the same role.
FossilOrigin-Name: ead8a3a94e0f349bcdced6a62af0349b0b7b731137c8d33e2ef0e7eecd107c1f
2025-09-12 17:36:23 +00:00
dan
2c4008fe26 Add sqlite3_set_errmsg(). Use this in sqlite3changeset_apply() to return any error code and error message via the SQLite handle.
FossilOrigin-Name: e34eda113c8819df46c139ccf749b686c8bfdd399f59345c6d6be3736bdf97cb
2025-09-12 17:13:59 +00:00
dan
d968525382 Add experimental API sqlite3_set_errmsg(). Use this in sqlite3changeset_apply() to return any error code and error message via the SQLite handle.
FossilOrigin-Name: 4d5b60a1e57448f03af2a657fe7cdabb04ebaf9688d5cc700dd8f9892a5cba15
2025-09-12 15:02:47 +00:00
drh
065daf24b4 Minor #ifdef changes to the carray.c extension so that the source file can
be more easily imported into a larger program (such as TH3).

FossilOrigin-Name: f16fd1afbb65f88d7b94c2488ddd59549d71894ab5fcee46b4c55bfe646bfc9d
2025-09-10 20:28:57 +00:00
dan
d61dbf7072 Change the order of some paragraphs within documentation comments in sqlite3session.h.
FossilOrigin-Name: f0102d7b25d854b5a937eb7de5e25f52c2ecf904234857c96bd1995f5dde0b66
2025-09-10 16:57:57 +00:00
stephan
c0e3a8ca19 Generic doc updates in ext/wasm's makefiles. No functional changes.
FossilOrigin-Name: 02721457cea255a5117a46b77cc87d2e09acb64340ce94089c5b5e6edc5b5033
2025-09-04 18:00:53 +00:00
dan
2af776ff59 Fix a typo in a comment in carray.h.
FossilOrigin-Name: a4e137de0e82fbba890c2a608578f02f3666d2c25fb76f95ddf2d6a096a30e6c
2025-09-03 21:19:11 +00:00
stephan
8fb8782e2a Random wasm internal doc cleanups. No code changes.
FossilOrigin-Name: 70923a00cfca2c64b7c7c824325ab75cdd05d452b79d2eaf43297898af891c47
2025-09-03 13:39:15 +00:00
dan
c30e1a10ef Fix a problem with SQLITE_CHANGESET_CONFLICT conflicts caused by DELETE triggers within a call to sqlite3changset_apply_v2() with SQLITE_CHANGESETAPPLY_IGNORENOOP specified.
FossilOrigin-Name: 138e2aab43ac07aaf8c5389105ff6d3e107ff2d35badcb48233664fcb9661471
2025-08-20 11:21:35 +00:00
dan
697d29ea49 Fix a problem causing an SQLITE_CHANGESET_DATA conflict of a DELETE operation to be incorrectly ignored if the SQLITE_CHANGESETAPPLY_IGNORENOOP is specified.
FossilOrigin-Name: 78b543f85ac6643f3b69bf1250c6362f00e030f93f460ef7d04902682ef64ee9
2025-08-19 21:35:23 +00:00
dan
a6c95406c1 Avoid depending on HAVE_STDINT_H and SQLITE_PTRSIZE and other things in non-amalgamation builds of fts5.
FossilOrigin-Name: 309fdd496673bf58984fb16aef3d4cc2ad8c9f6dad7687509f4d708fed5ba41b
2025-08-14 19:36:59 +00:00
dan
0e77c3fa4d In cksumvfs, do not write checksums to the wal file, as this prevents recovery from working.
FossilOrigin-Name: 5bf48c7e31904f1f7048499c630801846df89f262b32ea1e49fb6e039eaad11a
2025-08-13 18:37:41 +00:00
stephan
656563cce9 Move the forced NDEBUG in fts3Int.h up above the #include of assert.h, as reported in [forum:8f16dd9480aad85f | forum post 8f16dd9480aad85f].
FossilOrigin-Name: 3b06d1c9b6c03f38029a8b98fef6253647878c0f8b05447ec0c8122f189c90dc
2025-08-13 17:58:47 +00:00
dan
c5c9c6093b Fix a problem with the checksum-vfs and direct-overflow-reads.
FossilOrigin-Name: 8288edb9f930206f117823cf1d18af632dc6adbd7c4c3b9bcfc252e1a5e5b9cd
2025-08-13 14:35:14 +00:00
dan
9081b89720 Replace some 32-bit arithmetic in fts3_write.c with 64-bit to avoid the possibility of integer overflow.
FossilOrigin-Name: 6711110b1c7589311f012deee4d4dd5b771fa44ad328b471c9ef583960795199
2025-08-11 10:54:39 +00:00
drh
cd70a44d45 Remove the <i>experimental</i> lsm1 extension from trunk, in as much as
readers were thinking that this was a supported extension and were reporting
bugs against it.

FossilOrigin-Name: ae9d7c9c922bb241363aa690b42b9664c4ad6e76ed5ce474daf1ab44461bc6a3
2025-08-05 12:01:43 +00:00
drh
332eb8e63c Add bounds checking and error messages and improved comments
to the (unused) zorder extension function.
[forum:/forumpost/e3f1ede174|Forum post e3f1ede174]

FossilOrigin-Name: 6bb717acf706e6ffd4671660ca78237e6a42863f344518e6d21065bf735f971e
2025-08-05 10:54:56 +00:00
drh
f9c2cff2fe Improved defenses against corrupt ZIP archives in the zipfile extension.
FossilOrigin-Name: 642e89191deaf75db236102248c662aeef65bcd3dcbdfea694256583556be75f
2025-08-05 01:53:03 +00:00
stephan
8c30f16a2e Fiddle: move the About button into the main toolbar. Extend the About text with some info which only shows up (or is only hidden) when terminal mode is available.
FossilOrigin-Name: da524d6c61330fb004dade810c5ad84bb6d37625786c1d0fd473593f2448d904
2025-08-02 15:04:50 +00:00
stephan
f681a9a7d8 Fiddle: make the toolbar visible in terminal mode and hide non-terminal-mode options when in terminal mode. Move the terminal/split-view toggle button into the toolbar. Improve the view-switching handling.
FossilOrigin-Name: 711bf423d213a2c468c32a48c0b09927cdfdffce36e5e4a3b35a32bfa055ff82
2025-08-02 14:50:01 +00:00
stephan
380ef6006b Fiddle: move the About button into the header bar and get it working together with the optional jquery.terminal console mode.
FossilOrigin-Name: 9639382c5478115df7c1584c14a52c176fe747df73078419be4ab276374a704b
2025-08-02 13:21:07 +00:00
stephan
a0e569d5ba Fiddle: add an about/info/help view and a button to toggle it. Change the color schema to a more conventional black/white. Force imported databases out of WAL mode, which doesn't work in fiddle.
FossilOrigin-Name: 27d1d0100c0cb6e5c0c576be0f99209bb905f302008d8c257039adf8c5402f7d
2025-08-02 12:06:37 +00:00