Commit Graph

31565 Commits

Author SHA1 Message Date
drh
0cb576f306 Fix harmless compiler warnings about unused variable assignments.
FossilOrigin-Name: afe7e9fd1c476c7cdcefab0adf0191a8dc3283811f72a685fff3eb6539b72dcc
2026-03-29 22:41:12 +00:00
drh
6d27844bbe Merge trunk performance enhancements and fixes into the direct-printf branch.
FossilOrigin-Name: 9fa9cd11f8f5f7591168870c6e41121221b58a4a3094e708e3fa5bab1502f190
2026-03-29 19:23:47 +00:00
drh
03f13d77a5 Avoid using unsigned 64-bit integer division on platforms that do not support
it in hardware.

FossilOrigin-Name: 2197677491dfc5ec87b57bbf807776875248a250f80ce9a5ce94ae385bb1d2bc
2026-03-29 19:06:36 +00:00
drh
445fbc61c8 The _umulh() intrinsic function is not available on 32-bit windows. So don't
use it there.

FossilOrigin-Name: e75f30c7e66e725a2f3f46c7d4d69a2ff925e2de9a86c3a6ec38897545b43a58
2026-03-29 10:32:25 +00:00
drh
eb0cb3f53b In sqlite3_str_vappendf(), write floating-point renderings directly into
the output buffer, saving a memcpy().

FossilOrigin-Name: e4e040e7aaaf5bfccbf0414fee3d08c5fdc24e03d1118dce92d2dd16c614ce63
2026-03-28 20:24:47 +00:00
drh
5239e69fb1 Remove a harmless unused variable from the fp-speed-2.c benchmark.
FossilOrigin-Name: ff9008e7615d877e6cc852c60097777006b274971646d368eaa56b99a7acf6c7
2026-03-28 14:21:53 +00:00
drh
20d93e16d7 Enhancements to the fp-speed-N.c programs, suggested by Andreas Kupries.
FossilOrigin-Name: 7d81ff4c509d4039ef9e2f1066284ec560131422db0cbffa7e1826d71bb8f8e1
2026-03-28 14:17:53 +00:00
drh
c409eaaf14 Reduce the compiled size of the quote() SQL function.
FossilOrigin-Name: 9ea980a35628f7d0741ab6c65840ab9dab8abb576c6c60109147336452f9637a
2026-03-28 13:59:34 +00:00
drh
2e01416762 Turn an sqlite3VMPrintf() into an sqlite3DbStrDup().
FossilOrigin-Name: 75e8703664ae94244284819d9021877a5fc33a268fb86f3e70de20875a766d80
2026-03-28 13:30:47 +00:00
drh
ff8a0895d6 Fix up the floating-point speed tests so that they only need to be run once
to get a performance comparision.  Provide the fp-speed-test makefile target
to build and run them both.

FossilOrigin-Name: 09e0e78a8265c2e2bc36fef1fa88bd5bf414f9b776966c1c91a4ed4b7866331d
2026-03-27 20:18:06 +00:00
drh
a2f78f665c Add a comment to test/fptest01.sql to remind us that failures in that
script might not be the fault of SQLite.

FossilOrigin-Name: 65efcb0a2ed49fa2fd747b5f034d976ed3cb4a01a185bcada70bf8a5208f3841
2026-03-27 19:25:25 +00:00
drh
c4cedd7ffe New test cases for text→float conversions.
FossilOrigin-Name: bbf2d648376a965605d5c641a889ab7ef365bc53788d984c054468e9889deee6
2026-03-27 18:58:50 +00:00
drh
00c6eca32c Enable the use of intrinsic high-precision multiplies on Windows ARM.
Make the SQLITE_DISABLE_INTRINSIC option effective on high-precision
multiple subroutines, for testing purposes.

FossilOrigin-Name: efb6212de4ca998546329b06b43122f0fffa3759e4615ca3357ef9fa13606d44
2026-03-27 16:09:10 +00:00
drh
be2242d2ee Change the print resolution the fp-speed-1.c test to 17 digits.
FossilOrigin-Name: c687b32a956315ddf4336df42deb4037c37d51b536b8a24c5cef4c5a0bc4c79b
2026-03-27 14:54:01 +00:00
drh
2dd3b4a646 Update fp-speed-1.c and fp-speed-2.c to include its own timers, so that it
works on platforms that lack the "time" command.

