Commit Graph

31090 Commits

Author SHA1 Message Date
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
stephan 3262f769ee In fiddle, remove the default .dot-commands it runs, as they do not reflect current shell defaults.
FossilOrigin-Name: 27b6aeda5d70e3480b1448b06277a19395b30a205f3f3bac5ce0e4102e3849ed
2025-12-10 16:20:44 +00:00
drh 2f2b5d7b20 Add the --titlelimit option to CLI, defaulting to 20. In "line" mode of
the CLI, the default seperator is changed from " = " to ": ".  This can be
overridden using the --colsep option.

FossilOrigin-Name: 291677ebb3e5c2fe00e4340d8d3661fde6bd18494f1d4e56da1efcf613ab21b6
2025-12-10 16:10:26 +00:00
drh 9d5f00706f Do not show the --titlelimit setting in ".mode" setting output unless -v
is used or unless the current style is tabular or line.

FossilOrigin-Name: a9b0a3ce043fc910465d676c72bcf44c2ff6fbc1b0a832106cd2d3f97c7fb16a
2025-12-10 15:55:44 +00:00
drh 1debc25ef8 Test cases and documentation tweaks.
FossilOrigin-Name: cc9e47a205883aedf24b5e85e8e0499567f514780e3e6ec58069a39ea6270133
2025-12-10 15:50:23 +00:00
drh 9bf37cc3eb Add the nTitleLimit option to QRF. Also change "line" style so that it
uses zColumnSep as the divider between the title and the value.

FossilOrigin-Name: d67a299c86ff80ed67857d2546b0edaf852cb23dbfbc15e24793d1c4860a2e50
2025-12-10 15:24:46 +00:00
dan b4f6c09e60 In fts5, avoid holding an open blob handle after an INSERT/UPDATE/DELETE statement, as this can interfere with sqlite3_interrupt(). Forum post [forum:/forumpost/95413eb410 | 95413eb410].
FossilOrigin-Name: f88e1d03573f394fc7caf60704c96152717b3fe8be4eef0caeb64737054f0fd2
2025-12-09 13:41:01 +00:00
stephan 567dcbb5db Update the added-in-version stamp to some kvvfs JS APIs.
FossilOrigin-Name: 939275c6c574a3354e0626164aab1a005998f811c53a66b078249d6b2fcbd68e
2025-12-08 13:11:17 +00:00
stephan 91479c6b10 Introducing kvvfs v2 for the JS bindings. Summary: no longer hard-coded to session/localStorage, available outside of the main UI thread (non-persistently), a simpler-to-use import/export API, and adds an asynchronous event interface intended for creating page-by-page db backups.
FossilOrigin-Name: ec866b04d088e53b09764d00f5403902785328fd8f3cbf80d3affa166477711d
2025-12-08 13:06:27 +00:00
stephan 50ef2f7813 Replace some double-quotes with single quotes an SQL doc snippet in the csv example virtual table.
FossilOrigin-Name: 1781e5e8d0cd2b508f7992987257416bd48841ea7e30bc9294784a7c1a402be7
2025-12-08 12:24:23 +00:00
drh 1241fe1450 Minor tweaks to the QRF documentation. No changes to code.
FossilOrigin-Name: b2517d01e65b34ea4ca52c9149d7b255a36a45a50b332cb8ccfdacf22e629be2
2025-12-07 18:19:22 +00:00
drh ee9f4acb10 Do not return too many bytes from the zipfile extension given a malformed
ZIP file.

FossilOrigin-Name: 9766b47beb9ec72f55bfe9fa6e4dadf1829848389388aa30e97094a325de17fa
2025-12-06 23:58:09 +00:00
drh 5a05c59d4d In the zipfile extension, only return as many bytes as Inflate actually
generated.  [forum:/forumpost/761eac3c82|Forum post 761eac3c82].
Adjust ./configure so that it builds zipfile into testfixture if ZLIB
is available, so that tests get run on unix platforms.

FossilOrigin-Name: 3d459f1fb1bd1b5e723629c463ab392af7b206ece3388bda216c6a4c26160909
2025-12-06 20:41:24 +00:00
drh 4a33eed6e9 Remove #ifdefs intended to make SQLite compatible with Windows RT. WinRT
was short-lived and has been discontinued for a long time.

FossilOrigin-Name: 108691a3cb2f296f0ede06c34271ee185f299bfd76e97a1bd06c730a28d94ff4
2025-12-06 19:56:40 +00:00
drh 97b5c8c624 Fix a harmless compiler warning inside an assert() in FTS3.
FossilOrigin-Name: 005e176b4e5b3a28865b08c23d6ecd2c76c036b9c6b2075e6d7bfc584d3c433e
2025-12-06 18:40:14 +00:00
drh 6cc0da6e7d Fox the "box" format, use rounded corners and use a double-line to separate
the header from the content.  Add the "-quote relaxed" text rendering mode
and make it the default for TTYs.

