aboutsummaryrefslogtreecommitdiff
path: root/src/backup.c
Commit message (Collapse)AuthorAge
* Fix a segfault that could occur if a non-empty in-memory database was the ↵dan2023-04-19
| | | | | destination of a backup operation from a database with a smaller page size. FossilOrigin-Name: 020968f857d7b90bab3525fc9d6b859a019f6a80422c3d5ffb88f5bdb8e02a11
* Fix an obscure problem in sqlite3_backup_init() caused bydrh2022-01-31
| | | | | | | [6a45d8fe8bfbc11a|check-in 6a45d8fe8bfbc11a]. See [forum:/forumpost/8b39fbf3e7b5c278|forum post 8b39fbf3e7] for the original bug report. FossilOrigin-Name: 639fc7633bd740421d6b48617b9f68e6be525107e4049673fe720ea6158a393f
* Make it so that any Parse object is always linked into the database conenctiondrh2022-01-24
| | | | | while it is active. Hence, an OOM will cause Parse.nErr to be set. FossilOrigin-Name: 6a45d8fe8bfbc11a5b86d25237e1f8bccfb0f22f3dcaf004ba797aeb57b365ec
* Add support for the sqlite3_txn_state() interface.drh2020-08-25
| | | FossilOrigin-Name: ad195e3dd89d0f33b50070c18fb8f43c4eb24162515dfdd7c04d9e7d96b902a2
* Fix the handling of reserve-bytes so that the maximum value of 255 can be used.drh2020-05-07
| | | FossilOrigin-Name: 99749d4fd4930ccf15227f67c732266af9e09dd3cabdc0834fb450ef98196441
* Simplify the code by removing the unsupported and undocumented drh2020-02-07
| | | | | SQLITE_HAS_CODEC compile-time option FossilOrigin-Name: 5a877221ce90e7523059353a68650c5fdd28ed032807afc2f10afbfbf864bdfe
* Add new assert() statements in an attempt to help static analyzers avoiddrh2019-07-16
| | | | | false-positives. FossilOrigin-Name: 9e66458592d40fbd96ea5f21339573110ca1cfe328238a020c9420a87d35dd72
* Fix harmless compiler warning seen with MSVC.mistachkin2019-05-04
| | | FossilOrigin-Name: 5862b83eb36b93016d37e5b86ebb183d891bb553901facab1e5d83e114a38ec3
* Change sqlite3BtreeBeginTrans() to return the BTREE_SCHEMA_COOKIE, for adrh2018-06-06
| | | | | small speed improvement when starting new transactions. FossilOrigin-Name: a10662aa915ae2b5a78b3e10920350d32255b2d6b1a8aac0aba1ad173b07ed2b
* Allocate Parse objects off of the stack where appropriate for a substantialdrh2016-10-03
| | | | | performance increase and a size reduction. FossilOrigin-Name: ea8affa9e453b201b479162f621b591e7a65a489
* Correctly detect an OOM occurring in the setDestPgsz() subroutine ofdrh2016-09-02
| | | | | backup. FossilOrigin-Name: d9d8a048d4b621435870b4f8dd13b2938ac2f8fd
* Within a backup operation, ensure that a read-transaction is opened on the ↵dan2016-09-02
| | | | | source database before its page size is read. This ensures the page-size used to write to the backup database is the same as its actual page-size, which is important for ZipVFS databases. FossilOrigin-Name: 7908fc604991d81140c182b97981fd724ad126ae
* Undo commit [f250166bb]. It is required to handle IO and other errors that ↵dan2016-08-05
| | | | | occur within a VACUUM of a Zipvfs database. FossilOrigin-Name: ae72513af37cd806a6d94aaa7c47a740e119d3b1
* Remove the sqlite3PagerClearCache() routine, which does not accomplish anythingdrh2016-05-20
| | | | | useful. FossilOrigin-Name: f250166bb3c1b0c58e703b334825cf6210758fda
* Enhance ability to debug out-of-memory errors.mistachkin2016-02-13
| | | FossilOrigin-Name: 6a9c4a3ebfb7cc0738ef6634440ccab44a21ff28
* Rename the sqlite3PagerAcquire() function to sqlite3PagerGet(). The formerdrh2015-11-04
| | | | | macro called sqlite3PagerGet() has been removed. FossilOrigin-Name: 708253be34084b89987efe955c34557516171a3a
* Take care that the number of reserved bits per page is consistent between drh2015-09-23
| | | | | the source and destination databases when doing the back-copy on a VACUUM. FossilOrigin-Name: 5b61b72f5424a2d9bb4e68eb95026cd63f003db9
* Avoid create a stack from in sqlite3BackupUpdate() in the common case wheredrh2015-07-01
| | | | | the first argument is NULL. FossilOrigin-Name: 2a897b9e94acaf1fd91e9f8e94fa52e01694f011
* Keep track of the optimal number of reserved bytes (by looking at reservedrh2015-02-21
| | | | | | | byte requests in calls to sqlite3BtreeSetPageSize()) and then change the reserve byte count to the optimal when doing a VACUUM or when using the backup API. FossilOrigin-Name: 28c2b726285ea88b334acfd6390a057d2d244838
* Have calls to sqlite3_backup_init() fail if there is already a read or ↵dan2014-11-13
| | | | | read-write transaction open on the destination database. FossilOrigin-Name: 169b5505498c0a7ee2b5dbb2ba13c41dfaa7c62f
* Experimental changes that permit read operations to continue after adrh2014-11-11
| | | | | ROLLBACK, as long as the schema is unchanged. FossilOrigin-Name: fa6e6a9ae276cad60e9a4abc1bc23cf2809ea786
* Add the SQLITE_ENABLE_API_ARMOR compile-time option. This is a work indrh2014-10-24
| | | | | progress and is not yet completely functional. FossilOrigin-Name: c297a84bc678f81ffc0aa9139ab73f0ca87c1971
* Split the sqlite3Error() routine into sqlite3Error() anddrh2014-08-22
| | | | | sqlite3ErrorWithMsg(), for a slight size reduction and performance increase. FossilOrigin-Name: cf561d1f0bb60b3d638632d20bd686dda4fa4a04
* Simplication and optimization of error message handling.drh2013-12-13
| | | FossilOrigin-Name: 9d347f547e7ba9590b0c68edf50a14ad94a2bb92
* Modify the way some internal file-controls are invoked. In order to support ↵dan2013-12-09
| | | | | multi-file transactions in the zipvfs extension. FossilOrigin-Name: 32fb1784af4594161d954343e3787db702000a4d
* Rework the logic that factors constant expressions out of inner loops, makingdrh2013-11-15
| | | | | it both simpler and faster. FossilOrigin-Name: 8dc5c76c766828d7c28090bec30ff48227e7b140
* Simplify the btreeGetPage() routine so that it uses a single flag parameterdrh2013-08-21
| | | | | in place of two boolean parameters. FossilOrigin-Name: 617e23ec283d3147fc3fd29c474ccedf4915cdc7
* Make the MIN() and MAX() macros available in sqliteInt.h. Add TUNINGdrh2013-06-13
| | | | | comments to the NGQP and adjust costs slightly. FossilOrigin-Name: 3a72af2a95b04b8e195ef17cb3e9d9021a4f0915
* Make use of xFetch, if it is available when doing a VACUUM or a backup.drh2013-04-03
| | | FossilOrigin-Name: 83bc37af07857960c11275891f853a358dcbbf05
* Replace the sqlite3_io_methods.xMremap interface with ↵dan2013-03-23
| | | | | sqlite3_io_methods.xFetch and xUnfetch. FossilOrigin-Name: 1431be95579160fb70408d43e17fc23c7b69ab4a
* Fix a case where the mapped part of a database file may be written during a ↵dan2013-03-22
| | | | | backup operation. FossilOrigin-Name: c8d67aefff7299dd5c8abeb2a3a52109c0a823ee
* Catch a dropped error code in backup.c.dan2013-02-25
| | | FossilOrigin-Name: ac8ca3ecee4d81bf522b330033e5d85638063670
* If a rollback mode transaction reduces the size of the database file, avoid ↵dan2013-02-23
| | | | | actually truncating the file until after the transaction has been committed (but before the db has been unlocked). This means pages that are removed from the database by truncating the file need not be journalled. FossilOrigin-Name: b73847f17b7ae1298dfc52de6c4c4bc809bc77a3
* Ensure the database size field in the db header of a backup database is set ↵dan2012-12-21
| | | | | correctly. Fix for [0cfd98ee201]. FossilOrigin-Name: ff6857b6ed6a46671006b75157d8cf853a816ef9
* Ensure that when the source of a backup is a database that is zero bytes in ↵dan2012-10-13
| | | | | size, the final destination database consists of at least one page. Truncating it to zero bytes is equivalent to zeroing the schema cookie and change counter, which can cause problems for existing clients. FossilOrigin-Name: af5c9ee4a453f71c03f24ad08824ced6c1b97afb
* Avoid calling sqlite3BtreeEnter() in a corner case where the corresponding ↵dan2012-09-28
| | | | | database handle mutex (sqlite3.mutex) may not be held. This prevents a potential deadlock or crash that can occur if the backup API, shared-cache mode and SQLITE_HAVE_CODEC are all in use. FossilOrigin-Name: 89b8c377a6f03d9fa885f3f94c1f0b1eec263dea
* Replace a few sqlite3_malloc()+memset() sequences with calls to ↵dan2012-07-30
| | | | | sqlite3MallocZero(). FossilOrigin-Name: 305b6667265353b858b79bfea1745e64ff3bb7d3
* Add the sqlite3_close_v2() interface (from the deferred-close branch) thatdrh2012-06-21
|\ | | | | | | | | | | allows close operations to happen out-of-order in bindings to garbage-collected langauges. FossilOrigin-Name: fb8893abeefabe9de44e34dcf4327764481189f5
| * The sqlite3_close() interface returns SQLITE_OK even if there are outstandingdrh2012-06-02
| | | | | | | | | | | | | | | | sqlite3_stmt and sqlite3_backup objects. The connection becomes a zombie. Resource deallocation is deferred until the last sqlite3_stmt or sqlite3_backup object closes. This is intended to help SQLite play nicer with garbage collectors. FossilOrigin-Name: e276a02b7f54e804caa553dca99023416a415e1c
* | The former sqlite3ResetInternalSchema() routine was really two different drh2012-05-15
|/ | | | | | | | routines, selected by parameter, each with a confused mission. So split this routine up into three separate smaller routines, calling each separately as needed. Hopefully this will make further refactoring and schema reset collateral damage containment easier. FossilOrigin-Name: aa0c3493d3647d7efe527067e9fcccefda8e3008
* Change the ROLLBACK command so that pending statements to not block it. Thedrh2012-02-13
| | | | | | | pending statements instead return SQLITE_ABORT upon next access. Note: This causes separate shared-cache connections in read_uncommitted mode to abort as well. FossilOrigin-Name: 9b66c79e054c8a109d1ee8d35fed1c42814c330d
* Check the return code from sqlite3OsFileControl() in sqlite3BtreeCopyFile()drh2012-01-10
| | | | | and report any errors that it generates. FossilOrigin-Name: 7f852ac6435f1c9e25b07f816cca5ba40484579e
* Remove the BenignMalloc() from around the call to FCNTL_OVERWRITE. Adddrh2012-01-10
| | | | | | new ones around sqlite3OsDelete(). Fix an assert that causes problems for the nx-devkit. FossilOrigin-Name: 38bc4236d5a9d9f22a525bf9308d90cd4d9ce5a4
* Combine various boolean variables in the BtShared structure into a singledrh2012-01-05
| | | | | | boolean vector. Also make performance improvement simplifications to sqlite3BtreeMovetoUnpacked(). FossilOrigin-Name: 119493318e0ad4c2858fe1484b0d71669bd81531
* Add calls to the BenignMalloc() functions around the SQLITE_FCNTL_OVERWRITE ↵dan2011-12-31
| | | | | call in backup.c. FossilOrigin-Name: 3e0833dbb736a1aca08d17941d6d33901b15a03b
* If an error occurs while writing to the database file during a VACUUM, ↵dan2011-10-21
| | | | | discard the contents of the in-memory cache. This is required as if the database is a zipvfs database, the contents of the cache may be inconsistent with respect to the database as stored on disk. FossilOrigin-Name: 07159e84b40b01fa40cac5fad1f433888e5984f8
* Added the tool/warnings-clang.sh script. Changes so that there are nodrh2011-10-15
| | | | | | warnings with either gcc or clang even including FTS4 and RTREE and both with and without SQLITE_THREADSAFE=0. FossilOrigin-Name: 39408702a989f907261c298bf0947f3e68bd10fe
* Add the SQLITE_FCNTL_OVERWRITE file-control. Used by SQLite to indicate to ↵dan2011-10-07
| | | | | the OS layer that the current transaction will overwrite the entire file. FossilOrigin-Name: 1da87fcdacfa7d277c3ee98e410a9ea8b529c368
* Reorder some of the branches in backup.c in order to make the codedrh2011-08-25
| | | | | easier to test. FossilOrigin-Name: 2c443d47ecee7b43a89f0a4bf299c46c66e3f80d
* Replace an assert() that a condition may not occur in backup.c with code to ↵dan2011-08-25
| | | | | handle that condition, which can occur. FossilOrigin-Name: 472c74b3452c5a07dfb006010441232b09599ad5