1
0
mirror of https://github.com/sqlite/sqlite.git synced 2026-10-23 21:49:02 +03:00
Commit Graph

31133 Commits

Author SHA1 Message Date
drh
ce36cccd36 Fix the "testfixture" makefile target so that it builds with a static TCL
library on Mac-ARM.  Fix the "tool-zip" target so that it uses ordinary
tclsh rather than testfixture to run the tool/mmktoolzip.tcl script that
builds the archive.

FossilOrigin-Name: adf5d624cf109ebd05952e5df62f143f40829070cbcbe43280d371a60db7470b
2025-12-29 12:34:37 +00:00
drh
6693e78772 Test cases for .import, as well as minor enhancements to .import and to .check.
FossilOrigin-Name: 0252ac1c946cd2101f0084f11951b1aeea330dea23b707934c8852d9abe136b9
2025-12-28 21:37:58 +00:00
drh
c00c0a8392 If the filename argument to the .import command is of the form
"<<endmark" then the content is read from the script (or stdin) until
the first line that begins with "endmark".

FossilOrigin-Name: 6e8ab51fbe0ee918bce6ab960c9fb078764aa9721ef41d39818127eb98045d46
2025-12-28 14:32:28 +00:00
drh
38c8014940 Improvements to the .import command of the CLI.
FossilOrigin-Name: 436ed7937bcd3b5781539d883ff2957b81d74abccb75f65a2ffb7446a5944522
2025-12-28 14:01:52 +00:00
drh
35f37ec959 Change a single integer variable to 64-bit in the tokenizer to avoid
any possibility of an integer overflow.

FossilOrigin-Name: 69cf692a24d714305b2e4c8c4c40f70dc6510c26b8db7e5249f32a53e44c7e5c
2025-12-27 19:57:59 +00:00
drh
7f56d23f9c Work around the Windows "Worst-Fit" bug in the "sqldiff.exe" program.
FossilOrigin-Name: f41851587328f8b434e66987765324b7bf5746ecdf3a9f2869000276e0f79401
2025-12-26 20:13:32 +00:00
dan
4056656047 To ensure that the sqlite3_hard_heap_limit() call it makes is effective, add "sqlite3_config(SQLITE_CONFIG_MEMSTATUS, 1);" to fuzzcheck.c.
FossilOrigin-Name: f7736af849d910f04d8622ed7c6e705d84cf22f0a73dca0f30eead9bd1f28bc7
2025-12-26 17:23:25 +00:00
stephan
91d0ffa576 Doc typo fixes in the configure script pieces.
FossilOrigin-Name: 8ab37d9fb909dc6bfbede004f342e6c1625c99df9b316807dc77a9a636ee6873
2025-12-24 18:12:08 +00:00
drh
683df60dbf Enhance the omit-noop-join optimization so that it is able to omit a
chain of noop-joins.  Optimization improvement suggested by
[forum:/forumpost/11a53f2bad|forum post 11a53f2bad].

FossilOrigin-Name: 5a85b83b9f21ad88938e273bb35b398e91133424683e915836f322b69f277673
2025-12-24 14:03:15 +00:00
drh
337fce82f0 Additional changes to support the ".schema" command on builds that omit
virtual tables.

FossilOrigin-Name: 6b5c0374fa81cf069263bebf9b740573de4f82fde3c4e5796af80dcbe6a1a2e7
2025-12-23 17:24:10 +00:00
drh
f256886b8e Fix the ".schema" command in the CLI so that it works on builds that
omit virtual table support.