FossilOrigin-Name: 9b083070de2d782fe1db62652af8f3cd48abe16b55b974f3927b738e3d914887
2026-03-27 14:19:01 +00:00
drh
4570aeb7bc Add the fp-speed-2.c performance test program.
FossilOrigin-Name: b788256f1980531e7abb15c5fbcdd40ae166f091aea28f449c0407105ddf1aa4
2026-03-27 14:03:41 +00:00
drh
1283969f26 Add a comment showing reserved file-control numbers to sqlite3.h
FossilOrigin-Name: cd472d7c85f3fda54bba5166eae72b5f9b86861c4a1160583e8ee902ba992255
2026-03-27 11:46:11 +00:00
stephan
772ea2f01c Add SQLITE_STRICT_SUBTYPE to PRAGMA compile_options, an omission reported in [forum:3906a71526|forum post 3906a71526].
FossilOrigin-Name: c5af6a10245b6b847d30002806c1577b020c36ab27f7b1cf202ade136aa4779c
2026-03-26 19:11:57 +00:00
drh
d4af925e34 Enhance the return value from sqlite3AtoF() so that it reports if the input
includes more than 19.25 significant digits.

FossilOrigin-Name: 1721c8da769816ca16104cd636299d84f682fc004938a50056b76b269e49e915
2026-03-26 18:19:47 +00:00
drh
61d3bc8ddc Revamp the return code from sqlite3AtoF() for additional information and
for small speed improvement and size reduction.

FossilOrigin-Name: f10a431eade20ecd4c4d501fc534e2dae6ab2fe67302ea7bb3cd6eba127848fc
2026-03-26 16:33:03 +00:00
drh
f9a3b78561 Improvements to the sqlite3AtoF() interface. Add a test-control for
direct testing of sqlite3AtoF().

FossilOrigin-Name: 97ee48b6ef65fb55633196282c9e75b3b0a3b81ba9755f63493a38e3f1a5610c
2026-03-26 14:19:34 +00:00
drh
f855727e45 Back out the sqlite3_atof() API, for now.
FossilOrigin-Name: 7568d264be3988df195401158d8d07105b8e9e018eccf98ac948219bee9388ac
2026-03-26 12:09:37 +00:00
drh
3d58f022a8 Fix an off-by-one error that cause a loop to (harmlessly) run more times
than necessary.  Performance optimization, not a bug fix.

FossilOrigin-Name: 58f4e058f1cbb798b8a48208c6310fd10ca9cd1fc7c550f3ed283cf38ae45c2f
2026-03-25 21:23:23 +00:00
drh
7e9eaf3c1f Performance optimization when zero-padding in printf().
FossilOrigin-Name: dbd81abdc6633124e72999321db6fc8640851fa5eb063e6317a4c3e57b48dbaa
2026-03-25 21:05:18 +00:00
drh
0944b3efad Small size reduction and performance increase in sqlite3Atoi64().
FossilOrigin-Name: c818165fd709b813ab07788662bf69205ece2dcea41346609b3439950f900057
2026-03-25 19:36:16 +00:00
drh
f3f194c385 Signification optimizations to layout of text for floating point
conversions in sqlite3_str_vappendf().

FossilOrigin-Name: 6a74df6d6ecfda8e0ff72ca0f4167190e989973ad124412892f7d36f1666ccfc
2026-03-25 17:59:22 +00:00
dan
183a73c352 Handle the case where the compile-time default page-size is greater than 8192 bytes.
FossilOrigin-Name: 3aea251f238277c68d7a80a4fa643bb0f80b274cef77ef32c4eb833cfaf46740
2026-03-25 11:19:38 +00:00
drh
53197b7940 Prevent overly long JSON paths from using too much stack space.
FossilOrigin-Name: 82a0794814bbc095235f8158a4129a5d83f6af1b0c27cb56449ea32feb44faf5
2026-03-24 19:26:05 +00:00
drh
f1f1784f4b Limit JSONB recursion depth in the json_patch() function.
FossilOrigin-Name: f8659b700c0088abe19ce65fec032c1005a1f750566488f4578256d41558770c
2026-03-24 12:39:05 +00:00
drh
814f592cf0 Improved error messages for JSONB nested too deep.
FossilOrigin-Name: 82036fafa175e798fd32b3dc4ad043fc2bbe2bb2af17781f12dcb4d23a233865
2026-03-24 11:54:55 +00:00
stephan
9b805c6248 Remove a stale reference to the long-removed SQLITE_MUTEX_APPDEF, as pointed out in [forum:348453389b|forum post 348453389b].
FossilOrigin-Name: cb8e55b59113d0102c50db0a43b1b59d531cdcb12a7cce4c4c9a428c7c6e1adf
2026-03-24 11:33:22 +00:00
drh
3c2ccd2903 Minor simplification to JSON path error reporting.
FossilOrigin-Name: 1cd30c4827e382861cf12af48579eedc9685b9612dedb6a2844f20355b910e7e
2026-03-24 11:25:44 +00:00
drh
7bf4d708dc Recognize artifical JSONB blobs with deep recursion as being ill-formed.
FossilOrigin-Name: adac4ed1f13a9a1c4a34c8f59438eac68867981748629ca3957055ad9f940299
2026-03-24 00:31:28 +00:00
drh
5239e821e8 Move datatype and structure definitions up near the top in the CLI source code,
to facilitate future changes.  No changes to the actual logic (yet).

