0
0
mirror of https://github.com/sqlite/sqlite.git synced 2024-11-23 23:57:41 +01:00
Commit Graph

18923 Commits

Author SHA1 Message Date
drh
8ff67df7ac Fix another issue in argument expansion on Windows for tclsqlite3.c in
interpreter mode.  Problem introduced by check-in [9b87ea219bce5689] and
unfixed by [cd942dce148c9d8f].

FossilOrigin-Name: 0fe1622cec95b7ebecc127ee57a08113d3da1dadbe72c03a13d6751b3043e50f
2024-11-22 17:41:00 +00:00
drh
ed271dc7ea Fix harmless scanbuild warnings caused by the introduction of the
".dbtotxt" command into the CLI by check-in [b43acf5a8cd4a5ef].

FossilOrigin-Name: 554d8fbd865436ace900859874b6c8c7e1b782184158a86b7788644e27bd1997
2024-11-22 12:29:35 +00:00
drh
38fdb2a857 Fix some harmless scanbuild warnings in the shell.
FossilOrigin-Name: 9ba1c9b505d459366274043c1c5327f1a9d4e15d3564d99f8a15926af1d6d247
2024-11-22 12:07:21 +00:00
drh
f0a9af433a Fix harmless compiler warning caused by [c77a4a42f2e3d164].
FossilOrigin-Name: 063690d2c5cc2a887055b9141d3fcdb4fd2fa35d069c9a39b81903c531c73fcf
2024-11-22 12:00:31 +00:00
drh
9edb535bdd Make ".scanstatus" an undocumented alternative name for ".scanstats" in the CLI.
FossilOrigin-Name: f20688efc2bc54648618b0aa2593a771f455ee8cc703b52273452d15e680b67c
2024-11-21 20:57:11 +00:00
drh
9bf5bea607 Document that -nofollow does not work on Windows. Fix Windows symlink
test cases for when the test suite is run as administrator.

FossilOrigin-Name: 4de8a75ec5a2e3655a2d0c5a9333b58f8b48b681255f0a01866b610ae6249bc2
2024-11-21 01:50:01 +00:00
drh
2722e2e822 Bug fix in the SubrtnSig logic from [c9a3498113074bbc], if a subquery is
copied and then changes are made to the copy, be sure to give the copy
a unique Select.selId value so that the original will not be substituted
in place of the modified copy.
[forum:/forumpost/0b9ded2f8428ac00|Forum post 0b9ded2f8428ac00].

FossilOrigin-Name: 19d1bede5654bcfa9f7a151b9b2616a3d10873b8e3f8cf54a3a7e810da08f844
2024-11-20 14:59:32 +00:00
drh
d4a65cfc51 Provide the sqlite3ShowWhereTerm() interface callable interactively from
a debugger, when compiling with SQLITE_DEBUG.

FossilOrigin-Name: c77a4a42f2e3d16427a69295436efe36335e56e97abd0efba814092498a8dea8
2024-11-20 14:19:44 +00:00
drh
9566982328 Do not report an sqlite3_error_offset() for errors that occur inside of
views or triggers, since the text of those elements is not part of the
original query.

FossilOrigin-Name: bf66c6dfc25c2562a4e6a5b24dd1660213a8fefbb5763e7583b87fb06dbaaf43
2024-11-20 11:34:16 +00:00
drh
12599d566b Attempt to reduce divergence with the wal2 branch.
FossilOrigin-Name: e0d8f9916c2d899094b71af74f44e089a97db6d80f09eb80a5d8be733c1bf942
2024-11-18 17:05:45 +00:00
drh
5cad859f61 Attempt to reduce divergence with begin-concurrent.
FossilOrigin-Name: f783d90187fb326faa3d0244b30138b023c4a8483486f260b7a022a927c13f3a
2024-11-18 16:44:26 +00:00
drh
bbc6e5c9b7 Make the --vfstrace output from the CLI go to the same output channel as
everything else.

FossilOrigin-Name: f71d4900205ae6ee41f849c4026d0fe4d6cf281dfc3bac8105fc8e242d128b67
2024-11-17 11:42:43 +00:00
drh
70d390134c Call fflush() on ".echo" output from the shell, so that the output to
stdout is aligned with output to stderr.