FossilOrigin-Name: b4e3c8170a107b2018fe5374495dbec14c851ccbf7419cd382991b2fe68c45e4
2025-12-23 16:51:49 +00:00
drh
8511ee1e19 Harmless typo fixes in shell.c
FossilOrigin-Name: 519877cdbde80071ac08f2e467ef8b9679816dc486cf6eb87ec2d9a38c819f88
2025-12-23 11:13:52 +00:00
drh
766389bd65 API documentation enhancements.
FossilOrigin-Name: 99ac94cb9a7a76312cda2d236dcc0c92b2ca269456daed06a1c2674c4f326867
2025-12-22 17:06:37 +00:00
dan
add73c831b Add the SQLITE_PREPARE_FROM_DDL flag to sqlite3_prepare_v3(). Use this to prevent fts3/4 tables in non-trusted schemas from calling unsafe SQL functions.
FossilOrigin-Name: 26f39ac806a5582fab1497e38a4ce68dad2b79df8c8aade43c4e21eed7576931
2025-12-22 15:22:02 +00:00
drh
8d41b94bb4 Fix spurious error log reports caused by [d25c8a6222d4e3f2]. See
[forum:/forumpost/d2326687662430c1|forum post d2326687662].

FossilOrigin-Name: 403dafc7790a2e8d1772537800760addc47d3e3555bda343c3991d56c1b36e70
2025-12-22 12:33:27 +00:00
drh
3b81f93532 Fix a harmless signed integer overflow warning in the ieee754() extension
function.

FossilOrigin-Name: f43d3339c1f06aabcb8e678ed4b91a490cfd0bc880c642ce9c1138c7e08cb360
2025-12-22 12:00:57 +00:00
drh
19a3f74bdc Remove unused thunk cases from os_win.c, so that it will (hopefully) compile
again on WinXP.

FossilOrigin-Name: eb2c020481dd591f459cf7191d18c2499aeec210fc3fc27bb35e5abc0d9cb6d8
2025-12-22 11:28:16 +00:00
drh
174dabe096 Add experimental compile-time option SQLITE_ALLOW_TRIGGERS_ON_SYSTEM_TABLES.
FossilOrigin-Name: f916bcc8657a4db2d069018751815f2ad91851499add761b1eb119f265b72a09
2025-12-19 13:17:40 +00:00
drh
683c563241 Bug fix in the vt02.c test virtual table.
FossilOrigin-Name: a7a73d30c552195c95c282688eb3d067746c722b702c7f2ba151996ec92136f5
2025-12-18 20:44:48 +00:00
dan
65bc1f0ff4 Allow queries that use "GROUP BY e1 ORDER BY e2" where e1 and e2 are identical aprt from ASC/DESC sort-orders to be optimized using a single index. Also allow virtual tables to optimize DISTINCT in cases where the result-set of a query does not exactly match the ORDER BY clause.
FossilOrigin-Name: fba29a8b560d839e42c2a46421ab870da6e6ed6e15a17aa51f223e32ec3aa8ae
2025-12-18 18:47:49 +00:00
drh
ae66a8d760 New options for vt02.c that allow tests to configure it to partially
de-duplicate a DISTINCT query.

FossilOrigin-Name: 1c65bb6e5d92cf39c409b7f870253571ec96b48abf87e5ed931cabd86f582069
2025-12-18 16:14:38 +00:00
dan
ce46f82bc4 Improve tests in bestindexF.test. No changes to non-test code.
FossilOrigin-Name: 347d4d34c1815827e7049e57830c1fff67f6eb16ae5cc00839e35d94bac81e92
2025-12-18 16:05:05 +00:00
drh
4461335b00 Better orderByConsumed logic in the vt02.c test virtual table.
FossilOrigin-Name: 612c1ece6752e3318fc688717ad6a82219b85df7d32e4e07dbc2f361a5aeeee4
2025-12-18 15:35:50 +00:00
drh
1b7b75679a Enhance the sqlite3_load_extension() so that when the entry point is
not specified, after trying sqlite3_extension_init() and
sqlite3_X_init() where X is the alphabetic part of the base filename,
if neither or found it tries again with X as the alpha*numeric* part
of the base filename.  Hence, a shared library named "vt02.so" can be
loaded with just ".load vt02" and without having to specify the entry
point separately.

FossilOrigin-Name: acc95f24cc034408de1e9225aef4dae8bf76beec812c152bea32db95f7d2b854
2025-12-18 14:01:43 +00:00
drh
93c6b19f92 Enhance the vt02.c test virtual table with the ability to process
ORDER BY DESC.

