1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +03:00
Commit Graph

29914 Commits

Author SHA1 Message Date
drh
3efac4aa78 Performance optimization to the substr() SQL function.
FossilOrigin-Name: ce228ce3d0132ad758b5b7464fcf22ae5976df3c02ec948280cc76290c79ed0b
2025-02-09 20:23:29 +00:00
drh
3bdebaeabb Performance and size optimization for the sqlite3ColumnIndex() routine.
FossilOrigin-Name: a93e3fe0ee8f98a7ec0dfb2e1abf432cc9d5f9d3ad345b5db261475215d43df9
2025-02-09 19:49:46 +00:00
stephan
b85b7f257d Update the 'clean' rules for autoconf/Makefile.in to account for [6092b0b8].
FossilOrigin-Name: f3a35fdc9113ad5f1fed6a2f474aee670e1793d355475a7971d376bf33823cc4
2025-02-09 05:37:25 +00:00
stephan
79d0aa6f56 Apply [6092b0b8] to autoconf/Makefile.in.
FossilOrigin-Name: 9ae245cff49716e4c0bbd3fbb3f82276e5fb54d595d1e1d9a452edef45d7740f
2025-02-09 05:30:47 +00:00
stephan
63f4926524 configure: if the linker supports --out-implib, generate libsqlite3.X.a, where X is the platform's DLL file extension. Discussion in/around [forum:0c7fc097b2|forum post 0c7fc097b2].
FossilOrigin-Name: 6092b0b86bf93a3d58a83774b6d07ef9735e6c8a0f2ac2d0a6d263c2e9f1e3ca
2025-02-09 04:38:56 +00:00
stephan
e108f97256 wasm: add some build-time validation to ensure that the problem fixed in [65798c09a00662a3] does not recur. Ensure that files generated via mkwasmbuilds.c have the generated makefile as a dependency.
FossilOrigin-Name: 55e01365946b3432e93da5c08200e476e2a134c98b963b4170e4dfae8408a005
2025-02-09 04:16:01 +00:00
stephan
00bc96c05c wasm: when building in -O0 mode (typical dev mode), use -sASSERTIONS=2, else -sASSERTIONS=0, in response [7e3e35cbff|Emscripten checkin 7e3e35cbff9], which adds assertions to check for the condition reported in [https://github.com/emscripten-core/emscripten/issues/23420|Emscripten ticket 23420]. Update some unrelated JS-side internal docs.
FossilOrigin-Name: 1f554610ba5d9d474ec4570bb7ca09125fd2cdfb4976530a4227cc6ebdf3a962
2025-02-09 03:24:00 +00:00
stephan
f858182689 JS: add a mechanism to the Worker1 exec API to fetch the last_insert_rowid(), as requested in [forum:56bc35390183f5d5|forum post 56bc353901].
FossilOrigin-Name: c22c48360756b1c7e2f5a9c01aff799bc188e100d364931de0dc3686e5de57a9
2025-02-09 02:41:35 +00:00
stephan
3e06f2d79b configure: when transfering ENABLE/OMIT flags from CFLAGS to OPT_FEATURE_FLAGS, also do the same for CPPFLAGS and remove those ENABLE/OMIT flags from CFLAGS/CPPFLAGS to mimic legacy build behavior. Strip ENABLE/OMIT flags from BUILD_CFLAGS but do not transfer those to OPT_FEATURE_FLAGS, also to mimic legacy behavior. This is the second part of a fix discussed at [forum:9801e54665afd728|forum post 9801e54665afd728].
FossilOrigin-Name: 16d307cc6c1e203900e7a2dc0730fc0e453946622a2114a07d64ebb99045cfbf
2025-02-09 01:25:00 +00:00
drh
5b0b8653b6 Add the "star" testset to speedtest1. Include it as part of "mix1".
FossilOrigin-Name: f1345b84eaae5404268df1d0449c409fe5c4a4f9742bd67a75c7333c8c9cd597
2025-02-09 00:54:56 +00:00
drh
66172ceb89 Put a 16-byte hash table for column names on each Table object, to speed
up column name lookups.

FossilOrigin-Name: 11eb8f99e5c4974cb6ba39e5bbc99f6b88b9e01006b70d5fea85c2a6d4f7044f
2025-02-08 16:16:08 +00:00
drh
9d90a3af2f Use the sqlite3ColumnIndex() routine to look up a column in a table, rather
than using a custom loop.  Performance improvement, size reduction, and
complexity decrease.

FossilOrigin-Name: 351dbbc2bf0b23efdc625ddaa5dc2239cf2990addf071a04bd41612b341de8c8
2025-02-08 14:15:42 +00:00
drh
03c65171b8 Fix GCC-isms and compiler warnings introduced by recent check-ins
[c56092507c967230] and [6e57848fe1e0e2b5].

FossilOrigin-Name: 91102c04375f83cffcd0f3204870e476636f651710e9e6fb773cf74085ef7636
2025-02-08 13:34:19 +00:00
drh
297a95bad5 Improvements to the symbol table hash: faster lookups with fewer calls to
sqlite3StrICmp() for schemas with many symbols and large names.

FossilOrigin-Name: 6e57848fe1e0e2b533dd65c2bc5fbac660202cf91cb94ac5468a3434e367a087
2025-02-08 12:04:25 +00:00
drh
f62d053b49 Improvements to the hash table used to store symbols in the schema, so that
it works better (requires fewer calls to sqlite3StrICmp()) for large schemas,
and uses less code space.

FossilOrigin-Name: 0318b68c845c84eded757c67f820e1783551574ac9e5670be640c4bfe22a934b
2025-02-08 11:15:41 +00:00
stephan
7df570421c build: work around a report of (install -d DIR) failing in one environment if DIR already exists.
FossilOrigin-Name: 8f7b7840d48c391d43ac034ebfee9227dc1c2800adda24f02f3d3bb942f4380e
2025-02-07 19:18:20 +00:00
drh
84b0f221f4 Fix comments on the Parse.nMaxArgs field so that they are correct. Add
assert()s to ensure they are correct.  Other Parse changes to reduce the
amount of memset() needed to initialize it.

FossilOrigin-Name: c56092507c96723030589ddd9121bc993d615a7acd453305fc3b1dbb9e30554c
2025-02-07 19:09:20 +00:00
drh
7fd936e5ed Further reduction in the amount of memset() needed to initialize the Parse
object.

FossilOrigin-Name: 45e462c0060e51c3375a226d636148e3415ee6020e544ecc84861c7aef4ecf7b
2025-02-07 15:49:21 +00:00
stephan
189a4a0bbb Mac-specific build fixes discussed in [forum:9dfd5b8fd525a5d7|forum thread 9dfd5b8fd525a5d7]: rename dylib links and add legacy-compatibility versioning stamps to libsqlite3.dylib.
FossilOrigin-Name: 668bcf327a82a63d45be8cf38fdddc855dbcefdedf6c208e091eb7e2d244929d
2025-02-07 14:44:31 +00:00
drh
ede1690cce Reduce the amount of memset() needed to initialize the Parse object.
FossilOrigin-Name: 284538d8486ef3e9bee1ab980043b53c144743c31b984be13a5cc137e7cbec31
2025-02-07 13:37:15 +00:00
stephan
7a7002143c configure: change extension of static libraries from .lib to .a on msys/cygwin, as per discussion in [forum:02db2d4240|forum post 02db2d4240]. Replace unidiomatic JS-style use of inner procs in autosetup/proj.tcl with TCL lambdas.
FossilOrigin-Name: 46f51e2a3707614a2b3ca6261bc6e0e8835477fdb7cbcf2f06b20cdebde2bab9
2025-02-07 12:58:09 +00:00
stephan
d8452a9517 Reorder a piece of ext/wasm/GNUmakefile to correct the timing of various var accesses. Fixes a problem [https://github.com/sqlite/sqlite-wasm/pull/99|reported in the downstream npm subproject] and explains the confusion in [4aa025a943a4024094b9] (which has been reverted).
FossilOrigin-Name: 65798c09a00662a3598f01571d6f3a2dc750c3d0b127c344590539244afe4aa7
2025-02-07 12:33:48 +00:00
stephan
4192a95d23 Fix out-of-tree builds of the autoconf bundle, as reported in [forum:a0cd0beb1baa6bef|forum post a0cd0beb1baa6bef].
FossilOrigin-Name: d47964a65bcfd4bc0b06baca281467a0b7fc87eba912a19c0974f63a54928ff8
2025-02-07 11:15:58 +00:00
stephan
6b3010a134 Bump TEA configure.ac version number.
FossilOrigin-Name: a1a9c780d1f1b47b0408397edded9c5d230c7b144207ad142d06c048792d31fa
2025-02-07 01:43:05 +00:00
drh
038424727b Adjust the test/speedtest.tcl script so that it uses an on-disk database
rather than an in-memory database.

FossilOrigin-Name: e93d7aa1db9bdbf1996c4c168e67284177e384b7acf176d74a0458258faab05c
2025-02-06 17:29:14 +00:00
drh
65552a7ae1 Fix a harmless typo in a comment.
FossilOrigin-Name: ed82272904deb37640286448e03153316f828c629547a615a504af1d7ec5a278
2025-02-06 17:10:38 +00:00
stephan
01bfe2a531 Bump version number to 3.50.0 for the next dev cycle.
FossilOrigin-Name: 46d08071f3f9fef78bc2444b52060e0e7de8c357a2aa213ac13c565e33acc4a0
2025-02-06 13:36:31 +00:00
stephan
3c013479c3 Fix a dependencies/order-of-operations bug in ext/wasm/GNUmakefile which causes creation of files filtered via c-pp to fail if the ext/wasm/jswasm dir did not exist beforehand.
FossilOrigin-Name: 4bac76138853a89484d3ac0486a9ed5143aa671b13b4b3abb704c1487213b388
2025-02-06 13:18:49 +00:00
drh
53f51faef9 Merge version 3.49.0 into the reuse-schema branch.
FossilOrigin-Name: 2699ae6e3cedf70aaf7c5c4418beb2bc5604fb019e9809fdef1b24a2ddbacef7
2025-02-06 12:56:07 +00:00
drh
659bafd05d Version 3.49.0
FossilOrigin-Name: 4a7dd425dc2a0e5082a9049c9b4a9d4f199a71583d014c24b4cfe276c5a77cde
2025-02-06 11:55:18 +00:00
drh
31c3599ed0 Fix a harmless unused-parameter compiler warning introduced by [75f3d8744879].
FossilOrigin-Name: 9f28f6694f97d5ee0345b45f9bf81e3fdce0990ce32fb9bdbbaac079126a67c9
2025-02-05 16:08:11 +00:00
stephan
6c074e5dc4 Summarize known incompatibilities/gotches between JimTCL and canonical TCL, and their workarounds. Doc changes only.
FossilOrigin-Name: 60c932e67b886d4c050698f36e1d3fc04eb99473d62bb3b1585a97d90e27227e
2025-02-05 12:56:55 +00:00
stephan
97af1346f0 Upstream JimTCL patch and minor tcl script tweaks to support (fconfigure -translation binary) for better cross-platform build portability.
FossilOrigin-Name: 0974a17c4565f202777fc6203df20dca19acc1e8740ede15334783f41e3e5054
2025-02-05 12:49:15 +00:00
drh
b6859b6f2c Attempted improvements to the SQLITE_DBCONFIG_... documentation.
FossilOrigin-Name: baac853871ad307b67b4d624b9ee47fc1313f1aa62c9f8072fb49e97aa33db94
2025-02-05 12:02:43 +00:00
drh
802b042f6e Detect and report signed integer overflow in the sumInverse() routine,
used by window functions.

FossilOrigin-Name: 317e9a470fba2a4b717b9cb66488b8fccb44810a80f3a7deaf1ea81906e2b8d2
2025-02-04 02:38:23 +00:00
drh
e85b2cac0f Test case for the FTS3 fix in the previous check-in.
FossilOrigin-Name: 459d8f695ef868d0ec09920ab2035eebd36a66051f9905e2605f4600623faa47
2025-02-03 23:27:27 +00:00
drh
51dd67080a Fix a potential UAF in FTS3.
FossilOrigin-Name: 75f3d87448793fc7fd68d817874d561842e029a2d6c1ea4abcec39764cd38469
2025-02-03 23:19:42 +00:00
drh
31615637f3 New dbsqlfuzz case added to fuzzdata8.db.
FossilOrigin-Name: 7ee20cfc237229dbea7116149c0c35883f7b8087b9ccdce6dca16b6da1c6caf8
2025-02-03 21:24:40 +00:00
drh
0d9f2a15f2 The Parse.addrExplain field is never even if SQLITE_OMIT_EXPLAIN is defined.
FossilOrigin-Name: 5d81a984c6aabb9fa9180efde8ca942b40f1ec18ff5a89f2fbb1252734f051d3
2025-02-03 21:04:21 +00:00
drh
1c68deead7 Enhance fuzzcheck so that the --sqlid and --dbid options can take a range
of IDs to run.

FossilOrigin-Name: 408fa57f048e05a261fb62b45ae44b8a97c97fc01e3776124cbef6595df579d4
2025-02-03 18:53:02 +00:00
drh
589796cd89 Fixes and improved documentation to the new --sqlid and --dbid range
options in fuzzcheck.

FossilOrigin-Name: 59e26632449163a36b803cc7027ed99c1f6b675dda6f0b2b12bbe55884923f08
2025-02-03 18:49:06 +00:00
drh
dbe48d3c8d Enhance fuzzcheck so that the --sqlid and --dbid options can specify a
range of tests to be run.

FossilOrigin-Name: cdd0af6f86e49ade1339ad5a3cc444400a9722a9efdf84a30b3ff9428b7ac36d
2025-02-03 18:36:05 +00:00
drh
c2b446f16a Fix for a potential UAF in FTS5.
FossilOrigin-Name: e33f2fedda17b4f3678fc23c438093c256b0c125da5f1ac42ecaf3d604d54b6a
2025-02-03 18:05:54 +00:00
stephan
6e5802fc74 Improve the JS-side sqlite3_set_auxdata() test to also trigger the case that the aux data actually gets reused. Test changes only, no library code.
FossilOrigin-Name: 9f27379d860518e6e097a2c999da04176812260a61bf11fe495c3efd76971806
2025-02-03 18:01:42 +00:00
dan
9e639d2490 Fix a use-after-free case in fts5 provoked by fuzzdata8.db. Tcl test case pending.
FossilOrigin-Name: a4962df665084e423e020be9a2834b6886a8e3feb461cff5358b61398a2a20d2
2025-02-03 17:54:55 +00:00
drh
c6281e4893 New test case for test/fuzzdata8.db
FossilOrigin-Name: 8a882f976e22100b91c7ca4119123f16ad5f03311f0a6dc17449bcdcff29618c
2025-02-03 17:45:41 +00:00
stephan
3cd34ab981 Rework [76c8435a] to eliminate automatic JS-to-WASM function conversions of sqlite3_set_auxdata() destructors because it can leads to leaks on every call of a UDF. This feature never worked before [76c8435a] but fixing it was ill-conceived because of the memory leakage it introduces. WASM function pointers can still be used as destructors in this context.
FossilOrigin-Name: 3fb993af0caf041da934cea29c039b27c468be0b75bce1537a6425767cf9bf8d
2025-02-03 17:34:12 +00:00
drh
6a5049f531 Merge the latest trunk changes into the reuse-schema branch.
FossilOrigin-Name: 858163f93893b0f481b27e39f4f7b3f51290606ad96e5f38cea2933c92398ff2
2025-02-03 15:17:31 +00:00
stephan
d98689f4d3 Add a more complete test for [76c8435a] and add some commentary about (A) the inability to automatically clean up automatically-generated WASM proxy functions for sqlite3_set_auxdata() destructors and (B) how to deal with (A) to avoid leaking WASM proxy functions.
FossilOrigin-Name: d693c2dddbd10a2e0b77893b04b11502e30b768f1b06814105f7f35172845fb9
2025-02-03 14:55:56 +00:00
drh
cf9f841c5e Fix the build process on Windows so that it generates identical sqlite3.c,
sqlite3.h, and shell.c files on Windows and Unix.  This patch also includes
a change to JS bindings that got caught up in the branch.

FossilOrigin-Name: 91ef45fc2902e46813366ec6b8317209f39f10e4a23c3808e33aceedab9da6c7
2025-02-03 14:44:16 +00:00