1
0
mirror of https://github.com/sqlite/sqlite.git synced 2026-10-25 09:59:22 +03:00
Commit Graph

25062 Commits

Author SHA1 Message Date
drh
1fdaa9d1a7 Version 3.40.1
FossilOrigin-Name: df5c253c0b3dd24916e4ec7cf77d3db5294cc9fd45ae7b9c5e82ad8197f38a24
version-3.40.1
2022-12-28 14:03:47 +00:00
dan
b199ac87a4 Fix a broken assert() in fts5.
FossilOrigin-Name: ff1d456161e57314b0bb4e2e720eb1cd00f71b4bf4c459fad9fef4f11d38c19f
2022-12-27 14:14:56 +00:00
dan
33f1e0ffd6 Fix a faulty assert() in fts5.
FossilOrigin-Name: 4acff807c68cf9751f5958bf8efac73ac2fe3d82d5efd62f1517796d05032075
2022-12-27 14:12:03 +00:00
dan
3caf5e7224 Fix an assert() in fts5. Simplify memdb xLock/xUnlock some.
FossilOrigin-Name: 43079c5246d4cee11239f4ec375a5159d5bf458c5add126c1a068f8278d432a1
2022-12-27 14:11:22 +00:00
drh
e47e06e109 Fix a missing 0 at the end of an integer literal in the MEMSYS5 fix.
FossilOrigin-Name: e3bc10e8a8d944d57a4bc15e7a2839af6b17cc7bc553f00fb86e4757150ed47c
2022-12-27 14:06:13 +00:00
dan
dffd1dd294 Fix minor problems in test scripts where.test and recover1.test.
FossilOrigin-Name: 64588bd5da228026da8d2ba679625f36802f19944e00db79c832884ef4e429cd
2022-12-27 11:53:28 +00:00
drh
f7935acb67 Fix an unsafe use of sqlite3_mprintf() in sqlite3_overload_function() identified by forum post: [https://sqlite.org/forum/forumpost/95b338860d].
FossilOrigin-Name: a31522261921a75c59d84448dab50896ba2a6e8a8e106c38b523081f78e5e22d
2022-12-26 17:09:43 +00:00
drh
9940e04c67 Prevent the sessions rebaser from generating changesets containing UPDATE records for which non-PK fields are present in the old.* but not the new.* record. Also update the changeset iterator to work around such changesets.
FossilOrigin-Name: 629dbe254346dc0b78025bb73def853bd725201244baa35cf169cf425930e184
2022-12-26 17:02:15 +00:00
drh
3f095819d0 In the unix backend, when implementing the defenses against small file
descriptors, delete a file just created if it was opened with
O_EXCL|O_CREAT so that it can be created again the next time through the
loop.  Fix for the problem described by
[forum:/forumpost/699af709ab3a8ccf|forum post 699af709ab3a8ccf].

FossilOrigin-Name: 174acf3284434adb8b6c643c85c059fdf5ea5e24e95852834251ea3b3c3d1a4d
2022-12-26 16:54:15 +00:00
drh
103f51b643 Fix an over-zealous assert() reported by Yong Heng.
FossilOrigin-Name: 1e9dbb5a1bcbf66acc1073e23791d1eb804af207de9bd08f4f7425cd3ff2e5c6
2022-12-26 16:45:44 +00:00
drh
2927b4593a Ensure the RETURNING clause is honoured when a row of a temp table is updated by an ON CONFLICT clause.
FossilOrigin-Name: ac9568cf87efe5e52cef030c0336761134253acb25f7e5343ccefaf526c96b41
2022-12-26 16:24:52 +00:00
drh
df6f15b822 Add the SQLITE_FCNTL_RESET_CACHE verb. Use it to ensure that the page cache is purged before and after a the recovery extension is run.
FossilOrigin-Name: 71dd920f92457a30aff21665de5d6b8fcdcb06119022bb8fd950960c2e041216
2022-12-26 16:12:40 +00:00
drh
2de62873d8 Fix corner cases in UTF8 handling in the REGEXP extension.
[forum:/forumpost/3ffe058b04|Forum post 3ffe058b04].

FossilOrigin-Name: 93e68b398329dcdd25758065c5f45b0e8c43368ab7a034201a244c7b3ac5b3dd
2022-12-26 16:03:34 +00:00
drh
91dd309476 Fix a off-by-one error in code generation that comes up when
doing a DISTINCT query against a virtual table with an OR term in the
WHERE clause and where the ORDER BY clause has 64 or more references to
the result set.  [forum:/forumpost/dfe8084751|Forum post dfe8084751].
The error is harmless in production builds, but might cause an assertion
fault in a debugging build.

FossilOrigin-Name: cbcd7d9be5e5fa6c55fa53a868ff07ee2c1725fc27c57a4bb390072e369b2be4
2022-12-26 15:55:10 +00:00
drh
57d4d2f984 Fix safe mode authorizer callback to reject disallowed UDFs. Reported at [forum:/forumpost/07beac8056151b2f|Forum post 07beac8056151b2f].
FossilOrigin-Name: 70964b8a1cfe8e47bac399db840afda9c35e36d62f1933744f49011e94a2343e
2022-12-26 15:44:50 +00:00
drh
306ff5d4e8 Fix an infinite loop in the MEMSYS5 auxiliary memory allocator that occurs
for memory allocations between 1GiB and 2GiB in size.  Error introduced
by check-in [949133231f8f751a].  The problem only affects builds that
include the SQLITE_ENABLE_MEMSYS5 compile-time option.

FossilOrigin-Name: c10d40ca683941be71f3be59b4251cf326a90a24e893169c744ade944dce3ee0
2022-12-26 15:21:42 +00:00
drh
51802270d0 Fix a problem in the memdb vfs xLock() function allowing clients to upgrade to EXCLUSIVE locks when other connections are holding SHARED.
FossilOrigin-Name: d18cce37b5b73bb2a4f28eb1b55eb2c3ffe1fc23c921c13170af3d74a549f48e
2022-12-05 14:23:06 +00:00
drh
7cb60ed011 Regenerate the configure script so that it includes the correct patch number.
FossilOrigin-Name: e2ae2ea195593f142e4a0c23b7d18381efcaa4114b1de04a97543ac264cd527e
2022-12-05 14:20:57 +00:00
drh
3ad0904dac Fix the error message in the CLI for "no such VFS".
[forum:/info/1217fdd6b3|Forum post 1217fdd6b3].

FossilOrigin-Name: b344f33d16213cd8861903b9e3e8efe9b4aaf36e742006e32b67b8ff4d5f8b7d
2022-11-22 18:24:59 +00:00
drh
4084560fdc Bump the version number to 3.40.1.
FossilOrigin-Name: d0ca348b25ce0e597054920c2124ad5965c11b58280b8fd83f1a115b557ca907
2022-11-22 15:48:02 +00:00
drh
87fa744610 Fix last function pointer in sqlite3Apis init. Reported at
[forum:/info/eba0faa96d|forum post eba0faa96d].

FossilOrigin-Name: b3795d28fe607d0e74ff120788a0db2fa76a6ce819b65ba042cc1ba00fd070a8
2022-11-22 15:47:09 +00:00
drh
2f2c5e2061 Version 3.40.0
FossilOrigin-Name: 89c459e766ea7e9165d0beeb124708b955a4950d0f4792f457465d71b158d318
version-3.40.0
2022-11-16 12:10:08 +00:00
drh
a70a01dbcb Previous change to the fake_big_file command in the test harness was not
correct.  This one should fix the problem.

FossilOrigin-Name: 6ee57a2e4e3399481100c40da0229d2d33cbe3290016185c8a60839d14b209f6
2022-11-14 19:42:01 +00:00
drh
1da477d3ab Change the fake_big_file test command so that it fails for files larger than
2MB on Windows, as we have observed that Window10 will sometimes bluescreen
when operating on very large sparse files.

FossilOrigin-Name: d39ffd2abadcc85c46ba17612f9f575005b4818e18bf39362b8ee574837cfad9
2022-11-14 18:57:21 +00:00
dan
cfce889cda Avoid running bigsort.test with SQLITE_DEBUG builds. The assert() statements added in [7c96a56] make it too slow.
FossilOrigin-Name: fa68dd8928c76888d535e649794743eeefd3abe0f909792a128955710bfc948a
2022-11-14 17:48:26 +00:00
stephan
8d7b41302f Remove some outdated code comments. No code changes.
FossilOrigin-Name: 80ff592a9d0157bfa8bd1f9959c3aa26cab0ec16fdccf7b58a7523b8912c1a8c
2022-11-13 19:29:51 +00:00
drh
7e475e571f Disable the ability to change the schema_version cookie when
SQLITE_DBCONFIG_DEFENSIVE mode is enabled.  This is a security
enhancement inspired by the question in
[forum:/forumpost/2b9cc3dae1f1e5f6|forum post 2b9cc3dae1f1e5f6].

FossilOrigin-Name: 1d81381e8f5db5d7064cc313b8544ca3cb1ca9e8cd61e71368a2d2e598befc9c
2022-11-12 17:17:01 +00:00
drh
a6303704a3 Remove unnecessary tabs in the ChaCha20 implementation.
[forum:/forumpost/0cdce5db8c|Forum post 0cdce5db8c].

FossilOrigin-Name: b7179efbdb2bdc878acec0abfe272821f7e0d7d9e5ef06cd7fd796ef295e54ab
2022-11-10 23:10:11 +00:00
stephan
2c4d62f013 Automatically relinquish implicitly-acquired OPFS file locks during VFS idle time in an attempt to help alleviate cross-tab locking contention like that described in [forum:58a377083cd24a|forum post 58a377083cd24a].
FossilOrigin-Name: 8daf24ff73dd9928057412e0e4c2e2b2e47e1dca66acfb6b07c846e8d97582cc
2022-11-10 13:22:35 +00:00
stephan
da2641597a Rework automatically acquired OPFS locks to be released during idle time. This eliminates the performance hit reported in [46304ba057707c].
FossilOrigin-Name: a7fe91afca473fe55c983bc81d214df4ef3699863c7423fa4b6b9cde23d6a3b4
2022-11-10 13:14:30 +00:00
stephan
aafa022f5b OPFS: if an op which needs a lock is called when no lock has been obtained, automatically lock it at the start of the op and unlock it at the end of that op. This is an attempt to alleviate the cross-tab contention described in [forum post 58a377083cd24a|forum:58a377083cd24a] but it increases speedtest1 run time by approximately 4x. Perhaps auto-lock can be combined with the older idle-time-based auto-unlock to unlock such locks (but not those from xLock()) to improve this?
FossilOrigin-Name: 46304ba057707c3b072b6e7bb8c4af774f653aa5814099f0866cd87b2b73abeb
2022-11-10 11:35:10 +00:00
dan
838865c0bb Better handle an error in the fts5 integrity-check code. dbsqlfuzz e87c62f9b67ea21aebdc36ab71cab7cc3eda8dc3.
FossilOrigin-Name: ae43e97087a3207a5ca3ffae75fbe7a33c01f4a38ce0d1d7eed8591ae3083617
2022-11-09 11:17:57 +00:00
drh
ea038d3d23 Additional defense against corrupt database files in dbdata.c.
FossilOrigin-Name: 2e70d1e5c9b2c9e068be3ccf8a6062edf7bdde2e46d60ba8ce54eda851af6008
2022-11-09 11:02:39 +00:00
drh
92c0881d9d Increase the precision of the nData parameter to the dbdataValue() routine
inside the sqlite_dbdata virtual table, to avoid the possibility of integer
overflow.

FossilOrigin-Name: 295447b44fc7658891352a9b3f792379b52a76ee5dcfd498b7028f5f87b40e9e
2022-11-09 10:17:25 +00:00
dan
50ba1a0213 Fix a problem with URI formatting in calls to sqlite3rbu_vacuum(zDb, NULL) causing problems on win32. First reported here <https://sqlite.org/forum/forumpost/a7ae915a9d>.
FossilOrigin-Name: 77ccc8ea8a901df64feabe08e1210087d060f0bc133242e87a94a71b68b5b5fa
2022-11-08 20:04:05 +00:00
dan
afe768193f Do not attempt to run test script dbpagefault.test with SQLITE_OMIT_VIRTUALTABLE builds.
FossilOrigin-Name: 901918c4867557e51160ef9c495e4e007de26cfe07c237addc00a388662957e8
2022-11-08 19:36:26 +00:00
dan
64c40ec2c7 Fix a problem in main.mk preventing the amalgamation-testfixture target from building.
FossilOrigin-Name: ccf00a0e22a2a9815ff7db1c6c6457fce35aaf50843c1b5ff2adda22d6f70314
2022-11-08 15:49:12 +00:00
drh
80fafc25ce Further improvements to the handling of the u32 and u16 typedefs in the
shell.c source file.

FossilOrigin-Name: 55a19677d723147aeb2b4a86bbd01756ddeb2072cba72c3145ad32d335e203b0
2022-11-07 19:40:20 +00:00
drh
d9324a5226 Improve the ability of mkshellc.tcl to remove redundant typedefs from the
generated shell.c code.  This is needed to get shell.c to build on older
C compilers.

FossilOrigin-Name: 3645585f37631d60cefab1d55cdb1ee060aae87317b9b158a01329ca8a4d3e1e
2022-11-07 18:36:02 +00:00
dan
40503750fa Add the sqlite3rbu_rename_handler() API. To override the default routine that RBU uses to rename files.
FossilOrigin-Name: ebbb1f88e7b5d6cbe84d400f1a187acedb4c668d0b7e4c63bf1496e57da9b8ad
2022-11-07 18:00:18 +00:00
stephan
49507d2af6 Minor doc updates in speed-check.sh. No code changes.
FossilOrigin-Name: d2ed4116fbf1de3c840f84e05db6f29f7b489518ac07d56f61df153deab6bf6b
2022-11-07 17:21:53 +00:00
drh
54422235e9 Fix an obsolete comment.
FossilOrigin-Name: e377c0a1ef030395293c5f24d7cb8e5b36ce972e9fac31b99c8425075486a46a
2022-11-07 15:23:51 +00:00
drh
e38b6e0318 Fix typo in comment.
FossilOrigin-Name: c3b94d7d4697a5c3983253f6266c544d8037617778a09d491bc12eb13f08ac75
2022-11-07 15:01:05 +00:00
stephan
690d4c545d Add sqlite3.wasm.alloc.impl() as a "public back door" into the low-level non-throwing allocator. Correct sqlite3.WasmAllocError constructor to behave like its usages expect it to and add tests for that.
FossilOrigin-Name: cea8bf9a144d842c4755c3130273524926e8c4831d7f21c4e34d4e8c74109c8c
2022-11-07 13:06:20 +00:00
drh
da01757870 Fix requirements marks so that they match documentation corrections.
FossilOrigin-Name: 10d6189d23133006b39ea230045a918483721dd48f5558f77e57e23693097d16
2022-11-07 12:21:06 +00:00
stephan
c0a18d6a5a Minor wasm doc touchups. No code changes.
FossilOrigin-Name: 2c448368913a844bdb5e69f8fa3bad91a2b6612ba3b7f3f650dd07b81db25a77
2022-11-07 12:12:27 +00:00
drh
1407458c6f Fix the documentation regarding negative length parameters for
sqlite3_result_text() interfaces, to point out that the length parameter
to sqlite3_result_text64() cannot be negative.
[forum:/forumpost/cf1d043b07|Forum post cf1d043b07].
Comment/documentation change only.

FossilOrigin-Name: 8016507651f377b08deb3a13cc559d56ce6e934c3073a8e63d05fd946b8403a4
2022-11-07 11:19:28 +00:00
drh
b36f697b50 Make sure that the recoverStrlen() function (used internally by the new
recovery extension) is 64-bit safe.

FossilOrigin-Name: ea30a6bfc463acce26a4d710e7bf56519ad096ce2fe904ee7e199f5c55068034
2022-11-07 11:05:53 +00:00
drh
b819202acf The recoverAssertMutexHeld() function is for testing and verification only
and should be a harmless no-op for production builds.
[forum/forumpost/b4f2c7d402|Forum post b4f2c7d402].

FossilOrigin-Name: d75504710c86af0037ac897106aadffe54955463195ee4dfb2cdfc81d396cbb4
2022-11-06 17:19:34 +00:00
dan
f53c0a0d4e Update test file dbpagefault.test to account for the restriction on using SQLITE_VTAB_DIRECTONLY virtual tables from within triggers.
FossilOrigin-Name: 2b68fc8aa35cc69e4d2c26aaebbf3f2b1f1c08d15ca9efcbe5be21d45735d3f1
2022-11-05 19:26:45 +00:00