FossilOrigin-Name: b3da6a8728641a0c9ca2f3b20c9817c0a2be6c5bf05f020590547480d2aff0e0
2025-12-06 11:54:43 +00:00
drh 4ccd61107f Fix typos and harmless compiler warnings. Omit the use of ctypes.h in QRF.
FossilOrigin-Name: 4f7edadbdeeb4baee2e4a4703def6e258ce00f54684343b73380e7c69165892e
2025-12-06 11:50:36 +00:00
drh 4ddf151841 New test cases to cover the "--quote relaxed" feature.
FossilOrigin-Name: d00d9556edc198d49cf9aa2f14e46bb5b1021ef0622aee1fa4ae585ed9a13a98
2025-12-06 11:35:30 +00:00
drh 5fb9d599ed Update test cases to work with the new box format and with --quote relaxed.
FossilOrigin-Name: e3f442d08f455e0aa260cc8db4922a5f611e17afe71b0bb251328ab4b3ad46ca
2025-12-06 11:02:14 +00:00
drh cff66960fd New text rendering style of QRF_TEXT_Relaxed.
FossilOrigin-Name: d2049bffe6674b8840663b0e5f404a040b715640c87f022517cf11546548fda3
2025-12-06 10:07:15 +00:00
drh a3647d17c8 When drawing boxes using QRF, use rounded corners and use a double-line to
separate column headers from the content.

FossilOrigin-Name: 8c1ca30707c36f074dad29556df4176a74aa573491bb4aad973789aee5ad80da
2025-12-05 22:04:49 +00:00
drh 989e893392 In the Windows Makefile.msc, never set -DNDEBUG. And add the "env" target
which prints out the value of all 127 configuration variables that 
Makefile.msc uses.

FossilOrigin-Name: f82376f080ca5cb316b8eb2e48a128b1838eb376b9e903c7af611b398cfe9b1f
2025-12-05 19:45:43 +00:00
dan 1af2607177 Fix a memory leak in the fileio extension on windows.
FossilOrigin-Name: 19e5ae6e20a1e2f41c5bc77b7bb99211b22d6fabf21e5f2f7f82028615eb791e
2025-12-05 19:23:20 +00:00
drh 8da97114b5 Omit obsolete features (Ex: Windows Phone support) from the Windows
Makefile.msc.  More of this kind of thing is pending...

FossilOrigin-Name: c320c5585833e5e6460c61f88ba4d784613c4317b1e50eae0d58d8ce002c5732
2025-12-05 16:06:34 +00:00
drh 14706ff98d Minor adjustment to the zipfile.test script so that it works on Windows.
FossilOrigin-Name: 7bb633df97678b98515e603c5154ffc5b54055cff187d74a2c5d010e5b3720d1
2025-12-05 15:09:42 +00:00
drh e1a2674f06 Enhance the unixIsSharingShmNode() code (check-in [6385a1962c69c69c])
so that it more understandable by humans, and so that it does not trigger
false positive deadlock warnings in TSAN.

FossilOrigin-Name: aa0a28776bbeafb71b2db20ac8c16377ba07b7d3d58e46cfd11f60c694759a90
2025-12-05 12:22:23 +00:00
drh 38ba1adb36 Another fix to [e33da6d5dc964db8]: Ensure that the EXISTS-to-JOIN break
happens even if the inner loop is a "no-op" loop that never executes more
than once because it is controlled by a UNIQUE index.  This resolves the
error reported in [forum:/forumpost/7992838ba2|forum post 7992838ba2].
Test cases are in TH3.

FossilOrigin-Name: bbded6477020af4d52253c5af2d33ec9b9cd619d33f744206f7420458bd84f12
2025-12-05 01:33:23 +00:00
drh 959e49c081 Update the autoconf Makefile.msc based on the Makefile.msc changes in the
previous check-in.

FossilOrigin-Name: 8dce36698949f2e3a9948afc7c2b6c06f575d12033148e8c55fa79c03a73e2b4
2025-12-05 00:56:51 +00:00
drh 49cde92f39 Automatically add the /NODEFAULTLIB:msvcrt flag to the Makefile.msc so that
Windows builds are able to link against zlib.lib by default.

FossilOrigin-Name: 0b75057d61ccd57fca19d49679f0ff99231595f619aa0c4310aa3180b8de08b7
2025-12-04 21:16:12 +00:00
drh 2087fa2d97 Make the shell_exec() routine in the CLI robust against NULL SQL text.
Fix harmless compiler warnings in ext/misc/zipfile.c.

