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

30539 Commits

Author SHA1 Message Date
drh
c7cb05813c Initialize the sqlite3_set_errmsg entry on the loadable extension thunk.
Also fix a harmless compiler warning in sqlite_dbpage.

FossilOrigin-Name: 031a43ae2bb06adefb3f66bf7d1cdae0020b25a1eeee7c3a3dd4447014b9d3f7
2025-09-13 18:28:34 +00:00
drh
419b93adbf Add --enable-dbstat and --enable-dbpage options to configure. Fix the
".dbtotxt" command in the CLI so that it uses the correct filename of
the database it is rendering as text.

FossilOrigin-Name: e04e6e681891020f78237fa6dc11bc2e2022c569b04ac96cb333bf59f1662cd1
2025-09-13 18:15:26 +00:00
drh
96455af950 Enhance the integerValue() routine in the CLI so that when its text input
specifies an out-of-range integer, the routine returns the nearest integer
that is representable as 64-bit twos-complement.

FossilOrigin-Name: 5d50279fcb66b479e76586b729f36d389b28940476ff70d61b0066a5d5d3ad0c
2025-09-13 17:53:14 +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
drh
195956af94 Typo fixes. Make sqlite3_set_errmsg() accessible to run-time loadable
extensions.

FossilOrigin-Name: 93a41e31322eec70476f7d81f4af7fb8476cad21a56d6b1048a9e0c0c440bf72
2025-09-12 15:31:33 +00:00
drh
28a7f01f90 Add more details to comments in the previous check-in.
FossilOrigin-Name: ed36b3aa4b68c6bb347b6851ea61bcad9712c4a9ed39e3fb4f84cb9b9ee48dc2
2025-09-12 15:20:39 +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
eb8089ef46 Fix an off-by-one error in sqlite3_rsync.
[forum:/info/46753431d4|Forum post 46753431d4].

FossilOrigin-Name: ef3b7be6f2037871f6f1b1944fed3dda28216e7f179080d3be2e2620c031f48c
2025-09-11 10:58:49 +00:00
drh
9455a6e8b8 Improved support for VxWorks.
FossilOrigin-Name: 5bc6b9352236df3091ee69b947d0c397264156539d13e5968ec3b9a6e55dc800
2025-09-11 10:43:57 +00:00
drh
56d831e064 Fix a harmless compiler warning in the CLI. Gcc generates identical
machine code before and after this change.
[forum:/forumpost/8bda0d896f|Forum post 8bda0d896f].

FossilOrigin-Name: dbca4fe34467653d083de42d0c75746cf171e96ee3867abe67a47ab88437fa71
2025-09-11 10:37:01 +00:00
stephan
7754f53045 Latest upstream autosetup, with project-local s/--debug/--autodebug-debug/ patch, for HP-UX-specific config bootstrapping code and latest jimsh.
FossilOrigin-Name: 1d2352a16cc0990037710b4a666f2f3b039c1973e0af29990d67d70bcdba0600
2025-09-11 10:14:10 +00:00
stephan
4619855103 Configure script portability improvements for HP-UX builds, with the help of HP-UX sysadmin Michael Osipov.
FossilOrigin-Name: 93cf2afa8ca529784f859da2f015bce3a251b23dafa6ca3d1db644a91969e237
2025-09-11 10:09:43 +00:00
stephan
be4cf645a8 In mkautoconfamal.sh use $MAKE if it's set so that it can be made to work on platforms where 'make' from the PATH is not usable, e.g. HP-UX's standard make. This means that 'make snapshot-tarball' will inherit that value from the outer makefile and set it appropriate when the in-use make is named gmake.
FossilOrigin-Name: a8635cae05d2bce28d0c0c39b599cf8ca6f3b89b114fbeef519a8024692180c5
2025-09-11 10:08:19 +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
drh
0b8e4294d5 Use a separate mutex (SQLITE_MUTEX_STATIC_VFS2) for the VxWorks file list
in os_unix.c.

FossilOrigin-Name: 8f45f1a9d9208fbf124c4087092718b83cd653126bc1ed5f388e3577561f615b
2025-09-10 18:34:09 +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
drh
586361fa7c The GetSystemTimePreciseAsFileTime() API does not exist on 32-bit windows.
Adjust [c5dbe93114d318fe] so that it works with this limitation.

FossilOrigin-Name: 61d9e204c5801a94811fdb0afe2c04f9814e08f2e141afa6dbda0fa45f026f70
2025-09-10 14:28:07 +00:00
drh
e7f190b8e1 If open files in VxWorks, do not unlink the file unless the file was marked
as delete-on-close.