FossilOrigin-Name: c38b9db3c4f71706a7d211424da64311e6e5daf64b224565a6d82d4b1a68e261
2024-11-16 18:54:46 +00:00
drh
18689b8fb2 Fix argument expansion in sqlite-tclsh on Windows such that if an argument
does not match a filename even after glob expansion, it is appended to the
argument list verbatim.

FossilOrigin-Name: cd942dce148c9d8f5a94cee61923aad8d1b732b807e004005f78323be30c02e7
2024-11-16 17:39:34 +00:00
drh
ea13658566 Remove some obsolete macros from the CLI.
FossilOrigin-Name: 5c4eb625709eda24b11a0437b150a60fc1497c136a4a2ab2b9d559d893dd397a
2024-11-14 15:55:19 +00:00
dan
c87d7bede0 Fix a problem with window functions min() and max() when used with a FILTER clause. Forum post [forum:/forumpost/e9126d554a | e9126d554a].
FossilOrigin-Name: d15fb0f75e64bbfdb8df0c0d0358aafbbd7d5e2048df676dafe1abd5e9917f2a
2024-11-14 14:38:16 +00:00
drh
26c080a04b Fix a memory leak in the ".dump" command of the CLI that can occur if an
error other than database corruption is seen while trying to query the
database.

FossilOrigin-Name: 2560cc7072c923f534a5de1e15d2b0dd4ac5faf0a8876d9e3bf9804345585444
2024-11-13 18:04:49 +00:00
drh
1b37bc0e66 Add the SQLITE_FCNTL_NULL_IO file-control.
FossilOrigin-Name: f0e917fcf51b59f8ccfe5b9341937341d0e6016eb275d6c33dcb10b0b301a9da
2024-11-13 14:58:35 +00:00
drh
7b32f84ebf Clarify the documentation to make it clear that rows inserted by a
CREATE TABLE AS SELECT statement are not counted by sqlite3_count64().
[forum:/forumpost/1e6cde5648|Forum post 1e6cde5648].

FossilOrigin-Name: 5c5982e3937acdcda43d6c5b46a95b82bc1839c3558a4b9ae9022384e0f13f04
2024-11-11 21:11:02 +00:00
drh
be46f935dc Add the ".dbtotxt" command to the CLI.
FossilOrigin-Name: b43acf5a8cd4a5efbb90b71af7710084f49bb90ffe4f56de168e8c3a6b679124
2024-11-11 19:07:58 +00:00
drh
4ddeccfc15 Increase the minimum SQLITE_LENGTH_LIMIT from 1 to 30 to avoid problems doing
simple things like converting strings into integers.  See also
[8fd5b8ec4ab9b555].

FossilOrigin-Name: 6aa01707af4bd96f0f173f9e87f2398be7e6f246f59baa117092849a626b2d61
2024-11-08 20:57:45 +00:00
drh
c00d89d599 Further improvements to the ".mode json" output in the CLI.
FossilOrigin-Name: 6201b5707f8c895028f9c08cb4f83d33a16a91bf04ed3830ac51aa763d6b7205
2024-11-07 12:03:53 +00:00
drh
edf7efc61c Improve the ".mode json" output of the CLI so that it encodes U+007f using
an escape sequence.

