drh
aa08f885ba
Fix a #ifdef in sqlite3_test_control() that was preventing builds with
...
SQLITE_OMIT_WSD.
FossilOrigin-Name: d546a9c94caf7408cc6e4530ec190d3a13fae09dc15b71b03d6369e02ee62abd
2024-01-03 20:40:17 +00:00
drh
4093b29610
Convert the JSON functions to use lookaside memory allocation whenever
...
feasible, to avoid hitting the global memory allocator mutex.
FossilOrigin-Name: a79a244954f728596da3c0e28fa3b887258d1bd831f53881970f418f3fba84c7
2024-01-03 16:41:50 +00:00
drh
433e904d99
Change a constant from decimal to hex to avoid a compiler warning on Mac.
...
FossilOrigin-Name: e3acb8a43ad544fd5b5341058276bd3b61b6bdb6b719790476a90e0de4320f90
2024-01-03 15:49:04 +00:00
drh
d059153deb
Back out [b517a52fa36df0a0] which is no longer reachable due to early
...
error detection enhancements in [166e82dd20efbfd3].
FossilOrigin-Name: 704943e96f2620b99260667ac9922c2f72bc3e92e2dfe1d9c2a91c7b704564d9
2024-01-02 22:49:14 +00:00
drh
f5740f72ec
Adjust the sqlite3PagerDirectReadOk() routine (part of the
...
SQLITE_DIRECT_OVERFLOW_READ optimization) to use less code and to be
more easily testable.
FossilOrigin-Name: eed670ea2a9424f7df4eeb01c152fc38f7190a5e39aa891651b28dc91fcdc019
2024-01-02 21:37:51 +00:00
drh
533622fb8b
Increase the default "max_page_count" to its theoretical maximum of
...
4294967294.
FossilOrigin-Name: ffb35f1784a4305b979a850485f57f56938104a3a03f4a7aececde92864c4879
2024-01-02 20:34:27 +00:00
drh
4cfc19f34c
Remove some unnecessary computations from ANALYZE so that ANALYZE runs with
...
fewer CPU cycles. These changes were spotted while working on the nearby
enhanced-stat1 branch. So even if enhanced-stat1 is abandoned, that effort
put into it will not have been in vain.
FossilOrigin-Name: 5527e8c4abb904b1a438ec1c353d4a960bf82faaf3a2c742af1df7c613850441
2024-01-01 17:58:57 +00:00
drh
4ccf707c6e
Extra steps taken to avoid using low-quality indexes in a query plan.
...
This branch accomplishes the same end as the nearby enhanced-stat1 branch,
but with much less change and hence less risk.
FossilOrigin-Name: c030e646262fee43a59b45fdc1630d972f8bf88ac3c142b6bdaf4cbb36695a4f
2024-01-01 17:48:02 +00:00
drh
2aae3a95a9
Enable SQLITE_DIRECT_OVERFLOW_READ unless it is specifically disabled using
...
the -DSQLITE_DIRECT_OVERFLOW_READ=0 compile-time option.
FossilOrigin-Name: 630604a4e604bfb36c31602917bfa8d42c10c82966d0819932bf8f827b9158b8
2023-12-28 21:02:08 +00:00
drh
4c13d3ca92
Performance improvement by unwinding a loop in jsonAppendString().
...
FossilOrigin-Name: 190ab3c08431a0ba24d76392eab251f5c1792add05e4ec780998b299208eca95
2023-12-28 19:18:08 +00:00
drh
0546a284fa
Enhance the (undocumented, debug-only) json_parse() SQL function so that it
...
returns the text rendering of the JSONB parse of the input, rather than printing
the rendering on stdout.
FossilOrigin-Name: 056de8d551dcbdf1d162e2db15ed418fa9c786f900cd3972ef8a1dea3f4f3aa1
2023-12-28 16:21:22 +00:00
dan
d9ac37fc44
Fix a problem in the shell tool (not library) causing an out-of-bounds write if an ".open" command failed, then the user pressed ctrl-c to interrupt a query running on the substitute in-memory database.
...
FossilOrigin-Name: 026618b9e321576f616a32e41329066ba629814170c6cfeef35430343f5003f3
2023-12-27 16:24:53 +00:00
drh
b2b7490862
Improved handling of malformed unicode within JSON strings.
...
FossilOrigin-Name: e252bdf5f5de26ba8e2bcc6b0ad94121ed6fc4d86c02fe4a2a058ada93747beb
2023-12-26 13:20:57 +00:00
drh
71a32aede3
Remove an ALWAYS() added in [c50e6c2ace49d092] because it is sometimes false.
...
dbsqlfuzz c393a4f783d42efd9552772110aff7e5d937f15e.
FossilOrigin-Name: b9daf37e57cde12c4de271a2b1995e8e91b6411f8c2e8882e536241929609b3a
2023-12-24 12:02:36 +00:00
drh
5a85cf5879
Fix harmless compiler warnings associated with [5db30bcc338aac1c]
...
FossilOrigin-Name: e55d1c2333f35fc20615aa83a7843d08cae7945710a2156d44eee0cc37d90ade
2023-12-24 11:43:49 +00:00
drh
57c98747cb
Improvements to the query planner to address the inefficiency described
...
by [forum/forumpost/2568d1f6e6|forum post 2568d1f6e6].
FossilOrigin-Name: 72fcc12cda910a0e3f7875eb3d117b2a5608705c97703985427a02960f1ab5c5
2023-12-23 19:03:50 +00:00
drh
4ed0b117f3
Add debugging output routines sqlite3ShowWhereLoop(X) and
...
sqlite3ShowWhereLoopList(X) that can be invoked from a debugger to show
a summary of the content of a single WhereLoop object or a list of WhereLoop
objects. No change in release builds.
FossilOrigin-Name: 5db30bcc338aac1cf081de2deec7e60749ae012e2b6f95ccf745623adb4a31dc
2023-12-23 11:31:47 +00:00
drh
8a630c2aa3
Change parameters on a debugging function to include "const".
...
FossilOrigin-Name: 94c3e1110c6590261bd30ba317fba4dd94023d69b81a94f4b216cce748fe7489
2023-12-22 21:22:55 +00:00
stephan
09e6c82d56
Update #ifdef checks in pager.c and util.c to account for [0462a2612d1fc1d0] to resolve the build problem reported in [forum:9819032aac|forum post 9819032aac].
...
FossilOrigin-Name: 0f22d809a1c6c80e381f6bcd931fe4ec36dca0e28d07ab4f4f7f83c813424f60
2023-12-22 15:41:13 +00:00
drh
15bff25111
Add a new comment to debugging output routine sqlite3WhereLoopPrint() to
...
remind us of what the various fields of the debug output mean. No changes
to code.
FossilOrigin-Name: da5f34fd4052432b1ae27bb12e56b358cdc5c1282653d60ed0f0fe62f727e4ee
2023-12-22 12:57:49 +00:00
drh
c2eff91bd3
Add internal core-developer-only documentation of the JSONB format.
...
FossilOrigin-Name: 4d30478863b2a60512010de9ec6e3099bfaf75d4afee20acec536713fe94334d
2023-12-21 18:08:05 +00:00
dan
0d7f0e49a4
Fix SQLITE_ENABLE_SETLK_TIMEOUT assert() statements in os_unix.c to avoid reading past the end of the unixShmNode.aMutex[] array.
...
FossilOrigin-Name: 029a05cd2928d43d81e4549cce5388c432e2c9e75e3fa0b2fe6e91021b2fb9ac
2023-12-20 19:33:41 +00:00
drh
95cf95841c
Avoid harmless integer overflow in pager status statistics gathering.
...
Response to [forum:/forumpost/7f4cdf23f9|forum post 7f4cdf23f9].
FossilOrigin-Name: 206d8c650d937bc700946c40a82a62ea6bc4a80e5f3fb42d0ae2968de25f0644
2023-12-20 11:34:17 +00:00
drh
3262ca83a7
In JSON - minor code cleanup and refactoring with a small size reduction
...
and performance increase.
FossilOrigin-Name: 215fabda38daecdbd38b1eca5a6aafbc61b6a36a8303f1d7164d5a1138e63134
2023-12-19 21:39:58 +00:00
drh
c52aebb443
Remove redundant conditional from sqlite3ExprCanBeNull().
...
FossilOrigin-Name: 257f96a2d22c605885fa66220c28cf7dc5941c330bccee3f132b9e7b70d89d30
2023-12-19 15:51:14 +00:00
drh
7c1033b010
On second thought, we don't really need sqlite_dbdata accessible to the CLI.
...
FossilOrigin-Name: 36fe6a61ef8fb393281a5e15119d716521219c7b971fbfd63bdea07d27a78ac9
2023-12-19 15:10:25 +00:00
drh
611b9d3efd
More precise computation of the size of data structures in the query planner.
...
Response to [forum:/forumpost/7d8685d49d|Forum post 7d8685d49d].
FossilOrigin-Name: 0c8d88e41167ea92341dd1129be01b596a73f46bdcd5b0dd931441a979c013d0
2023-12-19 14:54:52 +00:00
drh
09259aff6c
Add ALWAYS() and NEVER() on branches made unreachable by recent changes.
...
FossilOrigin-Name: c50e6c2ace49d0928b05cbfd877c621e9a0f77dc4e056ccb1dbe5cf118a00d00
2023-12-19 14:53:39 +00:00
drh
3e2ec83e0b
Ignore COLLATE operators when determining whether the result of a subexpression
...
should be shallow-copied or deep-copied.
FossilOrigin-Name: 34ae36a45e814bed7c8340412c7ef3fc849b82357656d0eb5f0f805e59d846d0
2023-12-19 13:45:05 +00:00
drh
60c435dc4b
When unable to resolve an identifier, change the Expr node into TK_NULL
...
rather than TK_COLUMN, to prevent any downstream misuse of the non-existent
column. dbsqlfuzz 71869261db80a95e4733afa10ff5724bf3c78592.
FossilOrigin-Name: d2e6117e4f97ab98b01deb5fcad5520f8181d00bed8d904d34963c01d73df857
2023-12-19 12:49:35 +00:00
drh
3a0e82611a
Always make the sqlite_dbdata virtual table available in the CLI.
...
FossilOrigin-Name: e5fd3b32ad87586a7413570e568c9c1859a37a4f836cca074126471b125fb682
2023-12-19 12:23:11 +00:00
drh
a3569fb2ca
Extra ALWAYS() macros to verify state in the sqlite3ExprCanBeNull() routine.
...
FossilOrigin-Name: be19b84c9f3fe127165809908add148dbe9a827a55608b0490de7e69b7f7f191
2023-12-19 11:57:29 +00:00
drh
459f7b1090
Remove a stray comment in the JSON code.
...
FossilOrigin-Name: 6618bdf0679405b43911ea8cd94050b12a5dc469f3dfe4759ee3ff850a55229e
2023-12-19 00:07:38 +00:00
drh
c4dd6b42ec
Add NEVER() to an unfalsifiable branch.
...
FossilOrigin-Name: 9a0c67db366d38a0b0741f6a1ae333cf27cfe6f6b7c6eed94bdec9686f9f9f8a
2023-12-18 18:50:47 +00:00
drh
fc76750f61
Fix JSON to JSONB translation so that it deals correctly with Infinity
...
and NaN.
FossilOrigin-Name: 178cb84f36bdb45ba17511900d6d8ea8dfa14912fc5bf7094a20348174a36c95
2023-12-18 18:31:27 +00:00
drh
095f2c5082
Ensure that the insert/delete size delta on JSONB objects in the JSON cache
...
are always set to zero.
FossilOrigin-Name: 4b4581668a908473dbf1322a3e98bc7cca122998c44518ea183af7f0d1ba9f95
2023-12-18 15:53:48 +00:00
drh
cf6fe5abe3
Add randomjson.c to testfixture. Use it for a new set of invariant tests
...
against JSON functions.
FossilOrigin-Name: f1c040606bfe784804134d8f3ca130908fad5212b47e3c32792baab977470943
2023-12-18 14:24:13 +00:00
drh
13264418ba
Enable SQLITE_STRICT_SUBTYPE for default builds of the shell, fuzzcheck,
...
and testfixture.
FossilOrigin-Name: 5a0c517ed7e46c0f8a3db752cf5b9f8010c60f35084606abe9e7c1c4f993b4a7
2023-12-16 15:48:42 +00:00
drh
40e614e393
In the count-of-view optimization, deferring freeing obsolete parts of the
...
parse tree, on the off-chance that some other part of the code might be
holding a pointer to those parts.
FossilOrigin-Name: da442578856c87137eb1677d9b13b7c1cf15828cc41d4756572b278060f69bae
2023-12-15 20:13:09 +00:00
dan
97f7ead3f3
Avoid expiring prepared statements in the middle of an integrity-check.
...
FossilOrigin-Name: 88beb48472da4667c0727c8ebabe046ea526450ff837fe789d041ed3f1ff105e
2023-12-15 19:26:16 +00:00
dan
76dbb58700
Avoid running the "no_mutex_try" tests with SQLITE_ENABLE_SETLK_TIMEOUT builds as part of the release test.
...
FossilOrigin-Name: 6b4e1344a28c213cbe8fb97f7f3f6688de93fb73ed96bf460ff74c959da1a712
2023-12-15 14:33:50 +00:00
drh
4a5c96ace3
Fix harmless compiler warnings in JSON and FTS5.
...
FossilOrigin-Name: 90135efccfeb1046f002bfcbd8dfec9a1a3b40cbe1b5c714ae065b06368e354f
2023-12-14 15:38:57 +00:00
drh
8a861a81e8
Enhance aggregate order-by so that it transmits subtype information through the
...
sorter. Fix for the deficiency reported by
[forum:/forumpost/87347ad2fb5a8f76|forum post 87347ad2fb5a8f76].
FossilOrigin-Name: d302a389460d0c15775a8b5f5afbac2c1d8a91bc282bc9b04c583ca04a8c09c6
2023-12-14 15:11:39 +00:00
drh
07117f8118
Pass subtype information through the aggregate ORDER BY sorter for
...
aggregate functions that use subtype information.
FossilOrigin-Name: 3536f4030eab6d650b7ed729d2f71eb6cc3b5fbe16b4e96b99008d66522aaccb
2023-12-14 13:58:50 +00:00
larrybr
9e488a5a40
In CLI, fix .read inability to open 2GB+ files on WIN32.
...
FossilOrigin-Name: 56c80a62d2e033d64ba5d545ae9cbe3ed7c9d046c0a3fafb6cfa2f0b562d1ef0
2023-12-13 20:37:20 +00:00
drh
3e4195c60d
Avoid invoking sqlite3ExprColUsage() on an unresolve column reference.
...
dbsqlfuzz fc34aa62df4de103705d11b807074687ffafbda5.
FossilOrigin-Name: ac9314c0e335694b48c613145f5397247bb88c51806cd0dc3ed4ec306db4bbad
2023-12-13 16:45:18 +00:00
drh
f7c78a2408
Bug fix in the JSONB validator.
...
dbsqlfuzz ac6fa521a08609a642198e7decf64180e750b3c4
FossilOrigin-Name: 3e940a6a08b0a0434650cd3d8dd286e09ad8ab805b0a4d515e57bba5d3608577
2023-12-13 15:27:03 +00:00
drh
001d1e795c
Improvements to UTF8 handling, and especially the handling of invalid UTF8,
...
in the JSON routines.
FossilOrigin-Name: 1b229c1101d6c384a30f343c5e47b471ab084b2d8e81170eb8f642afc1c67e3b
2023-12-13 14:31:15 +00:00
drh
891f1dc054
Fix the JSON object label comparison object so that it works correctly even
...
if the label ends with escaped whitespace.
FossilOrigin-Name: 4d5353cadd7b7c5f105bc197f3ec739e2d041472d6b3e939654c9f9cfc2749ae
2023-12-12 18:38:53 +00:00
drh
78e636bba6
Add NEVER to two unreachable branches in JSON.
...
FossilOrigin-Name: c96ebb086feb89341565cc52b970ae7799ce1327fe1ad4fc790f1b0dcaa6e229
2023-12-12 17:13:10 +00:00