FossilOrigin-Name: bb6114dbbf3bfbea57cd9be21666299663e94576b0175f6aeefd1d0f7107398e
2025-09-09 19:00:55 +00:00
drh
130a2f52b1 Do not allow attempts to open files in VxWorks unless the full pathname is
provided.

FossilOrigin-Name: 4720205249214c01f6e63738e4927c0f53c853346cc2dfa45522aaa469f4d702
2025-09-09 17:39:28 +00:00
drh
92f91ca37d Do not allow the local_getline() function in the CLI to allocate more
memory than can be counted using a 32-bit integer, thus limiting the
length of an input line to about one gigabyte.
[forum:/forumpost/c83b9affa2|Forum post c83b9affa2].

FossilOrigin-Name: 0f31711591c56f3896fb6f092752fb82c4ea646bf8e5838dfbe55302994ea091
2025-09-09 10:28:06 +00:00
drh
4edee00ee0 Fix a potential memory leak in the VxWorks VFS that can occur following
an OOM or I/O error during xOpen().

FossilOrigin-Name: cb880145d899832cca0612b89024a54d188ed706600fa812ea74587d69c261be
2025-09-08 19:56:14 +00:00
drh
91020438c0 In VxWorks, temporary filenames must be full absolute pathnames in order for
vxworksFindFileId() to work.

FossilOrigin-Name: 1fc94becc5971812c3a91fb1410cb54f6ecb9e50da2d30863dc840cbf4e6c1f5
2025-09-08 18:45:58 +00:00
drh
b4af09c80e Add the ability to compile with -DOS_VXWORKS=1 on Linux systems, in an
effort to debug the VxWorks capabilities without actually having to
run VxWorks.

FossilOrigin-Name: c87e68d791215729fb513c651e77c6ef6bb260deff37ed2ab6e99b777271bdfe
2025-09-08 17:52:17 +00:00
dan
75ca99ab99 Add "PRAGMA wal_checkpoint = noop" and SQLITE_CHECKPOINT_NOOP. To request a checkpoint that checkpoints zero frames.
FossilOrigin-Name: 4384ad8918801780f2660817dead919020423eb94aa880fff9b04f2d5f5d932f
2025-09-08 15:15:24 +00:00
dan
cf0ba94657 Merge trunk changes into this branch.
FossilOrigin-Name: 3bac76a86baae830d4fdc9e4055470d84549fde56b4cf217ebd96cb486554461
2025-09-08 14:40:17 +00:00
dan
d7d632d581 Add documentation comment for SQLITE_CHECKPOINT_NOOP.
FossilOrigin-Name: 2b9c495d02724f19ab16612b0e671dfc612f04342222d9901cd0debd08da4cf0
2025-09-08 14:32:32 +00:00
dan
4cefe53a33 Improve documentation of SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER.
FossilOrigin-Name: d7b2fb5363203f475887f277aed4a91e5a83440c169a86b3bf1e4fdf130bbaed
2025-09-06 15:27:01 +00:00
stephan
afd432f86e WAL API doc tweaks based on suggestions from [forum:16e94b4bdcfbdc57|forum post 16e94b4bdcf].
FossilOrigin-Name: 1bb7eaf784687cd877c5c0552bb511659767670259e64bc108e7972e356d3cfc
2025-09-05 13:26:24 +00:00
stephan
7aadad63e9 Build portability fixes for HP-UX, reported in [forum:d80ecdaddd885149 | forum post d80ecdaddd8]. The full fix also requires a patch to autosetup/cc-shared.tcl, but that's pending because it's upstream code.
FossilOrigin-Name: 5f38c8aa8fe9993cafde69a85e96e32c283a6bc142238a9d10f3637c93cd474b
2025-09-05 12:14:22 +00:00
dan
b9bf2d9382 Add tests to check that SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER is working.
FossilOrigin-Name: beb092d8105e5a1ce95339527bf96799e2ce073591b055f71a5f1dc1d0a0c49c
2025-09-05 11:20:11 +00:00
dan
d8d88d9390 Add "PRAGMA wal_checkpoint = noop" and SQLITE_CHECKPOINT_NOOP. To request a checkpoint that checkpoints zero frames.
FossilOrigin-Name: 48be3d020cf0c732557b3d956198a1abcab79424be03f447e2bb89f4d68dc8ff
2025-09-04 19:33:23 +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
drh
f28c0f37f2 Use Pgno instead of int for the pgno field in the DbpageCursor object.
The same machine code is generated, but using an unsigned value seems
safer in the long run.
[forum:/forumpost/ccec20a858|Forum post ccec20a858].