FossilOrigin-Name: 35461a8d5a103e373e5b38b3974a3bb1074e914e862825108713b36bef04b6bd
2025-12-18 12:49:44 +00:00
dan
6c2f5dabf4 Fix the return value of sqlite3_vtab_distinct() in cases where a virtual table query has similar GROUP BY and ORDER BY expression lists.
FossilOrigin-Name: d017ae8640f24543ad5bf37a3e514c1e919730b8c686255c61890448ba22b3e1
2025-12-17 21:00:06 +00:00
drh
89bc8e8a34 Fix a FILE* leak in the CLI
FossilOrigin-Name: 7986a35d27fe0cfd7d9a3bfec0ee0d1c5556b24d571bb68c35dd5eb7251e423c
2025-12-17 13:10:23 +00:00
drh
93ecf30068 CLI: The .imposter command matches the index name regardless of case.
Minor fixes to .check.

FossilOrigin-Name: 989ebba9ad263abafeddaf4a0e3e1275e83a3a12d7f95c7a451ecf8cbd64a583
2025-12-16 13:43:35 +00:00
drh
6c26b5db71 CLI improvements. In the .check command, ignore leading and trailing
whitespace unless the --exact option is used.  In the .limit command, do
not print the new limit when changing the limit, but only when requesting
the current value of the limit.

FossilOrigin-Name: d72cb66d672d514822b2fbb0be8880377628599f1f8e2a219d36791c125c6242
2025-12-16 13:25:45 +00:00
drh
28ec7be607 Stricter enforcement of the LIKE_PATTERN_LENGTH for the regexp extension.
FossilOrigin-Name: c94b1e9c5674f7d0ad75d91085262f38cba6036979e8a0f9d39edc7db841915f
2025-12-16 13:13:21 +00:00
dan
a1dbb7a93e Fix for optimizing "SELECT DISTINCT ...cols... FROM vtab" in cases where the virtual table implementation is able to deliver results sorted by "...cols...".
FossilOrigin-Name: 80c0d922937615422e813593ac4eb83c3040a417fad97dba18a549de50a91b72
2025-12-15 18:45:22 +00:00
drh
97601244e2 Enhance the vtablog extension so that it shows the value of
sqlite3_vtab_distinct() in xBestIndex, and so that provides the new
consume_order_by option that can cause xBestIndex to set the
orderByConsumed flag.

FossilOrigin-Name: b158fe929929ae209f2603b11a2c4f44ad9147f6b2ce09a10ec1f92429402631
2025-12-15 17:32:56 +00:00
drh
22546e1d7e Clarify the affect of nCharLimit, nLineLimit, and nTitleLimit on the
xRender output from QRF.

FossilOrigin-Name: 881534858de8bccffca53e7256a725378a98a354e792374d972b120880c2ae78
2025-12-15 13:58:41 +00:00
drh
586a649698 Fix the test/vt100-a.sql script to use .testcase and .check.
FossilOrigin-Name: 5cf9e99ff8279530cb73a24794107591f8dab755fe78acd6c11429e532f3d1bf
2025-12-15 13:26:27 +00:00
drh
e2bb4cf412 Enable an ORDER BY clause to refer to columns in outer queries.
FossilOrigin-Name: ef9b4b1e4690c889c48f4e725d42127c46f60c6bf2023ae79bf1e9c6c83368ec
2025-12-15 11:59:47 +00:00
drh
76f1fe2942 Use the correct wildcard character in sqlite3_strlike() in the previous
check-in.

FossilOrigin-Name: 87bca1250c5e660debbb29c5fabb89082c2d2059fc8b5851e1b1a519c3be7fc1
2025-12-13 23:18:04 +00:00
drh
5266818aed In the CLI, if a command-line argument names a file and the filename ends
with .sql or .txt, then process that file as an SQL script.  Use this
feature for better testing.

