drh
a585374e46
Fix a problems with RIGHT JOINs.
...
FossilOrigin-Name: 6ca269b677c6cdc03628fc4f3634ee1b9b956170f9bc41ba8d37b15cc6571a88
2026-03-12 22:55:20 +00:00
drh
3c7a03032f
Avoid an obscure race condition between a checkpointer and a writer wrapping around to the start of the wal file.
...
FossilOrigin-Name: 5aadfbbdd83b051b5f4a3f06eb60cf9b37aa1d62e676584719e6f785ecf148c7
2026-03-06 15:01:02 +00:00
drh
f3cf1238bc
Guard against oversized index entries in databases larger than 2GiB.
...
FossilOrigin-Name: 492c3a07dea5953e7197abb1098169c2c2126936f97f4b7e8a45d1c7f31ebfa1
2026-01-14 13:49:27 +00:00
drh
b8c49d6f62
Fix yet another bug in the EXISTS-to-JOIN optimization.
...
FossilOrigin-Name: a23d3b50fd7c2013d83f868a3a4114880887ec8fb6e9917b43c243607caab67c
2026-01-03 15:22:08 +00:00
drh
a303f7914d
Ensure that loops created by the exists-to-join optimization use unique cursor numbers, even if the EXISTS expression in the WHERE clause is a copy of an expression from the result-set of the SELECT.
...
FossilOrigin-Name: d485e8fccc7cae338bd4cfe3e23d488926cf09a8c0ccc68b70446bbd8ceda652
2026-01-02 18:53:50 +00:00
drh
323199b57e
Fix a memory leak in the fileio extension on windows. Other changes to
...
makefiles and similar to get zipfile testing working on Windows.
FossilOrigin-Name: 121b327f1f3941a9a44ab2d98e60f6e25b928ca9b54bbaa109239ba9012b3c3c
2025-12-19 23:47:07 +00:00
dan
67767084b6
Enhance the unixIsSharingShmNode() code (check-in [6385a1962c69c69c]) to avoid
...
possible deadlocks with threads in findResuableFd().
FossilOrigin-Name: f65aa46796068800905f6ff25efcb6338f864ce5bf8dcf6c7b9f5613b3973ab2
2025-12-15 14:56:57 +00:00
drh
55385fb79c
Fix an incorrect answer that might arise if a scalar query is both
...
DISTINCT and contains an OFFSET clause.
FossilOrigin-Name: 35b306565a10c16737ee433728ca188852f01c12dfae0cc9212d21db932486fb
2025-12-09 13:29:08 +00:00
drh
334fa0eb5a
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.
FossilOrigin-Name: 0cf6211f0994474dc23ba5f38d2e6d0984360039798293eca757047e66d00c58
2025-12-05 01:38:59 +00:00
drh
158436f53d
A better fix for the issue with RETURNING triggers on eponymous
...
virtual tables and SQLITE_SCHEMA errors.
FossilOrigin-Name: 40ddaca3fb752425c26570365a9f31820786d21d043c1c0a4b49746ff9bc0782
2025-11-28 13:04:31 +00:00
drh
525d297450
CLI shell: ensure that .dump propagates its error code on error.
...
FossilOrigin-Name: 61222410c503916b832c1b76b028f1c73f4839a2067902f5db1d6a4a4459cb2b
2025-11-13 12:22:14 +00:00
drh
2605119d14
Fix a problem in the EXISTS-to-JOIN optimization so
...
that it works with nested WHERE and EXISTS statements.
FossilOrigin-Name: 728fac52017de1309c84c96e33ed99d6472d6b4831587312944b8d85a68d3343
2025-11-13 11:42:16 +00:00
drh
de223ffbbd
Merge various minor code and documentation fixes from trunk into the
...
patch branch for 3.51.
FossilOrigin-Name: 9a00fe5eb69050ddc569d2a857309c2779a48414135f0967531999b7afd84283
2025-11-13 11:34:38 +00:00
drh
15c6d88381
Fix a harmless memory leak in the CLI caused by the --cmd option generating
...
an error message.
FossilOrigin-Name: ab916bad188b150321e420ec0009d909c287e3790b5d6ec683e2df9ed457ff15
2025-11-03 10:14:20 +00:00
dan
7f70085071
Detect some cases of ambiguous column references in USING clauses that can come up with nested joins.
...
FossilOrigin-Name: 38c993c8b7137d6d5623d387292639634297c17da11befec9029f12a16a472f8
2025-10-31 16:07:31 +00:00
drh
a183595edd
Change the name of a file-scope constant array in carray.c so that it does
...
not conflict with other variables names in other files when carray.c is
amalgamated. This is down to resolve a harmless compiler warning.
FossilOrigin-Name: 5afd815ada94d55c9c56efe339235d23ffbf1fb64511a5e460927a2c8deaaaf0
2025-10-31 15:18:29 +00:00
drh
1c19c06246
Fix the output of ".dump" in the CLI so that the sqlite_sequence table
...
is created using correct syntax.
FossilOrigin-Name: 4b9f2e1d4485ad3baf9285aa09b468469be929b18cb308f19af471d7aac66076
2025-10-31 11:23:44 +00:00
drh
da17de532f
New assert() statements to help out static analyzers.
...
FossilOrigin-Name: ba0c4bf072ed721a507855d68bde7f1c388396a19b69814b6e257b934f8b0fd9
2025-10-30 22:10:41 +00:00
stephan
1ed6441bb1
Add SQLITE_OMIT_WAL checks around some functions to avoid defining unused statics in such builds. Fixes OMIT_WAL builds on msys2 and passes tool/omittest-msvc.tcl.
...
FossilOrigin-Name: f9b89535dc279acf617f274b6edbad0610fc8e5c76d402fc8b5b9dc656e95caa
2025-10-30 21:11:01 +00:00
drh
139ec38ac8
Further improvements the ".dump" command to handle corner cases.
...
FossilOrigin-Name: cd0c77934ff32050380c2143bba7d4e6c07d5f08187cb5d5e8e7602854d1cda8
2025-10-30 18:52:48 +00:00
stephan
41fda52f3c
Another (void), as per [dd6edfc09434].
...
FossilOrigin-Name: 7a822cfd388d7ac5765cffd5bd3d6e5b31abc6a360f9d5e27c0223f83a84237e
2025-10-30 18:48:19 +00:00
stephan
7fb2545905
Add (void) to two places for the sake of SQLITE_OMIT_WAL builds. Why these do not complain on tests in this tree, but do on a downstream tree (same machine, same compiler), is a mystery.
...
FossilOrigin-Name: dd6edfc09434b0d170d5ab462053497043016a4ec6b91a46db565ccf646aee20
2025-10-30 18:46:03 +00:00
stephan
916fc1129c
Macro tweaks to get SQLITE_OMIT_WAL building. Remove some nearby stray EOL whitespace.
...
FossilOrigin-Name: c31a944680f18a799c763238dbb0561f8b039905ce442533258905219b33b743
2025-10-30 18:38:14 +00:00
drh
4ebf49168a
Fix a harmless compiler warning associated with flexarrays.
...
FossilOrigin-Name: f02cdf1d3ea8da8a09d115721845afeff5d6169dd7532ab486d3ed6db69cde2d
2025-10-30 17:23:17 +00:00
drh
c5ff2aa7cf
Fix the CLI ".dump" command so that it does not make duplicate
...
sqlite_sequence table entries as described in
[forum:/forumpost/b1674b56ad|forum thread b1674b56ad].
FossilOrigin-Name: c833f26a6780f919551e50c67d308e96293cec8481899354411d805617481f24
2025-10-30 11:39:49 +00:00
drh
cb36dc3f3e
Prevent a harmless signed integer overflow in the CLI if the argument
...
to the --skip option of the ".inport" command is -9223372036854775808.
FossilOrigin-Name: 247277d9373cb2614a1bc4c1e08b904315e5e8c0c2a7fbe9c2ac651481601642
2025-10-30 10:36:10 +00:00
drh
d443f0a95f
Fix a logic error introduced by [cea8bf79e18d55a8] which caused
...
"0 OR 2" to be evaluated as "2" instead of as "1". Problem reported at
[forum:/forumpost/d5f32040c5d50d2d|forum post d5f32040c].
FossilOrigin-Name: 095cc4f22e63c98cbb2acabdbcaf02e59e67ec6d3cc219b5f42a714e3d53a264
2025-10-29 20:47:01 +00:00
drh
ffbfc27fab
Fix an signed integer overflow problem that can occur when using an oversize
...
value for the SQLITE_MAX_LENGTH compile-time option together with
multi-gigabyte operands to the OP_Concat operator.
FossilOrigin-Name: 724f2299f206cc9e7f830f984c50a8fc4ac1c17210d71d9affe657b45252b060
2025-10-28 13:24:50 +00:00
drh
5a9ada593f
Add enhanced resistance to corruption after posix advisory locks on the
...
database file been unintentionally broken on unix by running
close(open(DBFILE)) from a separate thread.
FossilOrigin-Name: 6385a1962c69c69ca4775888f034a4eb892aa013689c000f3de6422da7c3c695
2025-10-28 10:50:55 +00:00
drh
9c0770537f
Enhance the CLI so that it can handle inputs larger than 2 billion lines.
...
FossilOrigin-Name: 5daebf2d6013e73d89c9feb796e15b67c39577e5a9e9c86fa260995f4118f04b
2025-10-28 10:44:26 +00:00
drh
6cc222c3be
Additional comments explaining what unixIsSharingShmNode() does. No
...
changes to code.
FossilOrigin-Name: 819fc87385fd5be8a847492478f4c4f247f64edf7c7161b641bfbac6b658bec5
2025-10-28 01:28:20 +00:00
drh
db0d47b749
Omit unnecessary branches from the unixIsSharingShmNode() implementation.
...
FossilOrigin-Name: 2d5623bc27073c407ec63e401f095d12f0025dd276a0bdc26d8b94b1f13c9a36
2025-10-27 23:57:57 +00:00
drh
e34f35c833
The unixIsSharingShmNode() function should always return false for the
...
unix-excl VFS.
FossilOrigin-Name: 770f35dae47a98554b18f8a7aa9f6b6e39ae2b3aa8dce8d75b5bed0c6f0f9c21
2025-10-27 15:44:16 +00:00
drh
626351d444
Implement an experimental defensive measure to try to prevent the -wal and
...
-shm files of an active WAL-mode database connection from being deleted out
from under the database connection in the case where the database SHARED
lock has been released by an accidental call to close() in a different
thread, or similar.
FossilOrigin-Name: ed1b9206640f66cb8abff444809ccab8a4a5157b5c90e9aacddc422210e63423
2025-10-27 14:24:02 +00:00
dan
6e27846323
Fix a minor over-allocation of heap memory in wal.c.
...
FossilOrigin-Name: 1803cb9bb6a13fb66956f729066b6eae64c3a1c0715102fb1a9994e395c12ba9
2025-10-27 11:39:07 +00:00
dan
8ce786f173
Fix sanitizer complaints in the regexp extension.
...
FossilOrigin-Name: 6ff9ecb89d769bc2a27f8a57130f28ec7478979d3e35ba765c16017b5bdf775d
2025-10-27 11:20:47 +00:00
stephan
3fceae3b95
Doc typo fix reported in the forum. No code changes.
...
FossilOrigin-Name: 6e065b6aa099f31493cfea22a729f92bb312147d8584f663fb75630a25772e43
2025-10-26 12:34:13 +00:00
drh
a105989856
Rename the file control to SQLITE_FCNTL_FILESTAT. Rename the SQL function
...
to sqlite_filestat(). Rename the enable macro to SQLITE_ENABLE_FILESTAT.
FossilOrigin-Name: ee797fec4eeace78caa2c5e463108bf1a6568db7c33d94d9fe6624cfc6b0d4fe
2025-10-25 20:46:09 +00:00
drh
ecbeefecd0
Fix a bug in sqlite_file_info() output: It was showing the "pal" for
...
the main file descriptor when traversing other unused file descriptors
for the same inode.
FossilOrigin-Name: 3c4020d76e29c39483f6b92857ea470245afcd514870c63bd3373e0e213cd355
2025-10-25 19:51:16 +00:00
drh
2b24d8957e
New --normal option for the ".open" command in the CLI. Also, when opening
...
the database for deduceDatabaseType(), use the same open-flags that will
be used subsequently for the official open, to avoid creating unusable
file descriptors that need to be held until all database instances close.
FossilOrigin-Name: 5e20a0435b1bd84d90c9a419219afe794fdf8ea73213f4c7ae5612c0375bed55
2025-10-25 19:36:12 +00:00
drh
726e836108
Add additional information about unix file descriptors to the same database file
...
in the sqlite_file_info() output.
FossilOrigin-Name: 64045f0a4d71ef068d64f2f25799cf1ae79c3cdb94039c73f1066290e3dbc943
2025-10-25 19:26:16 +00:00
drh
7be565f0cc
Adjust unixPosixAdvisorLocks() to use redirectable system calls so that
...
it can be tested.
FossilOrigin-Name: eafe88b782875cd839fc27da509830e3e1d95781c686e27242a2844910203a42
2025-10-25 18:40:18 +00:00
drh
c053b57716
Merge the CLI deduceDatabaseType fix from trunk.
...
FossilOrigin-Name: 82f907016ee75ca288d8ac0664d5c147fbfad42c5f8222211acc3220bd0eb609
2025-10-25 18:36:14 +00:00
drh
0d859b4828
Fix the CLI so that it does not try to open what might be an SQLite
...
database using open() in the deduceDatabaseType() routine, as this can
lead to broken posix advisory locks.
FossilOrigin-Name: 2a3a02715fa53673531575fa13aee056711139b409367cccc18654e82720c4e6
2025-10-25 18:35:29 +00:00
drh
ab29c24dc3
Additional information about the unixShm shown.
...
FossilOrigin-Name: 85846c7fbeeaf5fccfcbe11a4b87c4ee49781456ccb4da1d090b7823d7b456d6
2025-10-25 14:06:36 +00:00
drh
dcc07d3ca6
Do not attempt to show posix-advisory-locking status on journal files.
...
FossilOrigin-Name: 7f8baf64bb722d7dfdfca22d4f11a72113d5ed2b36d6cc6020fb0acf8185b3e7
2025-10-25 13:55:49 +00:00
drh
234c6c4bf0
The sqlite_file_info() function should always return JSON, unless there
...
is an OOM.
FossilOrigin-Name: 65aed79c29bf1aac0934475c02b358b916f413b20d2475ec7b631011f21f4e2b
2025-10-25 13:16:41 +00:00
drh
86319b841a
New symbolic representation of posix advisory locking information
...
FossilOrigin-Name: b7d991ae04da1d6731b67fbdca65df996ec1c14a9530880fb7dbeeaef2575d14
2025-10-25 12:53:03 +00:00
drh
f4e66056ac
Merge trunk enhancements into the file-info branch.
...
FossilOrigin-Name: 73e1e081e9f7fc0ece98222669d13abde16197f0befc3343246a9e7da7856f02
2025-10-25 11:47:04 +00:00
drh
76db3a6e66
Stricter assert() statements on unixShmSystemLock().
...
FossilOrigin-Name: ed01ed337c04cce4cdbb6e80628b6f716d537e072b80067bd2bd6c5d18a1454f
2025-10-25 11:37:54 +00:00