FossilOrigin-Name: 26ecdde06cce063143144a79c0b4979ed5ec27548da6f127176a420c1c3f17ce
2025-09-04 09:26: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
7fa9e45746 Add test case for pushing WHERE constraints into a UNION sub-query that uses virtual tables.
FossilOrigin-Name: 13c80e903ee7f178528918716b11fc0b57fc50b923dcd8aeabf9e6e04e93cdae
2025-09-02 14:59:16 +00:00
stephan
6f341f499a Latest side-stream autosetup/proj.tcl for improved compile-commands feature detection.
FossilOrigin-Name: 55744ca8b8f2f95ba8bd3e01ef89e21e26c8547912c9d5637afe772d17f34486
2025-09-01 13:01:20 +00:00
stephan
f91151bfa1 Fix a line-wrap change made in [50234bc9e9fe58da] which broke the docsrc build by splitting a link reference across two lines, which the doc processor does not like. Problem reported in [forum:ea1fe5f421549899 | forum post ea1fe5f4215].
FossilOrigin-Name: 321938063e2d6c579b992bbbed5210c8a051a8b2fe858bb88f95dbd8fb0f35dc
2025-09-01 00:32:43 +00:00
dan
20bfeccb65 Update test script reservebytes.test so that it works with the "prepare" permutation.
FossilOrigin-Name: 4ac774364b693a4b992c997c64bf425e2765133a7a25963cbf2b02c180eeaba5
2025-08-29 16:51:16 +00:00
dan
f942995fd2 Ensure POSIX builds work as expected (no extra usleep() calls) if SQLITE_ENABLE_SETLK_TIMEOUT is defined.
FossilOrigin-Name: f04a826bac1620b28c32252fa2ceaccc5dfbb21405a6a98942f95d3d1ca89acb
2025-08-29 15:56:38 +00:00
stephan
62ed0b79da Add 'from a check-out' to the mksqlite3h.tcl manifest instructions.
FossilOrigin-Name: 7728a74ca87934c333a66e46dc1f88ce572473e345d9ff20e5d566c0e26da82d
2025-08-29 11:21:08 +00:00
stephan
a00b9b99ba Fix the mksqlite3h.tcl SQLITE_SCM_... changes to work from out-of-tree builds. Problem reported in [forum:812f8d6ff4|forum post 812f8d6ff4].
FossilOrigin-Name: 127f0ab16370fe02b4456669bf60e45ce8c96c4e24b2db3080eaf376d77e0df8
2025-08-29 11:09:20 +00:00
stephan
9976684d26 Remove some commented-out debugging lines and fix a doc typo. No code changes.
FossilOrigin-Name: af32cb3e30ee527a89768b98d8646e2b25d3fb642e61e805187bb3e4613b0960
2025-08-28 17:10:44 +00:00
stephan
8200750eb1 Add macros SQLITE_SCM_BRANCH/TAGS/DATETIME to sqlite3.h, pulled from the fossil-generated manifest.tags.
FossilOrigin-Name: db6b6240ad465f865dd2ca8fa0cdfba8b5315c45041b91b76efade6427c213e1
2025-08-28 17:05:37 +00:00
stephan
dca1f04f07 Remove sqlite3expert.h from the compiler invocation for that tool, as it (A) doesn't need to be there and (B) it causes some compilers problems (as reported in [forum:a1085109e7db4cf3 | forum post a1085109e7]). This bug was faithfully carried over from the legacy build.
FossilOrigin-Name: 9f0a16f6e893d51f760a8c1e2cb4709fdd16ccb2c0258695767f8305f407f4ac
2025-08-28 15:04:52 +00:00
dan
1df00568b3 Add test to ensure that changing the number of reserved bytes in a database using VACUUM does not confuse other connections in stock SQLite.
FossilOrigin-Name: 6bf54bbc4d503e8ebeb804dfb318383770e85d434dacbbbd8f6dadc7595b1856
2025-08-27 11:21:44 +00:00
dan
f8b5cc695c Fix a typo in a comment.
FossilOrigin-Name: d2a74d5c36f600fa8d7dc03f6914482a2afca6e4ff557a0007d14f4304645ba1
2025-08-25 16:41:04 +00:00
dan
3c2b02d919 Check that certain ON clauses do not refer to tables to their right as a separate step after parsing a SELECT statement, instead of as part of the planner stage. For for [forum:ccfb3b5052 | forum post ccfb3b5052].
FossilOrigin-Name: e0beda7ffe92abf6322db8314c42940adab7f89a35d38124355cb3464ee70b9f
2025-08-25 14:27:31 +00:00
drh
08a256958f For the --pagecache option of the CLI, if the SIZE parameter is a
power-of-two, automatically round it up to using the PCACHE_HDRSZ.

FossilOrigin-Name: e7a2ba842cb571df66d204b8d5989ecdc78be7205fdaf1de1783c63c9118d465
2025-08-25 13:04:26 +00:00