FossilOrigin-Name: 19cc0522e2255f21f6fb6af1442c2ba122fdd4deacd9ea2c181ce9e597b88770
2025-12-13 21:11:49 +00:00
drh
ce43bf85fa Back out the --compat option from the CLI.
FossilOrigin-Name: 850d5dbfb0f1eacd1e5213759810ec7e5eba4fcc0b2718dabccd5b269b126f1c
2025-12-13 00:13:40 +00:00
drh
4f3ab29aab Get the .testcase and .check commands working in the CLI.
FossilOrigin-Name: 1ca31e1a297c0d53d068afb658ce6602887cda0f3eaf42cd629c4d1b7204f0b0
2025-12-12 18:22:07 +00:00
drh
d031267c17 Add new assert() statements designed to detect and prevent the kind
of system interface numbering errors that happened in [108691a3cb2f296f]
and that were not fixed until [fe49703034bd23fa].

FossilOrigin-Name: 4e6e551c89c4f18299b3d60369f439e80f2fe2b0e70199f649821b1dbf20c668
2025-12-12 12:06:42 +00:00
drh
48915e7c7d Omit unused entries in the aSysCall array for the Windows driver. Fix
incorrect numbering in alter entries of that array.

FossilOrigin-Name: fe49703034bd23fa8f43ffdf0e23ec9613688d957adf96b3f1ea86fb02a8d86b
2025-12-12 11:50:37 +00:00
dan
462289df52 Remove from os_win.c a reference to unused system call CreateEventExW() left over from the now removed winrt support.
FossilOrigin-Name: c68ef69ec97da0312b95375b3af159f8a06ce1a69376d042c557dcca18d3f77e
2025-12-12 11:02:18 +00:00
drh
63f1fb40be Fix an inaccuracy in the qrfRelaxable() routine in QRF when the input is
an empty string.

FossilOrigin-Name: eb8a519571f7d35b81cbdbe668da45b33e5505d9a038305129df7ba2c16fd3b0
2025-12-12 10:21:52 +00:00
drh
5eba66ad66 Include the latest Makefile.msc changes and the new "make.bat" script
in the amalgamation tarballs.

FossilOrigin-Name: 6deab75874acfa183e51b8ae8d9305e8d09072bb6c646859ed40beb46e91fe0f
2025-12-12 00:21:10 +00:00
drh
c2cd606f8a Prevent a malicious delta from causing an integer overflow in the
fossildelta extension.  This code is not used in the SQLite core.

FossilOrigin-Name: 01409738afc2c0d5bdaa248ffb508aa5f36a66390f6b8e4834734529ee8ed2fa
2025-12-11 23:24:05 +00:00
drh
b304b0d165 Update build instructions for Windows to explain how to link against
ZLIB.

FossilOrigin-Name: e785a80e4100c368dca8d73cb662cff4d0fd76734fa0f3fa9b5754a380f7c746
2025-12-11 18:16:39 +00:00
drh
e29acd77c3 Adjust the MSVC Makefile so that when it invokes the zlib makefile, it
changes CFLAGS to use the correct -M compiler option to match SQLite.

FossilOrigin-Name: ba003c7c74fb4dd665a8ec6dea7d030f1e7e9cbb13e60bb728860ebffdff5aaf
2025-12-11 17:49:17 +00:00
dan
9334b9f1b8 Fix calls to sqlite3_wal_checkpoint_v2(SQLITE_CHECKPOINT_NOOP) so that they do not return SQLITE_MISUSE.
FossilOrigin-Name: 117f4093f08e0abbde2041f70898220e237e250664f6ede6d4eb2a8a44050466
2025-12-11 11:05:26 +00:00
drh
c0160fa11a Use macros for the default values for QRF limits in the CLI, rather than
hard-coded magic numbers.

FossilOrigin-Name: 4ef66da15bfe69d940cfbeff2be2b7e13da156495b349b453d68e70f4dcca36a
2025-12-10 19:43:06 +00:00
drh
85fb541ac0 Various improvements to the .mode command of the CLI, and especially to how
it handles the --limits option.

FossilOrigin-Name: f883b854976d2aa679c87edce3b577f38b5fa518f707706320d1ddb38365e2dd
2025-12-10 19:04:49 +00:00