FossilOrigin-Name: 2ecba7dfd10c7d6a7a34b0ec01a387c9f1426c0504c8f20edc03e29bb9aa93c3
2025-12-04 20:22:36 +00:00
dan 5192fec123 Limit compile time value SQLITE_MAX_SQL_LENGTH to 1024 less than 2^31, or 2147482624. This is to avoid having to deal with edge cases related to 32-bit integer overflow that can only occur in custom builds.
FossilOrigin-Name: d73364555d213e443d8400ed69b134006f4e2fe0054d74fe0828ff01effe5cd2
2025-12-04 16:44:11 +00:00
drh 72e54123c6 Enable TEMP triggers to reference tables in the main schema.
FossilOrigin-Name: 307a500aa6a1f3ac8b154d2e981bb30c90236be26a8c9a8f318d5982c62440dd
2025-12-04 13:42:53 +00:00
drh 001f36f9af Mark an always-true conditional as such.
FossilOrigin-Name: 4f79434f5b52470291dcd09e31fdefba708d0243a2b60966536c6cb91451d203
2025-12-04 13:28:25 +00:00
drh 3749e75c68 Fix an error introduced by the previous check-in.
FossilOrigin-Name: 948e24ae3816d650be66bbe6b880bea74da643af37c4349e6cf2e207e6cf9b28
2025-12-04 13:08:59 +00:00
drh fa7abfdf0b Performance optimization in the language grammar.
FossilOrigin-Name: 1c1ad5e39cb379250f10db5ef61f42e0bd56ace308f8e41f9bf5e08d92075521
2025-12-04 11:59:11 +00:00
drh 5ef150c223 Merge all the latest trunk enhancements and fixes into the temp-trigger-refs
branch.

FossilOrigin-Name: 8e8a27c77aa0ea5891968231e13a8caeade48b817419bbf6eda18ad217f1df63
2025-12-04 11:20:01 +00:00
drh 2121fc4141 Fix an incorrect answer that might arise if a scalar query is both
DISTINCT and contains an OFFSET clause.
[forum:/forumpost/2025-12-03T09:25:59Z|Forum post 2025-12-03T09:25:59Z].

FossilOrigin-Name: aef5397569d65d2971367b0278fe3a6f42544cf771572e7d046e2472f052364d
2025-12-04 00:05:49 +00:00
drh 27a7770f52 More aggressive optimization of IS NULL and IS NOT NULL operators in
the parser.  New sqlite3ExprInt32() internal interface for creating
integer nodes in an expression tree.

FossilOrigin-Name: 560082d61f5b73ae68a86ce4d7e96d072d4f0996d82ec62d639847353bb8bf15
2025-12-03 21:31:53 +00:00
drh 5be3ac87db More aggressive optimization of IS NULL and IS NOT NULL operators.
FossilOrigin-Name: c69eec9909af40e1e22d44a6859ef52378ebe06a587373f332f9d379cb39a84d
2025-12-03 18:18:29 +00:00
drh 1e235b9b02 Create a new internal subroutine specifically designed to allocate
Expr nodes that hold a 32-bit integer.

FossilOrigin-Name: 38d06f69e516dd13becbfb735a2a0035c2f3c50ea5d661a668b109a996656523
2025-12-03 16:54:48 +00:00
dan ab63da3f1c Fix a problem that could occur when a scalar subquery had both a DISTINCT and OFFSET clause. First reported by [forum:41bd7af485 | forum post 41bd7af485].
FossilOrigin-Name: 496bbff910b73775b16c1ccb95dadf37416d3f3032722a1140f2a9134666d7f1
2025-12-03 14:39:25 +00:00
drh 8686ac40ae Clarification of comment text in expr.c. No changes to code.
FossilOrigin-Name: afe5ee64f1cde4945c878220b029f2a22578c2bccda4fddc005c4e6a4718c6cd
2025-12-03 12:07:35 +00:00
drh d9b165b27a Fix recently added test cases for Windows.
FossilOrigin-Name: bccc0d65b0fb617f6c8eb111b6717d3ad419f80d3495dc5c6a69ccd0771b3d9d
2025-12-03 02:48:36 +00:00
drh 25ca71daac Improvements to the ".schema indent" logic.
[forum:/forumpost/c8136b1bd0|Forum post 2025-12-02T19:04:04Z].

FossilOrigin-Name: 71ea7f38ffd0648c58713d8be5d2f5536f926ec21a0adc3c2a8a9a7ba8ea3826
2025-12-02 19:55:39 +00:00