1
0
mirror of https://github.com/sqlite/sqlite.git synced 2026-10-28 10:57:26 +03:00
Commit Graph

32458 Commits

Author SHA1 Message Date
drh
af32e544ea Fix 32-bit floating point (float) rounding in rtree so that it works
correctly for subnormal values and for values near infinity.
[bugs:/info/2026-09-19T00:36:32Z|Bug 2026-09-19T00:36:32Z].

FossilOrigin-Name: 3d5e1013245e1280b1f74fe09f9407f18313270847da5385a2e36c2b8eb56d74
2026-09-19 01:54:07 +00:00
drh
fd6f5492c4 Fix issues in support for STDCALL on 32-bit Windows builds.
[bugs:/info/2026-09-15T09:23:20Z|Bug 2026-09-15T09:23:20Z] and
[bugs:/info/2026-09-15T09:24:06Z|Bug 2026-09-15T09:24:06Z].

FossilOrigin-Name: 7e09ee42afab9868540875b4701cfbd55a591f8346358eebc3f54580fc2ec49d
2026-09-18 16:50:49 +00:00
drh
943e6b1ed1 When constructing sqlite3.h from sqlite.h.in using the -useapicall option,
make sure to tag all callback arguments with SQLITE_CALLBACK.  Also omit
the SQLITE_CALLBACK macro in comments.

FossilOrigin-Name: 5f8621d2f64344f4f0111f1d64cca5a71731cb037bfeea6e2e6f0368166085d1
2026-09-18 16:30:04 +00:00
drh
ea49210a16 In the sqlite3ext.h file, the MSVC compiler is unable to figure out
for itself that a varargs function must be CDECL, so we have to give
it a hint.

FossilOrigin-Name: 19f963a3b1f73ce9586895be6f4bb416eac99d31e8054bb5a12ee9251a43952c
2026-09-18 15:52:53 +00:00
drh
cd4e52fe73 Improved support for stdcall on 32-bit windows, for legacy.
FossilOrigin-Name: e638307a519c929271682b9d9093e6dbdc90ca9a07d45ca9fc9ee114d6fd02c7
2026-09-18 15:38:29 +00:00
stephan
46c7da50b3 Minor internal API doc update.
FossilOrigin-Name: 346c56e02c39858b4364e4c8b8e4c88237e64470066ebb2687ae06d2b0e978b8
2026-09-18 08:00:34 +00:00
stephan
d457639847 Performance improvements in some of the JS sqlite3.oo1 APIs, based on analysis and suggestions from Jure Rotar.
FossilOrigin-Name: 8c6c586c3e42dd1d0af4f374b01a660bfc6afb47fd3b34cd7ef16c198ec66d0a
2026-09-18 07:56:22 +00:00
stephan
5a04cfc091 Add a note to ext/wasm/tester1 about running tests in concurrent tabs.
FossilOrigin-Name: 8ce64bed3bac4038b2fd96758d4bd92cb26ac515ec50cbfc94ef296e5c6fe558
2026-09-18 07:55:02 +00:00
stephan
619447707a Portability improvements for Cygwin contributed by Jan Nijtmans.
FossilOrigin-Name: 8dc536e845fa59131052db2909f010b4de7d4bd6bf47abfe6653e83acb4b503c
2026-09-17 13:30:54 +00:00
dan
b0d5cbda9c Fix a problem causing fts5 auxiliary function API methods xRowCount() and xColumnTotalSize() to return inaccurate values after rows had been deleted from a contentless_delete=1 table. Forum post [forum:/info/5e6f15753a | 5e6f15753a].
FossilOrigin-Name: 39ca0ac36596d37fd62316beb7c6341812624e6d3efea90d68ae0393f742163b
2026-09-16 13:58:43 +00:00
stephan
6f5c0659c2 Typo fix in JS test code.
FossilOrigin-Name: 4630ee80dcb69588ec1c88d049e313b53258e7e23fc0209ac505c92b3bc85c63
2026-09-16 08:31:09 +00:00
stephan
4ebc78674d Add a JavaScript switch/case break which does not actually change any behavior but has the potential to (A) confuse someone into thinking it's broken or (B) become broken via future code changes. Spotted in [https://github.com/sqlite/sqlite/pull/37|a PR in the sqlite github repository].
FossilOrigin-Name: a6351d0413572cf92f9d5eaf01e8777001646961cc77dd5823ca26f7a84a60f3
2026-09-15 18:11:22 +00:00
stephan
80bf95ec05 Resolve a 'Tcl_SetIntObj called with shared object' crash in the tcl db copy binding. Reported in the bugs forum on 2026-09-15 but the post was rejected, apparently by the OP, before it was published.
FossilOrigin-Name: bcce90fdc1694b6d04bfb8c2bc58af33a0b68b6d4ebb9f993e2168df134d760e
2026-09-15 10:52:46 +00:00
stephan
9073f828a3 Cygwin portability fixes contributed by Jan Nijtmans, including the un-exporting of some non-public-APIs which need to be reviewed closely. One test (delete_db.test) is failing but that specific failure has been a recurring theme in this environment.
FossilOrigin-Name: fe484c8dbc4829508616a1db1bd38a8e451409bddcc20b593fbf51a6ab1a1b00
2026-09-15 08:37:47 +00:00
drh
7936c5107f When looking up a text key in a temporary index, use the fast memcmp-based
comparison if the index uses the built-in BINARY collation.
Indexes in the schema already got this fast path because they record BINARY
as a NULL collation pointer.

