Commit Graph

30999 Commits

Author SHA1 Message Date
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
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
4b6e26c29f Fix a potential UAF in sqlite3.oo1.DB.exec()'s teardown pieces.
FossilOrigin-Name: 7e99e93cddeba555836206a278c5dcfd8565cc2a486a83cffab64dad168e9464
2025-12-01 19:19:06 +00:00
dan
7b60ed803b Fix a memory leak that could follow an OOM on this branch.
FossilOrigin-Name: 3223fee0b93bbbe277b955a98c13bb583ded78109f8e601c9ec0a7bd3749fd55
2025-12-01 18:11:08 +00:00
dan
73937f0ca8 Fix another crash on this branch that could follow an OOM.
FossilOrigin-Name: 75c49267ec6b84c8aad0e264c34506e4b24f69475ae5def0ee7530ba3822c15d
2025-12-01 17:39:04 +00:00
dan
928276043b Merge latest trunk changes into this branch.
FossilOrigin-Name: 230fd5533e07ec36f1938f34153c9ef97a7acd6604d023b56dfc5269ca6173c2
2025-12-01 17:22:35 +00:00
dan
ac0f2d5897 Fix a crash that could occur following a parse error on this branch.
FossilOrigin-Name: 951b4533509fae971e252be3ecd3623ac2bdce16220e0ce372e600f728f80f69
2025-12-01 17:22:15 +00:00
drh
ea1020908c Disallow the undocumented -recovery-db option on the ".recover" command
of the CLI when in --safe mode.

FossilOrigin-Name: 65202440874a7fea5aba262e8e78b97c833147d47837a99f301eca968f9a78b1
2025-12-01 11:07:31 +00:00
drh
a4f0592c5d Tweaks to the wcwidth() algorithm in QRF, for better agreement with
the Terminal on Ubuntu.  There is no perfect solution, as different
ttys do things differently, but we should try to get as close as we
can.

FossilOrigin-Name: 35f39f7cb1030b1a57f2921f50ab600496fc1e774593717845e87f2e47dc49ba
2025-11-30 23:09:24 +00:00
drh
4ee2e72c58 Improvement implementation of the previous check-in: runs faster.
FossilOrigin-Name: 484d1fd2a240c8fd006e7794936d6678b8db792a8b2b30d2ae5baf5a1b19463a
2025-11-30 17:47:27 +00:00
drh
db2065aca0 Block injection of hyper-oversized SQL inputs into the parser.
FossilOrigin-Name: 42b6dab92464833eeae5fb261ed689e4b632132d7c8e1ea920aeeb5d50091ab7
2025-11-30 17:26:53 +00:00
drh
8de06cf3b4 More tweaks to the README.md file.
FossilOrigin-Name: 1d79220ac9f6ad783dee48d341ebc9bb58f357b585baf1612b5aebbf8ad0cccb
2025-11-30 11:12:37 +00:00
drh
c90bd32d5d Correct to the README.md file.
FossilOrigin-Name: 3cd3256c7c595f54c8c12fafd1fb60349db82f69eb54fd9896b24db46a8b00d0
2025-11-30 10:49:09 +00:00
stephan
9a07531d88 Doc typo fix.
FossilOrigin-Name: a2b53a71e9354260c7fd0ada093cebd56a20a04add12ff2a2d788c386bf8964f
2025-11-30 07:56:40 +00:00
stephan
090acb4ead Add sqlite3_db_handle() to the list of functions which are guaranteed to preserve the current error state, per request in [forum:8e79e8ddd5|forum post 8e79e8ddd5].
FossilOrigin-Name: 78bdc766330c35dbfa8b187854c48c3aff66a9d58796c9c20f3a5701e1ee4351
2025-11-30 07:25:59 +00:00
drh
9c2e031442 Additional defenses against using the ".open" command of the CLI in --safe
mode.

FossilOrigin-Name: eec0b80e53bb54ee05a4903cfb967cc2914cdcc735f1218922a0f9c80399c3e8
2025-11-29 18:59:58 +00:00