aboutsummaryrefslogtreecommitdiff
path: root/src/vdbesort.c
Commit message (Collapse)AuthorAge
* Remove an unnecessary parameter from sqlite3VdbeRecordUnpack(). Improveddrh2025-06-02
| | | | | comments and assert()s on KeyInfo. FossilOrigin-Name: 387f4c4d98b8fb83f6ae406e4143dabda7766e8752b7f6ca104655e51330c978
* Fix stale comments related to KeyInfo. Add new assert()s associated withdrh2025-06-02
| | | | | memory management of KeyInfo. FossilOrigin-Name: abd805bc76f14ede7359b029908179b7ca57e929c5918acae1403ef73ae0bd47
* Fix an off-by-one error in the size computation of a vdbe-sorter.drh2025-06-01
| | | | | | [forum:/forumpost/c1cc8b057a|Forum post c1cc8b057a]. Problem introduced by checkin [d4307a0d43f42e96]. FossilOrigin-Name: 8b7a7fcf62e5c2742c243808fa482472954f2b4aae0bc7ae513bc07065c93737
* Make use of the flexible-array feature of C99, when available, to try todrh2025-03-14
| | | | | | pacify -fsanitize=strict-bounds. This check-in fixes the core. There is more yet to do in FTS3, RTREE, and in FTS5. FossilOrigin-Name: 6fd6b32d06bd6a705e5140cd613af823b8183a6f6a9ceeeedfcf5e8b50821d68
* Add an assert() in vdbesort.c to help both humans and static analyzer AIsdrh2025-03-01
| | | | | understand why a particular array cannot overflow. FossilOrigin-Name: a14d4afd5020af327629e5c72b0699ddab0ef4e3f23938a1b72669aa29fc2e87
* Code changes that make it easier to prove that no 32-bit integer overflowsdrh2025-02-17
| | | | | | happen during memory allocation. No problems fixed; this change is just to make future maintenance easier. FossilOrigin-Name: 215650a5a1d55bdbca9c92524804a1a54456a17f42a17e53747b21a6507506f5
* Add a new assert() to help static analyzers understand that a pointer isdrh2024-08-07
| | | | | never NULL. FossilOrigin-Name: 433f2b942ee6f79d50ebe9b08fa3ea8162db6a10ce9d80e2bc193124baa1b083
* Fix a harmless compiler warning in an assert().drh2024-08-07
| | | FossilOrigin-Name: 5e4c9a74b2efa74ace67f644fb6bb37e07f5982f8faaca9463e3daa50b0469d7
* Turns out the branch is reachable, so back out the NEVER().drh2024-02-07
| | | FossilOrigin-Name: 0af36a3223d2dabda887830390a603ab4781baca7e2f1698ec6c5f2cf03faf04
* Add NEVER() to a branch that is no longer reachable.drh2024-01-24
| | | FossilOrigin-Name: 9411337a7b3237366768fc708396da53d67a7a17b6cdc5c6f8932c5ab32217a9
* Increase the size of some variables associated with the PMA sorter in orderdrh2023-10-06
| | | | | | to avoid any possibility of a signed integer overflow. [https://bugs.chromium.org/p/chromium/issues/detail?id=1489025|Chromium fuzzer issue 1489025]. FossilOrigin-Name: dc3be3af471d90dd810c1e2cc59e83cf6a57f01971b1258ea0da402e4d577ef2
* Fix straggler misspellings and tidy the custom dictionary. Also include ↵larrybr2023-06-07
|\ | | | | | | | | pickups from [forum:/info/c61fb09afd|forum post c61fb09afd]. FossilOrigin-Name: 8c291d99946eb32b20b743921202f9c7cfb716268ff526817b27adbb7942e40b
* | Add a C-source spell-checking facility. make misspell (on Nix)larrybr2023-06-07
|/ | | FossilOrigin-Name: 26c1bb4bd9e9f56613c3aa87407a7f562fd4ebde5bfd6dece02078001d9a45f8
* Small performance and size optimization to allocateCursor().drh2022-01-03
| | | FossilOrigin-Name: 23f042669aff535afa6ee9de367656848d01e90a1c9dab9359fa938a615b4195
* Minor changes to make it easier for static analyzers to reason about the code.drh2021-10-28
| | | FossilOrigin-Name: ba4104aa02625b51113978c1bb540b75bd88cb1959c7e9bfb4113db4159df5d4
* Fix the memdb VFS so that it does not allow mmap if it is resizable, and sodrh2021-10-23
| | | | | that it never opens a disk file for any reason. FossilOrigin-Name: 5ee14715a561d7522e9c6fd35a2ad3e6de526450025a99d2a523c2b27151be4f
* Add NULL checks on all sqlite3_vfs_find(0) calls. This is not strictlydrh2021-06-15
| | | | | | | necessary. There are no vulnerabilities here. However, adding these checks avoids unnecessary static analyzer complaints. [forum:/forumpost/ce1193be15|Forum post ce1193be15]. FossilOrigin-Name: 272a15b9f418fb0b31a9808f7c42c20cf52318035ff98935d8e8519634357e8d
* Fix another (harmless in practice) tsan error in shared-cache mode.dan2020-09-07
| | | FossilOrigin-Name: 5a74fa3f0a64f462c8add9beae231a9bbdd19e54d07b54f08726cb1411fc8d3a
* Faster decoding of 32-bit variable-length integers in cases were we do notdrh2020-01-28
| | | | | need to know the number of bytes in the encoding. FossilOrigin-Name: 59a31b16b54a0068c81ee65bc2fa905c2c826e98da3a7ffd8c3ea860a2827b4a
* Omit a pointless memory allocation in vdbeSorterSort().drh2019-10-07
| | | FossilOrigin-Name: 5d76dbc5b0584c15d7d59e5c079868f2077f32b865f406b40ec837b8ab6ef2e1
* Experimental implementation of NULLS FIRST/LAST. This branch still has ↵dan2019-08-12
| | | | | problems - the most significant of which is that ORDER BY clauses with a non-default NULLS FIRST/LAST qualifier can never use an index. FossilOrigin-Name: 07babb0f897fc8c9cb5b30481899c32fdd743f3f3ca508d8d957826252107dd5
* Add new assert() statements in an attempt to help static analyzers avoiddrh2019-07-16
| | | | | false-positives. FossilOrigin-Name: 9e66458592d40fbd96ea5f21339573110ca1cfe328238a020c9420a87d35dd72
* Avoid a sanitizer error (pointer arithmatic overflow) in vdbesort.c.dan2019-04-16
| | | FossilOrigin-Name: af61a2fc45a0fa1277d7453779238b77de4c298a9f60714b7dc62ddca5874f80
* Enforce the SQLITE_LIMIT_COLUMN limit on virtual tables.drh2019-04-13
| | | FossilOrigin-Name: 0b6ae032c28e7fe34d81d1769f6e2901addbd1b95cd9a255dcef274061fb0164
* Further attempts to reduce the number of false-positives genenerated bydrh2018-08-21
| | | | | static analysis tools. FossilOrigin-Name: 38f9ce6503c4dd05ccdd73463b1784a6df7ed6e5018c29c5874a3681ca34ba54
* Remove the rarely-used scratch memory allocator. This makes the code smaller,drh2017-08-28
| | | | | | | faster, and easier to maintain. In place of the scratch allocator, add the SQLITE_CONFIG_SMALL_MALLOC configuration option that provides a hint to SQLite that large memory allocations should be avoided. FossilOrigin-Name: 54b000246cfb5c7b8adb61a17357ef5a49adddde9e48e8937834d5ba0beb8a6b
* In the KeyInfo object, refactor the nField and nXField elements intodrh2017-08-02
| | | | | nKeyField and nAllField, which are more useful and run a little faster. FossilOrigin-Name: aea5990eab5e85f92df966aa641db2271c81052010ad2d80982475c4275a1284
* Change sqlite3BtreeNext() and sqlite3BtreePrevious() so that they returndrh2017-05-30
| | | | | | SQLITE_DONE if they have already reached the end (or beginning) of the table. This gives a performance increase and size reduction. FossilOrigin-Name: e972a3860892022d57b26ec44ce0fbadc61c1ff54b7a10b7e82390db88d323a7
* Smaller and faster vdbeSorterCompareText().drh2017-05-27
| | | FossilOrigin-Name: 542dc4c5eb87017fe03b6c181e779993aa84564785e1177ccf937d52f985593b
* Slightly smaller and faster implementation for vdbeSorterCompareInt().drh2017-04-03
| | | FossilOrigin-Name: 84fa069c5bdfe41d03d03875c9157cc6785150b677c04e40b8916ba5af073dc8
* Simplifications to the way UnpackedRecord objects are allocated. Smallerdrh2016-12-21
| | | | | and faster code that also fixes a subtle (currently unreachable) bug. FossilOrigin-Name: f7ab01f254cd9d7006b8dec29adb234a671b8e6f
* Reorder the fields in the VdbeCursor object so that those that need to bedrh2016-12-10
| | | | | | bulk zeroed on allocation are grouped at the beginning, and the memset() only runs over those fields that really need it. FossilOrigin-Name: 8165f88bb1d40693d67005a8d5dc499085f64b91
* Optimizations to link list merge sort code in vdbesort.c, pcache.c, anddrh2016-05-20
| | | | | | rowset.c. Resulting binaries are 10 bytes smaller and use 0.03% fewer CPU cycles. FossilOrigin-Name: 9033afbb31b28a8ad6856ac1f773d8e83bc9ec1c
* Correctly interpret negative "PRAGMA cache_size" values when determining the ↵dan2016-04-14
| | | | | cache-size used for sorting large amounts of data (i.e. the functionality in vdbesort.c). FossilOrigin-Name: 79147dca87cfd7eb62d57baa3b70fa2a8542232a
* Fix a harmless uninitialized variable access.drh2016-02-19
| | | FossilOrigin-Name: 398522e686b34e7f82a62e62d8b0a0ea924de064
* Enhance ability to debug out-of-memory errors.mistachkin2016-02-13
| | | FossilOrigin-Name: 6a9c4a3ebfb7cc0738ef6634440ccab44a21ff28
* Avoid two more instances of pointer arithmetic on freed pointers.dan2016-01-29
| | | FossilOrigin-Name: 2910ef64097b890c9f8929bf609ea2827db7ac97
* Fix a compiler warning about doing pointer arithmetic involving a NULL pointerdrh2016-01-25
| | | | | even though the result of computation is never used. FossilOrigin-Name: 7c49a9478bd36564e81d33458ca1f4063ddaca83
* Fix a harmless use of an uninitialized variable following system errorsdrh2016-01-12
| | | | | in the multi-threaded sorter. FossilOrigin-Name: 4bb2c1df105c2d21f5c4c7ef656ff1d6e15f78bc
* Refactor the VdbeCursor object. It is now slightly smaller and faster and isdrh2015-11-20
| | | | | easier to understand. FossilOrigin-Name: 9b1d174d862500a627840008ffac4c8419dc97e2
* Fix harmless compiler warnings.mistachkin2015-10-14
| | | FossilOrigin-Name: 1c46c194a2da24fe613d77b5a8d727cc2fc9faa4
* Reorganize some multi-threaded code in vdbesort.c so that full MC/DC test ↵dan2015-05-02
| | | | | coverage does not depend on the outcome of a race condition. FossilOrigin-Name: 78c7ec95931265b89a92f6a799fc9b1a9f0476bf
* Remove an unreachable branch from the vdbeSorterCompareInt() routine.drh2015-04-13
| | | FossilOrigin-Name: f666ef06869f4fb655c43daacf5034c17575d951
* Optimizations for VACUUM, CREATE INDEX and some cases of ORDER BY.dan2015-04-11
|\ | | | | FossilOrigin-Name: 79326d6eece926fd1c148b29f0b726208d8b44c0
| * Fix a problem in vdbesort.c to do with caching unpacked records.dan2015-04-02
| | | | | | FossilOrigin-Name: 80a00539506c95443165a781d1d869205057ca6c
| * Improve performance of multi-field sorts where the first field has a low ↵dan2015-03-30
| | | | | | | | | | cardinality. FossilOrigin-Name: 601e7b6b8e6bfabda03b70f75094c9014e3a3c49
| * Remove some unnecessary code from vdbesort.c.dan2015-03-30
| | | | | | FossilOrigin-Name: b58191e91736b1d978db4127f22867dfe2302f7c
| * Further optimizations for sorting records that begin with integer or text ↵dan2015-03-28
| | | | | | | | | | values. FossilOrigin-Name: 24fe9f25d64ee516633fed1ae7ebc21554aa69ca
| * Optimize cases where all the sorter is sorting a set of records that all ↵dan2015-03-26
| | | | | | | | | | begin with integer values, or that all begin with text values to be compared using BINARY. FossilOrigin-Name: ce5ad17c25cf2f8274ce304c51e4421faae0b32b
* | Fix a problem with sorting large amounts of partially ordered data.dan2015-04-11
|/ | | FossilOrigin-Name: acca97efda86a0c020854d2dd9da16f5879986b1