aboutsummaryrefslogtreecommitdiff
path: root/src/memdb.c
Commit message (Collapse)AuthorAge
* 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
* Rig sqlite3_serialize() so that it will initialize a previously uninitializeddrh2024-01-20
| | | | | | | database prior to serializing it, so that it does not have a zero-byte size and does not return NULL (except for OOM). [forum:/forumpost/498777780e16880a|Forum thread 498777780e16880a]. FossilOrigin-Name: e638d5e408ea2e189b6771d16bbc2e42c606e88e05fbea78079b6e39e41f344c
* Add ALWAYS() to always-true branches in the locking logic of the memdb VFS.drh2022-12-20
| | | FossilOrigin-Name: 01fa760212a40cec5b43da99b917ab6389561c96d0567a9f67f516bdfa8f5f3d
* Remove an unused variable.drh2022-12-19
| | | FossilOrigin-Name: 5c4d94147d290d4a68ac0d5ae8f9e6bbfe7522ad58b2298e387f8c699048e111
* Fix an assert() in fts5. Simplify memdb xLock/xUnlock some.dan2022-12-19
| | | FossilOrigin-Name: 7fe158aa8071acadd959b2b4a4b66e8a7f7eecec207ba681abf516b0457c2921
* Fix an incompatibility between the Tcl interface and the "memdb" vfs by ↵dan2022-12-15
| | | | | allowing memdb to accept filenames that begin with '\' characters. FossilOrigin-Name: bd537f2057a4800bd30e7dd57405c3e57df649471104c80bd32573a89568029e
* Streamline and improve testing of the locking in the memdb VFS.drh2022-12-07
| | | | | Follow-on to [15f0be8a640e7bfa]. FossilOrigin-Name: d71a08375aeb525c10037c373b8eeb7e29f7dfaf7c4bfc02f4d99616c5940405
* Fix a problem in the memdb vfs xLock() function allowing clients to upgrade ↵dan2022-12-05
| | | | | to EXCLUSIVE locks when other connections are holding SHARED. FossilOrigin-Name: 15f0be8a640e7bfa4130edd4650a745337bd96083b119a1553f9abf9ff066806
* Databases created using sqlite3_deserialize() should report their filenamedrh2022-11-19
| | | | | as an empty string, not as "x". Fix for ticket [53043c9793715f08]. FossilOrigin-Name: ff494449efd475878c549728cc22ee9b12d13674068781747fc042a0c1bd09c8
* Fix an assert() in memdbTruncate() that could fail when processing a corrupt ↵dan2021-11-08
| | | | | database. FossilOrigin-Name: b1e2929860557cf88f98f0a4f2472e1a16be126bbb8050f0d728350f0cfe987a
* Fix a harmless compiler warning in memdb.c.drh2021-10-27
| | | FossilOrigin-Name: 22fdc658a7cc6d2c50957f92c19de74c9ac7d7d3498731d73e035b99a82bc406
* 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
* Fix (luckily harmless) typo in memdb.c per ↵larrybr2021-09-10
| | | | | https://sqlite.org/forum/forumpost/15af8872d5999df1 FossilOrigin-Name: d577030cdad165474b082afbe64782e2eb3290331b0e3045b1e85ee6fe011504
* It does not work to deserialized into TEMP, so do not allow it. Thedrh2021-07-20
| | | | | sqlite3_deserialize() routine now returns SQLITE_ERROR if you try. FossilOrigin-Name: 18068cc60698d4944a9d682cdf34b14b4d4b32f043f8d584dbf41c2bb5ac6220
* 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
* Cure some TCL test failures and narrow an object scope.larrybr2021-05-19
| | | FossilOrigin-Name: 1155696c700862de1a8b1318bc41cd5cd01dec1af2c7720d8ef1e5c3321c425d
* Fix harmless compiler warnings.drh2021-05-17
| | | FossilOrigin-Name: ace12a3912a4fdc2f0e741361ec705652a11b6f5e3548d54bd6f273671ba1e09
* Fix a race condition that can lead to deadlock in the memdb VFS if onedrh2021-05-12
| | | | | | | thread is trying to open an existing database at the same moment that another thread that is the only prior user of that database is trying to close it. FossilOrigin-Name: b635375dbe22bd31c437ca574eb0c014c0b045de6cc0816c32d2ceceff9191fb
* Respond correctly to OOM during mutex allocation.drh2021-05-12
| | | FossilOrigin-Name: 98dae595d861941bb0bcd12126ee02492587c466e6da579a58b5dc4a4d655917
* Mark an unreachable branch as NEVER().drh2021-05-12
| | | FossilOrigin-Name: 6c20d9d4b7c7986e8404142974a91dce7514ca574ee52ed5d036367aad396689
* Enhance the memdb VFS to provide the ability to share a single databasedrh2021-05-10
| | | | | among multiple database connections. FossilOrigin-Name: 0617c66ac213d406a9a21580227a57542d7f21c8750c854f549ab818d7a936bc
* Enable the sqlite3_serialize() and sqlite3_deserialize() interfaces bydrh2021-05-08
| | | | | | default. Omit the SQLITE_ENABLE_DESERIALIZE option and replace it with the SQLITE_OMIT_DESERIALIZE option. FossilOrigin-Name: 6df3b03e00b1143be8fed3a39a58ce81063020275aa1ac13d87c84f1ceda6e27
* Have the VFS in memdb.c return SQLITE_IOERR_NOMEM instead of SQLITE_NOMEM ↵dan2021-04-09
| | | | | when an OOM error is encountered. This is required to get the pager module to handle such OOM errors correctly in some cases. FossilOrigin-Name: 09c96b4c026746f285a8aef5199bd247ecca590095ee42dde4f4dfa4996ce0bd
* Fix the sqlite3_hard_heap_limit() so that it works with sqlite3_realloc64()drh2020-10-20
| | | | | | in addition to sqlite3_malloc64(). Improvements to OOM processing and debugging aids in the fuzzcheck utility. FossilOrigin-Name: 602d7369166d406a26834aa47d71d565a17d377d32e41f308821a50b41f91896
* Fix the SQLITE_DESERIALIZE_FREEONCLOSE flag so that it works as it isdrh2020-10-17
| | | | | | documented to work. See [forum:/forumpost/ba1dff667a|forum post ba1dff667a] FossilOrigin-Name: d6fac8a1d3efeb2c4f03dae437b5b314765c93770a70603803a8039291dbcabb
* Fix other potentiall pointer aliasing problems associated with subclassingdrh2020-07-24
| | | | | of the sqlite3_file object for various VFS implementations. FossilOrigin-Name: 270ac1a0f232d75537be40abae559004e950b992cb2c7e94cd6de66e96ae17bd
* Extend the refactoring into extensions. Clean up stray newlines.drh2020-06-19
| | | FossilOrigin-Name: 7a876209a678a34c198b54ceef9e3c041f128a14dc73357f6a57cadadaa6cf7b
* Change a NEVER macro into a NO_TEST comment, as the conditional is reachable,drh2020-05-21
| | | | | but only when compiling for Windows 32-bit. FossilOrigin-Name: ce36b6d1331edba5a921fef32553e2470a79bdb1f62d2cfd81190691c83d5b06
* Use the sqlite3Realloc() interface internally, rather than the publicdrh2020-05-17
| | | | | | sqlite3_realloc64() equivalent, to avoid unnecessary calls to sqlite3_initialize(). FossilOrigin-Name: 1313557b512297e7b75ed748894379b2022aecf696d5a58318e46a668321c1ff
* Remove an incorrect assert() from the deserialize in-memory database VFS.drh2019-01-31
| | | FossilOrigin-Name: 80151d7e3b9fd84086874a1cebed024b9e14005ea2d0108cf6efcd07373fcf51
* Add the SQLITE_CONFIG_MEMDB_MAXSIZE configuration option for configuringdrh2019-01-31
| | | | | | | the default maximum size of an in-memory database created using sqlite3_deserialize(). This is necessary to make the interface reasonably testable. FossilOrigin-Name: cb72ee0478ce98c48aae059fd5de4e36caf2b8c953e08fcb799bfd119ad46b73
* Fix the xFetch method of the "memdb" VFS (used by deserialize) so that itdrh2019-01-25
| | | | | is robust against corrupt database file. FossilOrigin-Name: 2c1ef40e787a6bc355b50168527a47eb09acd30d0d88cff8336a434ad554115d
* Fix the SQLITE_DESERIALIZE_READONLY feature so that it does not causedrh2019-01-22
| | | | | an assertion fault in the pager. FossilOrigin-Name: b9eccef7825c61980678599358b62bc394283124653061ce163ead0c653f481d
* Enhancements to deserialize: (1) Add the SQLITE_FCNTL_SIZE_LIMIT file controldrh2019-01-22
| | | | | | | | | to set a maximum size for an in-memory database, defaulting to SQLITE_MEMDB_DEFAULT_MAXSIZE or 1GiB. (2) Honor the SQLITE_DESERIALIZE_READONLY flag. (3) Enhance the TCL interface to support -maxsize N and -readonly BOOLEAN. (4) Add the --maxsize option to the ".open" command and on the command-line for the CLI. FossilOrigin-Name: 30f08d58882819a69e353bcc1b6b349664bbfbe00aa1c115ba44a9fd899fcc5b
* Fix some harmless compiler warnings seen with MSVC.mistachkin2018-09-12
| | | FossilOrigin-Name: 78862252da7f59d4737ed16f4ccf100cea27d8b421db31051afbaa8d96f24de3
* Minor comment changes.drh2018-03-28
| | | FossilOrigin-Name: d282f064698782cf7b584138549a6b27befa0b945ae96b52a3ef6f8a13448077
* Enable API armor handling for the new deserialize APIs.mistachkin2018-03-08
| | | FossilOrigin-Name: 0798c91aa9d5d347680a9d80d420224297360e03341365d48aca829cd7c423db
* Mark an unreachable branch using NEVER().drh2018-03-07
| | | FossilOrigin-Name: fadbc5e23f93bedd705bdc83cd3781b3821a231034bae5b942c94da77227721c
* Improved documentation for sqlite3_serialize() and sqlite3_deserialize().drh2018-03-06
| | | | | | Change the name of the compile-time option to enable these interfaces from SQLITE_ENABLE_MEMDB to SQLITE_ENABLE_DESERIALIZE. FossilOrigin-Name: f07e97aed435b02e1473053c0257ec5c89bf0b3e46076b7a9382de432bbc2497
* Handle some boundary cases in memdb associated with OOM faults.drh2018-03-06
| | | FossilOrigin-Name: b58ca4cb0c921e81efad527c80b220be120263cfdb04528ae26ecf8b8f66f44a
* Simplifications to the memdb VFS.drh2018-03-06
| | | FossilOrigin-Name: 6c3f723a6856fa38ea3f11a36b56f46c5c1fcf17f4daf712e5e0b42562d5f4c6
* Improvements to the memdb VFS.drh2018-03-06
| | | FossilOrigin-Name: a14fed69d0d4932fc6c71cf8acc5199cca4efbd10bca563a8e86038d6afd5c64
* Allow the zSchema argument to sqlite3_serialize() to be NULL to mean thedrh2018-03-01
| | | | | main database. FossilOrigin-Name: 5b01b9914fb612ceece34f40d45c7eb97c3504fc5a0a5ff0e67120bdee67f6ee
* Miscellaneous code and comment cleanup.drh2018-01-03
| | | FossilOrigin-Name: fa6069fb3b0a4411fd6661dec7de40ece3064a2fe4b94ebfbda9e5e524e04e86
* Replace sqlite3_memdb_config() with sqlite3_deserialize(). Remove thedrh2018-01-03
| | | | | | "db memdb" command from the TCL interface, replacing it with "db serialize" and "db deserialize". FossilOrigin-Name: 2f6e9df9f0c5a9e5b1acb99cfa9486850cc1822d35b0989e779a7a10f3b1f1ac
* Replace the sqlite3_memdb_ptr() interface with the more generaldrh2018-01-03
| | | | | sqlite3_serialize() interface. FossilOrigin-Name: 8cf2ed4eff6d2e0958656e23384b05ead2128b678b0b69a591878af4190cd077
* Simplify the "sqlite3" command in the TCL interface. The filename is nowdrh2018-01-03
| | | | | | optional. There is a new --memdb option with an argument that is the blob to which the database content should be initialized. FossilOrigin-Name: 47398ae77236a92f6b9345aa397361b6df127a9a2895c0771d506b0be10822b9
* Add support for the "memdb" VFS and the sqlite3_memdb_ptr() anddrh2018-01-03
sqlite3_memdb_config() interfaces, to enable an SQLite database to be manipulated as an in-memory object. FossilOrigin-Name: fb2ac2d2fa6374084f3325b41b257c7a3ace43aade4b666ec4be93b6b70dc39a