FossilOrigin-Name: f065790f590f6e46de06cf72ac8613d69cf953146b520443ae1cf01848b3f32c
2026-09-12 11:12:38 +00:00
jeffchen
9173c2f1b6 When looking up a text key in a temporary index, use the fast memcmp-based comparison if the index uses the built-in BINARY collation. Indexes in the schema already got this fast path because they record BINARY as a NULL collation pointer.
FossilOrigin-Name: ebb4534bc8c19ba2b960112eadc328b937c11acf5b846bf9e3df53846c6e375b
2026-09-11 22:11:09 +00:00
drh
1eca07ed73 Do not discard INDEXED BY or NOT INDEXED from a parenthesized term
of the FROM clause.
[bugs:/info/2026-09-10T20:38:13Z|Bug 2026-09-10T20:38:13Z].

FossilOrigin-Name: e308b0fce47e184860564f0535174017eb7d5d7efc4f86dd1eb8d234f75e4d08
2026-09-10 23:54:06 +00:00
drh
134f69359c In PRAGMA integrity_check, double the space available for checking that
every byte of a page is used only once as a safety margin to deal with
unforeseen kinds of database corruption.

FossilOrigin-Name: 0c173d54b1bab44748f0010ec7aa5bd79891aa9aaea91d2996c6f0d3f859d1a8
2026-09-10 20:04:18 +00:00
drh
6013371a43 The value returned by json_each.root should be SQLITE_TRANSIENT, not
SQLITE_STATIC.

FossilOrigin-Name: 1d9bd6c8a2fa81883bf5fce767135645e480c32d78c325c5eb0da07cdd2ec076
2026-09-10 10:20:32 +00:00
drh
220b580fc7 Fix minor issues with the delta_parse() table-valued function in the
fossildelta.c extension.  Add test cases for the fossildelta.c extension.
[bugs:/info/2026-09-09T10:29:35Z|Bug 2026-09-09T10:29:35Z] and
[bugs:/info/2026-09-09T10:55:54Z|Bug 2026-09-09T10:55:54Z].

FossilOrigin-Name: 737ab94632c7745d3fd1f82894a1c8174db59350a33329660681398dd604c4d0
2026-09-09 13:49:42 +00:00
drh
f3b9f74d81 For "make test" on Windows, the --stop-on-error option is used for
testrunner.tcl, which causes processing to do an orderly shutdown if
any individual test module fails.

FossilOrigin-Name: 4021369bc9558fbfcfa83ee4cd6b986734b8c41b6d72bd97064e566ca8189ea8
2026-09-04 14:20:44 +00:00
drh
e137e97af6 Improved orderly-shutdown in testrunner. Windows lets running jobs complete.
Unix just invokes exit and lets the OS deal with cleaning up the mess.

FossilOrigin-Name: ce822e8dc137128a6c495600205c6659a9cd2ba6ba188d86567ed97c04b7aeea
2026-09-04 14:02:05 +00:00
drh
55f0206dca Remove an intentional error used for testing that was accidently left in
the previous check-in.

FossilOrigin-Name: 87f9d70d9e3fae2eda2650d9f58fd587c5f7b9cf7f7d13d47ebd11053ce63a25
2026-09-04 13:43:43 +00:00
drh
b5e3cf0655 The testrunner.tcl script is enhanced so that --stop-on-error does not
exit immediately, but instead  marks all pending tasks as "halt" so
that no new tasks are scheduled, but allows "running" tasks to continue
on to completion, as an immediate halt can cause hung processes on  Windows.
Also, in Makefile.msc, the "test" target now includes --stop-on-error.