FossilOrigin-Name: 8b58cf9bbd3090c60f1ee7468cdeeb0b0fa4560d1e51a5fd0bef43692d10fe04
2024-11-05 23:26:31 +00:00
stephan
710d00aa6f Change a (#define HAVE_FCHMOD) to (#define HAVE_FCHMOD 1) per user request in [forum:24cf6020c6|forum post 24cf6020c6]. There's no semantic change for this tree, but this is consistent with how auto-config tools would define it and the empty #define interferes with some downstream code.
FossilOrigin-Name: 9c46d84f3bf2f5876211b498104067d32a4000979fad1345deb1000c23716d75
2024-11-05 02:38:32 +00:00
drh
c6a6f1507c Fix harmless compiler warnings.
FossilOrigin-Name: bc93e17924f732468282c5e7a483811d27af573a47aec8ba806f4fe3c5919893
2024-11-04 19:18:19 +00:00
drh
bc60d7bee9 Ensure that the database encoding is detected before the code generator gets
too far down into byte-code generation and execution, but not so early that
it interferes with initialization.
[forum:/forumpost/bc75a4d20b756044|Forum thread bc75a4d20b756044].

FossilOrigin-Name: af7173a10ec6a4ab465207c1ee20393e8b5f06604c0f3b2fdc19e52c2fc013d5
2024-11-04 19:08:53 +00:00
dan
4bf24c8830 Avoid loading the entire record into memory for an sqlite3_preupdate_old() call that retrieves an IPK value.
FossilOrigin-Name: 7f4de43733200beeb3ff0a70d51bbc68f5331895698ea95a82741cfd7bb66834
2024-11-04 16:59:02 +00:00
drh
d27f6d7881 Extra defenses against UAF when failing to allocate a transient cursor. No
known path to a UAF currently exists.  This change just helps with the static
analysis to prove it.

FossilOrigin-Name: bae05811116dae0d05bcc001655416d0316ca1c16cbde2bd49f691c832261b89
2024-10-31 17:23:40 +00:00
drh
9bcb0a510f Fix the CLI so that it can use either the canonical Antirez linenoise
(with HAVE_LINENOISE=1) or Steve Bennett's enhanced linenoise that works
on the Win32 console as well as on Unix (with HAVE_LINENOISE=2).  The
./configure script detects which one to use and sets HAVE_LINENOISE accordingly.

FossilOrigin-Name: c0048e4482e9cb9662637899922af9609e7c8fb002a37b71e6181074df7a0dd1
2024-10-30 14:03:56 +00:00
drh
8b3ba8eb5a Enclose the generated "sqlite3.c" and "sqlite3.h" in a single big #ifdef so
that if they get truncated by more than a little whitespace, they will not
compile and the truncation can be easily detected.

FossilOrigin-Name: c3b624e2a903f0c975bc8b7288b98616a4a22b2a574738d1f578bfad1d6d8b91
2024-10-28 22:35:32 +00:00
drh
bc4df6079c Remove the never-used and never-documented and long-ago deprecated
user-authentication feature option.

FossilOrigin-Name: 3a3f7bf4307c27e56546e51da06ecc9a262cdf155fda2dd359aa2326d207a147
2024-10-28 17:27:15 +00:00
drh
42516b2ef9 Omit the antiquated and long-unsupport async extension since it has been
superseded by WAL mode for over a decade.

FossilOrigin-Name: 10b1b86821bfc21377e7ccceb31146ab01aa6eaf418b85a204abcab5b793958e
2024-10-28 15:38:53 +00:00
stephan
9905e7e22b When readline is enabled, attempt to determine whether the completion API is compatible and, if it's not, disable it in the shell app.
FossilOrigin-Name: 4564dbe4ac0040803b5d139c9fff22a60a45b4769d80ad7c824456cc6b9f1722
2024-10-27 18:46:11 +00:00
drh
5598a3f8da Help systems still using Tcl8.6 to compile tclsqlite.c by changing a
typedef into a #define.

FossilOrigin-Name: 82ab8ff399aafa3a1faec9c85e9d6bdd26636f28f3ea22287999a868bb78db57
2024-10-27 10:33:47 +00:00
drh
4f237f8def Fix harmless compiler warnings. One of the warnings was code that
deliberately committed memory errors to test the systems ability to cope.
But compilers don't allow that any more, so we'll have to leave that
capability untested.

FossilOrigin-Name: 7e7b3b2edbb580c9ac14f21e5caa8f2f6b171d9a7ce6cb336dc0c8db76da7e8c
2024-10-24 15:36:29 +00:00
drh
deb5ad6297 Reorder conditions in sqlite3PagerDirectReadOk() for coverage.
FossilOrigin-Name: da9124fee28c155c4d1cc0d3949eb7b588a7236c12883a010af7909ad8e534ef
2024-10-23 11:33:56 +00:00
drh
98772d6e75 Fix harmless compiler warnings in wherecode.c. One such warning was
identified by [forum:/forumpost/721675f007|forum post 721675f007] and the
other was found by tool/warnings.sh.

FossilOrigin-Name: 987b96aa636c1801f87d3e1c75d34d45c5b6f437bcc6d150298675447ed16b5d
2024-10-23 11:06:56 +00:00
dan
3dbddc5507 Changes to EXPLAIN QUERY PLAN to identify covering index plan that use indexes on expressions.
FossilOrigin-Name: 29fb4919b6118b3b9ae411ec2ed5b59db7fae281909501c5fa238221ba635db5
2024-10-22 20:16:41 +00:00
drh
96501c89d5 Rename to SQLITE_IOCAP_SUBPAGE_READ.
FossilOrigin-Name: dd446ef1816f4e95ce29de0b3841dd0a6c983646fd2dd271c2db8f3263478164
2024-10-22 18:26:03 +00:00
drh
c8284c766a Add the SQLITE_IOCAP_BYPASS device characteristic. Do not allow the
SQLITE_DIRECT_OVERFLOW_READ optimization if that capability is missing.

FossilOrigin-Name: f50ae00ce9ff572e6bd5e2788602ba356383526ab7289622a32fbf52926c6df0
2024-10-22 18:00:26 +00:00
drh
76e48f4d66 Do not typedef Tcl_Size if it is already #defined.
FossilOrigin-Name: 53491688cf622ca317b3ff56156e601c2bdfffc94e4fe471ca82d5ba1d9e875f
2024-10-22 16:19:14 +00:00
drh
4da761773e Move the #include of hwtime.h from the bottom of util.c to the top of
vdbe.c so that it will be available when needed, even for non-amalgamation
builds.

FossilOrigin-Name: 5f23036a87f443c82fa7fd48fdac16a31128bb9288b71f97228c29bcfeb632fb
2024-10-19 13:20:34 +00:00
stephan
624cb96f54 An assortment of comment typo fixes discovered by aspell. Add several new words to tool/custom.txt. No code changes.
FossilOrigin-Name: 59b76a99e4a28f4cc8c4f9f39ff6e039c4d29cb7b44183f1902b5792638656d2
2024-10-19 12:39:06 +00:00
drh
c2e400af04 New assert() statements to validate OP_OpenEphemeral logic.
FossilOrigin-Name: 6d55c3e238e06c6727f3e816a9268b6222ebfc90ec745bbbd48430bf7b16664c
2024-10-18 01:14:14 +00:00
drh
fe15ed4342 Fixes from code inspection:
(1) Extra paranoid defense against integer overflow.
(2) Remove a stray blank line in an FTS5 comment.

FossilOrigin-Name: 8563728deeb1d3ead9ff99a3ad2c7819b2223ead44e7374ecc7bbeda2d955ade
2024-10-17 18:12:03 +00:00
drh
f578ce102e Change the name of the new utility program from sqlite3-rsync to
sqlite3_rsync - dash changed to underscore - for consistency with the
preexisting sqlite3_analyzer.

FossilOrigin-Name: 86e794cbaa5ae600635c933b46298a39f2465daf4c5cd1570f2a03e19ac08d9d
2024-10-16 11:05:11 +00:00
drh
87cb97b0ec Fix harmless compiler warning in flockCheckReservedLock().
FossilOrigin-Name: f369de3d8fa34a403b5c9f6269f7e3fdb16a13784a70460c5032ad4e66615d64
2024-10-15 22:22:53 +00:00
drh
1b59f37c06 Fix a typo in a comment used to generate document. No code changes.
FossilOrigin-Name: 9b4bc5c4c1dc7c4ba359babc71c07ac3a6719971766951a8d2cb1df9e2396a83
2024-10-15 14:28:23 +00:00
drh
dcaae8fd4b Cross-reference the sqlite3_backup_init() function to the documentation for
VACUUM INTO and sqlite3-rsync.  Comment changes only.  No changes to code.

FossilOrigin-Name: 405c23ce02cc7f970e732afc26e01d0267b8fa89d8edc3d53fae2b3bc8405cbb
2024-10-15 14:00:29 +00:00
drh
4924847cb9 Avoid the possibility of buffer overrun in the READ_UTF8 macro by using
an less-than operator rather than not-equal-to.

FossilOrigin-Name: 20e60bf058c54bc818ea1b8ce54ace8bcd50699734713cef622bf79e49a9a279
2024-10-14 18:43:04 +00:00