FossilOrigin-Name: 6b3d84d34d1a84eb8ddff08cd85d9dff6e71099e7a4b2c19db8774d942d3a040
2026-03-23 21:03:34 +00:00
stephan
a217a4af09 Require a button click to start the OPFS concurrency tester, rather than simply launching all N workers immediately on page load.
FossilOrigin-Name: 3342d6786e07d3d8dd4b1f2291edea9f8354d384ff21242cc513c218ce6f1630
2026-03-23 13:17:13 +00:00
drh
3e3c31ff0e Use sqlite3_atof() instead of atof() in the CLI. Dogfooding.
FossilOrigin-Name: 276c350313a1ac2ebc70c1e8e50ed4baecd4be4d4c93ba04cf5e0078da18700e
2026-03-23 13:00:56 +00:00
drh
dc32016ee0 Move the definition of the new sqlite3_atof() function in sqlite3.h so
that it is adjacent to sqlite3_mprintf().

FossilOrigin-Name: 1553a60506fa29b5f00535ae0f7aeb8cc94ebe84015386b3248fd8491108fc60
2026-03-23 12:25:52 +00:00
drh
5700f8c471 Add the sqlite3_atof() interface.
FossilOrigin-Name: 52f76c59f27152dd62069bd833e2409d57d0cd36ccaa568b2ec4ec823e98cb44
2026-03-23 10:58:29 +00:00
drh
80b88b2482 Proposed new API routine: sqlite3_atof().
FossilOrigin-Name: db370f0f628895279a1c1db79ba7428cb4e31b56cafc191859c2f1a5a924435b
2026-03-22 20:52:23 +00:00
drh
8e7f122c7d Performance enhancements and improved documentation for sqlite3AtoF().
FossilOrigin-Name: 62f011509600ab8cda28888ebd32e5faa4e865702755bc32dee7a12bf2f4425d
2026-03-22 18:26:43 +00:00
drh
dfd31e158c Additional performance improvements in sqlite3AtoF(). Also update the
header comments.

FossilOrigin-Name: 8c3a1b450d6d5778004b9fb0e92b4f3f90d3e06ff87276370d01a45b7d607d23
2026-03-22 17:50:48 +00:00
drh
cc19c1dafd Further simplification and performance improvement
FossilOrigin-Name: 6c3dc2430adef061b458b6d9159628bb8debfd4d63876d5d5e7493afb799d97f
2026-03-22 02:51:18 +00:00
drh
99571bf3c3 Performance improvements in the floating-point number parser.
FossilOrigin-Name: aea648f3668219a2539160eb68c77ddd06aa8eac235c1326fe7b1547288b11ee
2026-03-22 02:26:38 +00:00
drh
3c1f727603 Because version 3.52.0 was withdrawn, that means QRF has never been
officially released.  Hence the new nMultiInsert field of the spec
can be moved out of the extensions area and into the main part of the
spec, and the version number can drop back from 2 to 1.

FossilOrigin-Name: cf19982241afb17e3db4148b8257f6737141935a291c340ab085c42ed946af1a
2026-03-21 19:49:38 +00:00
drh
d9e70f2b90 Try to fix harmless compiler warnings from legacy C compilers in the CLI.
FossilOrigin-Name: 8e1d0c4eac303cd0834449f4792605c0ed983db1f360af42300f0048dadbbef8
2026-03-21 13:21:41 +00:00
drh
4c78799bb0 Add support for REINDEX EXPRESSIONS
FossilOrigin-Name: d56954146ce5eccd63b65242abe2e6556dbceda39a58eab39f5884884afea337
2026-03-21 13:05:54 +00:00
drh
958b6a52e5 Undo "indices"→"indexes" changes in comments, to avoid diff clutter.
Fix a couple of unreachable branches.

FossilOrigin-Name: 0042ff9afd00eca0a837e9bbe57540ff2810fcd58b4f7e3f4e3b83aad5699757
2026-03-21 12:55:57 +00:00
drh
f62cff6a9e Fix harmless compiler warnings in the csv.c.
FossilOrigin-Name: 6ac701f89e2ac8dfd18d041eb8c36a0c2b9fedc5618d3a95be794aecce5c59cf
2026-03-20 20:35:21 +00:00
drh
f163bfba4e If the argument to REINDEX is EXPRESSIONS (with no schema prefix) then it
updates both expression indexes, and any indexes named "expressions" or
all indexes of any tables name "expressions".

FossilOrigin-Name: 72650dc152279a6da1937f377b1e16b79f4cd664841e12222dc5459838408d22
2026-03-20 19:30:58 +00:00
drh
b0a4b69b95 If there are not collating sequences, tables, or indexes named "EXPRESSIONS"
then the "REINDEX EXPRESSIONS" command rebuilds all expression indexes.

FossilOrigin-Name: df5c5aa26758e0dc00a9ccba29eac83071176d257e121207e0a13c54833b18c0
2026-03-20 14:37:39 +00:00