FossilOrigin-Name: 0fba9b52b41a5fade0d162c947712669653c4619c89a79800017703e978d8a24
2026-09-04 13:37:51 +00:00
drh
b03315b7db Fix the GetDiskTypeW() call in the previous check-in so that it works
on x32.

FossilOrigin-Name: ae1650228de3b5a6f02527a17d5398f12528ad56ffc5f551f19078b34ef5eda9
2026-09-04 12:39:04 +00:00
drh
28fe562328 On Windows, use the GetDriveTypeW() interface to detect network filesystems
and always use a single shared file handle for the -shm files on such
filesystems.

FossilOrigin-Name: 52ed3b490a4d03ef5445ed473ebab543720a7176841f9c5baf09668b956be72d
2026-09-03 19:56:36 +00:00
drh
7740d55183 Enhance the WAL checkpoint algorithm to run faster and use less memory
if the WAL file is larger than the database file.

FossilOrigin-Name: 630ab4b6bd4497d4d09e3910f8a95908d19b0a0ab0da4bfe9c3f22e613411523
2026-09-03 18:37:25 +00:00
drh
dd986a5c51 Improve the documentation of the WalIterator object and the new pagemap
algorithm.  Remove one unnecessary conditional.

FossilOrigin-Name: f690f5b1487083fde158a9dcd1f61c67821ed163726e07f1f42585e979b0462d
2026-09-03 18:26:53 +00:00
dan
42c45bd235 Fix a bug in fts5 test code function fts5TestUtf8(). Report [bugs:/info/2026-09-03T14:51:50Z | 2026-09-03T14:51:50Z].
FossilOrigin-Name: ac094ec69b9b726985d2fdb82062f098e77c427539cdf5b07ee15dd8427cba66
2026-09-03 16:37:55 +00:00
drh
61974281e4 Omit a minro optimization that fails in two ways: (1) it does not actually
make the code run any faster, and (2) it allows an incorrect type 
coercion on a GROUP BY query where there is a subquery as one of the
result set columns.
[bugs:/info/2026-09-03T02:29:56Z|Bug 2026-09-03T02:29:56Z].

FossilOrigin-Name: 5d9e5cddec144492df866bf0ea1808b1c099be92551cbb2433a0f3a0ff119023
2026-09-03 16:32:43 +00:00
dan
c1d5978a4f When checkpointing, use a mapping from pgno to frame instead of the sorted list of frame/pgno pairs in cases where this will use less memory.
FossilOrigin-Name: ec3d33931be807ba77296397775f2d88228d4200ed23e54962d2592ddff37979
2026-09-03 14:45:41 +00:00
drh
e6082d077e When -DSQLITE_DEBUG or -DSQLITE_ENABLE_WALSTAT is used, provide the
sqlite_walstat() SQL function that provides state information about the
WAL subsystem.  Used for debugging only.  Function subject to change or
removal.

FossilOrigin-Name: 789d84e69171ef05d36486c38fbb0db10f8d827d9941472a2809f3113503e6c4
2026-09-02 12:39:06 +00:00
stephan
62c805e36c Cygwin portability patches from Jan Nijtmans.
FossilOrigin-Name: c76e64373cca884ab47ea24f8df3cedcdc823ccf3484e9b78715154f6d1ea66f
2026-09-01 17:50:43 +00:00
dan
09a5513008 Within a checkpoint, avoid allocating memory for *-shm pages that will not be processed as they have already been completely checkpointed.
FossilOrigin-Name: 53a9312cc923073066d697a0038e647d83a17ad0730dd91033e8fe7435fcc8df
2026-09-01 17:44:43 +00:00
stephan
be3dc6699e Cygwin portability patches sent off-list from from Jan Nijtmans.
FossilOrigin-Name: f8306cd54d28ceda631ce9053d94df2bb28cffccce2a7e72d088b4b1f2a0d3ed
2026-09-01 16:26:50 +00:00
drh
ff622746c4 Make sure the extra sorting cursor used by SQLITE_ENABLE_SORTER_REFERENCES
is initialized even if the corresponding table is empty.
[bugs:/info/2026-09-01T01:34:02Z|Bug 2026-09-01T01:34:02Z]

FossilOrigin-Name: a418005ba503e65944808a5a8397359210293bcde4c5ddd8800c66ea5c103292
2026-09-01 12:36:03 +00:00
drh
2fed9802b0 Update the authorizer action code documentation to make it clear that
string arguments to the authorizer callback can be in an arbitrary case.

