Commit Graph

31081 Commits

Author SHA1 Message Date
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
drh
a0a63a0408 New test cases for QRF
FossilOrigin-Name: e49c63e31888c6787ab13f736d58ff985a24c3f98b475e05c30e8b244afffb80
2025-12-02 18:37:49 +00:00
stephan
b6306586ec kvvfs: make the filename suffixes -wal and -shm illegal and teach xAccess() to silently not fail for illegal names (else it breaks things when a -wal file is checked for).
FossilOrigin-Name: 2ea29c77a85236ca4126c05c7fd1d45a80dfe3f653af9b3ed86d6e62877ec5af
2025-12-02 18:28:22 +00:00
stephan
b58b45d48e Get kvvfs::xAccess() fleshed out.
FossilOrigin-Name: d947e9bed5affee3f6e54b0fe3e2b1a0ac3771865b93c06a4087318f26d87f7f
2025-12-02 18:10:53 +00:00
stephan
6993f52d94 Consolidate kvvfs's page size workaround into a central flag and add some logging to facilitate testing and debugging.
FossilOrigin-Name: 8d683130d2f2aaf6300a8c858802eb671e831ed520621af59c9e830e87a9d753
2025-12-02 16:29:28 +00:00
stephan
22b1bc9997 Add more logging to kvvfs to try to trace down why it cannot recover from a page size change.
FossilOrigin-Name: 0bf0b8a98a2cc5128aa0e510ef2fe411a6859ce807d6159175f5eaf3bc14183b
2025-12-02 15:47:32 +00:00
drh
8df04c3f41 Fix a harmless compiler warning in the previous check-in.
FossilOrigin-Name: 601c40a1d9e1bcd9c453210c275001543d1533af25b4ccf399d5ef4ea1328950
2025-12-02 15:01:29 +00:00
dan
d200379aff Fix a problem with ALTER TABLE DROP COLUMN commands where the column being dropped is the rightmost in table and is immediately preceded by a comment containing a "," character.
FossilOrigin-Name: c872bd1ee7b219e055f40e43766e4ed6bc2d2ca8cb92577cd3560f4173b1f257
2025-12-02 14:43:59 +00:00
drh
9fb597aed1 Add developer note on how to measure coverage of QRF.
FossilOrigin-Name: 0fdd453c03addb8f5c1e546f7513e3498bccd61266174ce99a61ceebf04e97cf
2025-12-02 12:23:24 +00:00
stephan
9d6b913098 Begrudingly allow sqlite3_js_kvvfs_clear() to work for opened storage only for the local/session storage cases and only (one of the demo apps reminds me) for backwards compatiblity. Likewise, the JsStorageDb.clearStorage() inherited method is now deprecated because it requires an opened db (but continues to work for those two stores), whereas its 'static' method of the same name is unaffected. Rename kvvfs.size() to kvvfs.estimateSize().
FossilOrigin-Name: 09e9255828ed6a7ccbe18f701f4a88b859cfdbd1ddca7ac5dac09744542c25fa
2025-12-01 22:20:54 +00:00