FossilOrigin-Name: 6f73383647fdf579dca72e15cc8a9627be72fd524e8e843e7d62dfc9253e20d2
2026-08-31 20:43:10 +00:00
dan
99b322eca9 Fix an SQLITE_CORRUPT error that could occur with an incremental vacuum database if many tables were created and dropped within a single wal-mode transaction.
FossilOrigin-Name: f847298c8d4240711e4e12f256941dcf3d5978c53da3a6836cdc675c3468c179
2026-08-31 18:15:11 +00:00
drh
5e54ba5160 Fix a harmless compiler warning.
FossilOrigin-Name: 40530cf21d1a0ad5e7e0a1023857de8c3a87a7177eba7d526cbfd08af3c80eab
2026-08-31 15:18:12 +00:00
dan
a5ae4bd098 Return an error if the arguments of a table-valued function that is on the left of a RIGHT JOIN depend on tables to the right of it in the FROM clause. Report [bugs:/info/2026-08-31T08:07:08Z | 2026-08-31T08:07:08Z].
FossilOrigin-Name: 43c8d7c41c3d8a2602ea0a7759c6b85eeca8640bc85024746e77eb58648f73a6
2026-08-31 15:02:19 +00:00
dan
aba9f8ef69 Fix a bad interaction between the skip-ahead DISTINCT optimization and "ORDER BY ... NULLS FIRST/LAST" clauses. Report [bugs:/info/2026-08-30T23:22:05Z | 2026-08-30T23:22:05Z].
FossilOrigin-Name: 7bfd3d6f80316f3d129a1e8c798be0a0efa8fbeb69d6958c1c2af9f4f6945a9e
2026-08-31 11:04:03 +00:00
drh
638e0b1a03 In Lemon, remove the option to omit compression of the action table.
FossilOrigin-Name: 9b75f0c3466a551ff24a21a4caac3e0b6b92768e025c603560929e374acf5ef3
2026-08-31 09:48:26 +00:00
drh
d92acf1afe Follow-up to check-in [2cb349e5b02aa549] to help indexes on negative
DEFAULT integer values get stored more efficiently.

FossilOrigin-Name: c77ff6089de242d8cb7487ea36b094e403c9ed1a48a8ee713d64a0b87b334369
2026-08-29 20:27:09 +00:00
drh
a162198e12 Remove a redundant OP_RealAffinity inserted by recent changes to
sqlite3ColumnDefault().

FossilOrigin-Name: c7a987a4f7b4c937073536b714235e18295cc2c3bd8df8dfa4d8ba770ab6038d
2026-08-29 19:51:48 +00:00
drh
8dddb9b0cd Fix the CLI so that it does not capture ".echo" output as part of the
result of a ".testcase"...".check".

FossilOrigin-Name: 33322913a87caf64f430786e9b5fbe7b1fe42b82b410c8b7b410737ffd8e29e4
2026-08-29 18:39:28 +00:00
drh
2cfd7cc6c5 Ensure that ALTER TABLE ADD COLUMN has zero return columns, even when
altering a STRICT table.  Test case in TH3.

FossilOrigin-Name: 778e2bb9a6e06398012bc59b4c62bf8269828bf8f68e9c14e819c6f34edbe29f
2026-08-29 16:26:34 +00:00
drh
84340490ff Fix harmless comment typo.
FossilOrigin-Name: 66f608cecab53b5e3cd02bd33566ee7c37b123b9002bbf84f7b22b7856bec9c0
2026-08-29 13:42:11 +00:00
dan
492e7fc0a7 Fix a case in the fts5 matchinfo() demo function causing it to return the wrong error code.
FossilOrigin-Name: 5251f4d7071f86ad9d772d8b9309bc7191ca485c3db5cb658f689abf02de72c4
2026-08-27 18:07:23 +00:00
drh
a8e841bbd7 Built-in SQL function oom() invokes sqlite3OomFault() and then returns NULL,
but only if compiled with SQLITE_DEBUG or SQLITE_BUILTIN_OOM_FUNCTION.

FossilOrigin-Name: 90dfac7f2734078ae8c30b6f3379ed4d2283726fee9ea5799d73408d40e7e63e
2026-08-27 14:26:50 +00:00
drh
75136699f7 Fix a C90-compliance issue in the CLI.
FossilOrigin-Name: 555f31c64d3fcc55df2715a7c8c1cb28503b2c0eb21d950ccdcbf6f577593dd5
2026-08-27 10:58:16 +00:00