Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
History of src/backup.c
2019-07-16
| ||
19:44 | Add new assert() statements in an attempt to help static analyzers avoid false-positives. file: [f70077d4] check-in: [9e664585] user: drh branch: trunk, size: 28337 | |
2019-05-04
| ||
03:56 | Fix harmless compiler warning seen with MSVC. file: [b1d37f6f] check-in: [5862b83e] user: mistachkin branch: trunk, size: 28293 | |
2018-06-06
| ||
16:28 | Change sqlite3BtreeBeginTrans() to return the BTREE_SCHEMA_COOKIE, for a small speed improvement when starting new transactions. file: [78d3cecf] check-in: [a10662aa] user: drh branch: trunk, size: 28288 | |
2016-10-03
| ||
01:21 | Allocate Parse objects off of the stack where appropriate for a substantial performance increase and a size reduction. file: [faf17e60] check-in: [ea8affa9] user: drh branch: trunk, size: 28290 | |
2016-09-02
| ||
21:17 | Correctly detect an OOM occurring in the setDestPgsz() subroutine of backup. file: [92c2e3b5] check-in: [d9d8a048] user: drh branch: trunk, size: 28508 | |
17:27 | The previous commit could miss an SQLITE_NOMEM error. This commit catches it. file: [8e1fb73d] check-in: [3a9f4750] user: dan branch: mistake, size: 28465 | |
17:18 | Within a backup operation, ensure that a read-transaction is opened on the 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. file: [7d986927] check-in: [7908fc60] user: dan branch: trunk, size: 28443 | |
2016-08-05
| ||
16:16 | Undo commit [f250166bb]. It is required to handle IO and other errors that occur within a VACUUM of a Zipvfs database. file: [17cd25a3] check-in: [ae72513a] user: dan branch: trunk, size: 28029 | |
2016-05-20
| ||
18:09 | Remove the sqlite3PagerClearCache() routine, which does not accomplish anything useful. file: [6df65fdd] check-in: [f250166b] user: drh branch: trunk, size: 27964 | |
2016-04-05
| ||
00:44 | Avoid unnecessary memset() operations in sqlite3PagerGet(). file: [dae481a8] check-in: [0c97b802] user: drh branch: pager-get-noinit, size: 28086 | |
2016-02-13
| ||
23:43 | Enhance ability to debug out-of-memory errors. file: [f60f0aa5] check-in: [6a9c4a3e] user: mistachkin branch: noMemBkpt, size: 28029 | |
2015-11-04
| ||
20:22 | Rename the sqlite3PagerAcquire() function to sqlite3PagerGet(). The former macro called sqlite3PagerGet() has been removed. file: [2869a76c] check-in: [708253be] user: drh branch: trunk, size: 28014 | |
2015-09-23
| ||
19:17 | Take care that the number of reserved bits per page is consistent between the source and destination databases when doing the back-copy on a VACUUM. file: [c3a9c420] check-in: [5b61b72f] user: drh branch: trunk, size: 28043 | |
2015-07-01
| ||
19:59 | Avoid create a stack from in sqlite3BackupUpdate() in the common case where the first argument is NULL. file: [4d9134dc] check-in: [2a897b9e] user: drh branch: trunk, size: 27933 | |
2015-02-21
| ||
00:19 | Keep track of the optimal number of reserved bytes (by looking at reserve 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. file: [ff743689] check-in: [28c2b726] user: drh branch: trunk, size: 27825 | |
2014-11-13
| ||
14:18 | Have calls to sqlite3_backup_init() fail if there is already a read or read-write transaction open on the destination database. file: [7ddee9c7] check-in: [169b5505] user: dan branch: trunk, size: 27818 | |
2014-11-11
| ||
22:55 | Enhance ROLLBACK so that pending queries are allowed to continue as long as the schema does not change. This is a cherry-pick of check-in [b5df5ac052]. file: [8cdfeb0c] check-in: [d4b2d5d0] user: drh branch: branch-3.8.7, size: 26760 | |
01:33 | Experimental changes that permit read operations to continue after a ROLLBACK, as long as the schema is unchanged. file: [86b311af] check-in: [fa6e6a9a] user: drh branch: read-after-rollback, size: 27196 | |
2014-10-24
| ||
00:35 | Add the SQLITE_ENABLE_API_ARMOR compile-time option. This is a work in progress and is not yet completely functional. file: [7f841396] check-in: [c297a84b] user: drh branch: api-armor, size: 27193 | |
2014-08-22
| ||
18:00 | Split the sqlite3Error() routine into sqlite3Error() and sqlite3ErrorWithMsg(), for a slight size reduction and performance increase. file: [a31809c6] check-in: [cf561d1f] user: drh branch: trunk, size: 26757 | |
2013-12-13
| ||
16:23 | Simplication and optimization of error message handling. file: [a729e63c] check-in: [9d347f54] user: drh branch: trunk, size: 26735 | |
2013-12-09
| ||
20:42 | Modify the way some internal file-controls are invoked. In order to support multi-file transactions in the zipvfs extension. file: [6cb4c4ee] check-in: [32fb1784] user: dan branch: zipvfs-multifile-commit, size: 26731 | |
2013-11-15
| ||
01:10 | Rework the logic that factors constant expressions out of inner loops, making it both simpler and faster. file: [1809a7ca] check-in: [8dc5c76c] user: drh branch: expr-codegen-enhancement, size: 26728 | |
2013-08-21
| ||
23:42 | Simplify the btreeGetPage() routine so that it uses a single flag parameter in place of two boolean parameters. file: [2f198798] check-in: [617e23ec] user: drh branch: trunk, size: 26694 | |
2013-06-13
| ||
15:16 | Make the MIN() and MAX() macros available in sqliteInt.h. Add TUNING comments to the NGQP and adjust costs slightly. file: [43b34882] check-in: [3a72af2a] user: drh branch: nextgen-query-plan-exp, size: 26698 | |
2013-04-03
| ||
03:53 | Make use of xFetch, if it is available when doing a VACUUM or a backup. file: [b2667673] check-in: [83bc37af] user: drh branch: experimental-mmap, size: 26809 | |
2013-03-22
| ||
19:17 | Fix a case where the mapped part of a database file may be written during a backup operation. file: [6256400a] check-in: [c8d67aef] user: dan branch: experimental-mmap, size: 26760 | |
2013-02-25
| ||
07:12 | Catch a dropped error code in backup.c. file: [b2cac9f7] check-in: [ac8ca3ec] user: dan branch: incr-vacuum-opt, size: 26748 | |
2013-02-23
| ||
16:40 | If a rollback mode transaction reduces the size of the database file, avoid 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. file: [0b8d2108] check-in: [b73847f1] user: dan branch: incr-vacuum-opt, size: 26703 | |
2012-12-21
| ||
16:15 | Ensure the database size field in the db header of a backup database is set correctly. Fix for [0cfd98ee201]. file: [32e35a3a] check-in: [ff6857b6] user: dan branch: trunk, size: 26216 | |
2012-10-13
| ||
19:58 | Ensure that when the source of a backup is a database that is zero bytes in 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. file: [cab40f2c] check-in: [af5c9ee4] user: dan branch: zero-byte-backup-fix, size: 25882 | |
2012-09-28
| ||
20:23 | Avoid calling sqlite3BtreeEnter() in a corner case where the corresponding 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. file: [afc067b9] check-in: [89b8c377] user: dan branch: trunk, size: 25659 | |
2012-07-30
| ||
14:53 | Replace a few sqlite3_malloc()+memset() sequences with calls to sqlite3MallocZero(). file: [5b31b24d] check-in: [305b6667] user: dan branch: trunk, size: 25406 | |
2012-06-21
| ||
15:51 | Add the sqlite3_close_v2() interface (from the deferred-close branch) that allows close operations to happen out-of-order in bindings to garbage-collected langauges. file: [5524df36] check-in: [fb8893ab] user: drh branch: trunk, size: 25445 | |
2012-06-02
| ||
14:32 | The sqlite3_close() interface returns SQLITE_OK even if there are outstanding 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. file: [641eab30] check-in: [e276a02b] user: drh branch: deferred-close, size: 25422 | |
2012-05-15
| ||
18:28 | The former sqlite3ResetInternalSchema() routine was really two different 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. file: [d7fb4c6d] check-in: [aa0c3493] user: drh branch: shared-schema, size: 25457 | |
2012-02-13
| ||
16:43 | Change the ROLLBACK command so that pending statements to not block it. The pending statements instead return SQLITE_ABORT upon next access. Note: This causes separate shared-cache connections in read_uncommitted mode to abort as well. file: [6be23a34] check-in: [9b66c79e] user: drh branch: nonblocking-rollback, size: 25453 | |
2012-01-10
| ||
16:40 | Check the return code from sqlite3OsFileControl() in sqlite3BtreeCopyFile() and report any errors that it generates. file: [e9538bad] check-in: [7f852ac6] user: drh branch: trunk, size: 25442 | |
00:24 | Remove the BenignMalloc() from around the call to FCNTL_OVERWRITE. Add new ones around sqlite3OsDelete(). Fix an assert that causes problems for the nx-devkit. file: [52a4450a] check-in: [38bc4236] user: drh branch: trunk, size: 25343 | |
2012-01-05
| ||
23:32 | Combine various boolean variables in the BtShared structure into a single boolean vector. Also make performance improvement simplifications to sqlite3BtreeMovetoUnpacked(). file: [62e969b0] check-in: [11949331] user: drh branch: trunk, size: 25405 | |
2011-12-31
| ||
10:18 | Add calls to the BenignMalloc() functions around the SQLITE_FCNTL_OVERWRITE call in backup.c. file: [80d71310] check-in: [3e0833db] user: dan branch: trunk, size: 25391 | |
2011-10-21
| ||
17:18 | Merge the latest trunk changes into the apple-osx branch. file: [09685386] check-in: [be62ef05] user: drh branch: apple-osx, size: 25731 | |
14:27 | If an error occurs while writing to the database file during a VACUUM, 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. file: [4368158d] check-in: [07159e84] user: dan branch: trunk, size: 25329 | |
2011-10-15
| ||
00:16 | Added the tool/warnings-clang.sh script. Changes so that there are no warnings with either gcc or clang even including FTS4 and RTREE and both with and without SQLITE_THREADSAFE=0. file: [6c140baf] check-in: [39408702] user: drh branch: trunk, size: 25264 | |
2011-10-11
| ||
14:19 | Merge the latest trunk changes into the apple-osx branch. file: [669f2888] check-in: [7e2c4898] user: drh branch: apple-osx, size: 25651 | |
2011-10-10
| ||
23:53 | Forward port the Apple-specific changes from [db5b7b778c] in the apple-osx-377 branch. Fix this up so that it will compile and run on Linux. file: [5774963f] check-in: [6cb43f6c] user: drh branch: apple-osx, size: 25273 | |
22:11 | Merging in cherry picked diffs for persist wal, alloc padding, wal-safe vacuum and sqlite3_file_control based lockstate checking file: [1cf56cc8] check-in: [db5b7b77] user: adam branch: apple-osx-377, size: 24974 | |
2011-10-07
| ||
16:57 | Add the SQLITE_FCNTL_OVERWRITE file-control. Used by SQLite to indicate to the OS layer that the current transaction will overwrite the entire file. file: [4fd4440c] check-in: [1da87fcd] user: dan branch: trunk, size: 25249 | |
2011-08-25
| ||
20:18 | Reorder some of the branches in backup.c in order to make the code easier to test. file: [28a4fe55] check-in: [2c443d47] user: drh branch: trunk, size: 24871 | |
19:28 | Replace an assert() that a condition may not occur in backup.c with code to handle that condition, which can occur. file: [2d879fd8] check-in: [472c74b3] user: dan branch: trunk, size: 24844 | |
2011-08-23
| ||
11:47 | When copying a rollback mode database over a WAL database using the backup API, leave the destination database in WAL mode (instead of switching it to rollback mode). Fix for [af95b8c609]. file: [4dfc3904] check-in: [35e6ac18] user: dan branch: trunk, size: 24926 | |
2011-04-09
| ||
17:53 | Remove an always-true conditional. Replace it with an assert(). file: [986c1523] check-in: [1c2f0f84] user: drh branch: trunk, size: 24542 | |
02:09 | Do not do a backup if the number of reserved bytes in the source and destination do not match. Try to make the match, but if unable fail. file: [8d738af1] check-in: [0ca8a233] user: drh branch: trunk, size: 24548 | |
2011-04-02
| ||
16:28 | Begin a series of changes designed to reduce the scope and frequency of invalidating schemas. Design goals are that the internal schema should never be deleted out from under a prepared statement that is running and that all prepared statements should be expired if the schema is invalidated. At the same time, minimize the number of schema invalidations. This change merely revises the sqlite3ResetInternalSchema() function to use -1 as the wildcard for "all" rather than 0, so that we can reset the main schema independently of all the others. file: [b7529a66] check-in: [6a8ad6e3] user: drh branch: schema-parse-refactor, size: 23802 | |
2011-03-29
| ||
15:40 | Fix a problem whereby following an IO error in CommitPhaseTwo() of a multi-file transaction the b-tree layer could be left in TRANS_WRITE state, causing problems later on. file: [537f89c7] check-in: [dbe569a0] user: dan branch: trunk, size: 23801 | |
2011-01-25
| ||
18:19 | Add a missing call to sqlite3PagerSync() removed by [ce552d975] to the backup code. file: [6728d6d4] check-in: [1965b853] user: dan branch: trunk, size: 23795 | |
2011-01-16
| ||
22:37 | On a backup from a smaller to a larger page size, do not begin committing the transaction until the source pages after the pending byte have been copied. file: [8c39a1eb] check-in: [612e2599] user: drh branch: trunk, size: 23230 | |
2011-01-11
| ||
17:38 | Change the page size of the destination database in a backup, if it is changeable, prior to starting the backup. file: [ce552d97] check-in: [a5e4e0ca] user: drh branch: trunk, size: 23272 | |
2010-08-31
| ||
15:27 | Add evidence mark comments to source code. Add additional information to the documentation of sqlite3_release_memory(). Fix a minor inefficiency in mem1.c that was discovered while writing requirements tests. file: [d5b0137b] check-in: [53b0c03f] user: drh branch: trunk, size: 22957 | |
2010-08-20
| ||
15:32 | Do not allow a backup to change the page size if a codec is in use. file: [8ff0b701] check-in: [5523ecd3] user: drh branch: trunk, size: 22601 | |
2010-06-30
| ||
04:29 | Add coverage test cases. Have sqlite3_backup_step() transform SQLITE_IOERR_NOMEM to SQLITE_NOMEM before returning. file: [51d83300] check-in: [5e19bc36] user: dan branch: trunk, size: 22364 | |
2010-06-11
| ||
17:01 | Refactor and simplify the logic used to change journalmode. file: [3dc89da1] check-in: [95cc3f6f] user: drh branch: trunk, size: 22299 | |
2010-05-05
| ||
18:46 | Do not compare page sizes on source and destination of backup until transactions are started and the page sizes are locked. This is a fix to check-in [7bd44794c4]. file: [de980909] check-in: [ec715778] user: drh branch: trunk, size: 22362 | |
16:23 | Prohibit backup if the destination is using WAL and has a different page size from the source. file: [5c2dbddb] check-in: [7bd44794] user: drh branch: trunk, size: 22267 | |
2010-03-30
| ||
22:58 | Continuing refinements to the filesize-in-header enhancement. file: [e86634da] check-in: [79e22b95] user: drh branch: trunk, size: 21830 | |
2010-02-22
| ||
19:32 | Log all error messages if logging is enabled. file: [b293534b] check-in: [a8076aed] user: drh branch: trunk, size: 21839 | |
2009-11-10
| ||
01:30 | Remove the obsolete "$Id:$" RCS identifier strings from the source code. file: [744e9835] check-in: [f6c045f6] user: drh branch: trunk, size: 21826 | |
2009-07-06
| ||
19:03 | Fix the backup logic so that it detects a failure to sqlite3BtreeUpdateMeta() and reports that failure back up to the top level. (CVS 6851) file: [6f1c2d98] check-in: [471b92f2] user: drh branch: trunk, size: 21883 | |
2009-07-02
| ||
07:47 | Cause opening a transaction on a sharable b-tree module automatically obtain a read-lock on page 1. This means there is no way for sqlite3BtreeGetMeta() to fail. (CVS 6836) file: [97a3859d] check-in: [e3c055f1] user: danielk1977 branch: trunk, size: 21879 | |
2009-06-03
| ||
11:25 | Define a set of constants to use as the "index" argument to sqlite3BtreeGetMeta and UpdateMeta. This makes some parts of the code easier to follow. (CVS 6709) file: [ff50af53] check-in: [6dbf4eca] user: danielk1977 branch: trunk, size: 21884 | |
2009-06-02
| ||
21:31 | Further reductions in the amount of stack space required. (CVS 6707) file: [d189bc15] check-in: [04bad9eb] user: drh branch: trunk, size: 21857 | |
2009-05-18
| ||
17:11 | Port the sqlite3_backup fix of check-in (6632), ticket #3858 onto the 3.6.14.1 branch. (CVS 6654) file: [8f985697] check-in: [0d3abee2] user: drh branch: branch_3_6_14, size: 21591 | |
2009-05-14
| ||
19:26 | Change the sqlite3_backup_finish() interface so that calling it with a NULL pointer is a harmless no-op. One other change to backup.c to facilitate full coverage testing. (CVS 6638) file: [437efc2c] check-in: [06bc8917] user: drh branch: trunk, size: 21626 | |
2009-05-13
| ||
07:52 | When locking a database file, check if any backup objects need to be restarted even if the page cache is empty. Ticket #3858. (CVS 6632) file: [91aaf9f0] check-in: [90309008] user: danielk1977 branch: trunk, size: 21595 | |
2009-03-16
| ||
13:19 | Add the sqlite3_unlock_notify() API. (CVS 6348) file: [0082d0e5] check-in: [b649a6cc] user: danielk1977 branch: trunk, size: 21496 | |
2009-02-16
| ||
17:55 | Changes to remove some compiler warnings from MSVC. (CVS 6294) file: [2d3f3114] check-in: [68f15442] user: shane branch: trunk, size: 21494 | |
16:23 | Fix a compiler warning in backup.c. (CVS 6293) file: [dbce7056] check-in: [82222fbf] user: drh branch: trunk, size: 21487 | |
2009-02-12
| ||
17:01 | Fix some edge cases with backing up databases that are exactly PENDING_BYTE bytes in size, or just slightly larger. (CVS 6288) file: [0fb3c8d9] check-in: [2fc450e8] user: danielk1977 branch: trunk, size: 21490 | |
2009-02-09
| ||
18:55 | Fix a problem in backup.c causing OsTruncate() to be called with an argument larger than the current file-size. (CVS 6271) file: [7aff2b79] check-in: [b34bde80] user: danielk1977 branch: trunk, size: 21238 | |
2009-02-06
| ||
05:59 | Changes to the backup API: (1) if a negative number is passed as the second argument to backup_step(), this is interpreted as "copy all remaining pages" and (2) if backup_finish() is called after backup_step() fails with a BUSY or LOCKED error, then this error is also returned by backup_finish() (same handling as for other errors encountered by backup_step()). (CVS 6266) file: [9563f473] check-in: [9b8c8b18] user: danielk1977 branch: trunk, size: 20682 | |
2009-02-04
| ||
17:40 | Simplify wording of backup API error message. Decapitalize some other error messages. (CVS 6256) file: [12cd9a55] check-in: [f92405af] user: drh branch: trunk, size: 20311 | |
16:56 | The sqlite3_backup_init() interface must lock the destination in case it needs to change the error message. (CVS 6255) file: [2419ac3a] check-in: [572378d3] user: drh branch: trunk, size: 20319 | |
01:49 | Remove compiler warnings under MSVC. (CVS 6249) file: [1cfa5ed1] check-in: [6301f08a] user: shane branch: trunk, size: 20243 | |
2009-02-03
| ||
22:51 | Correction to check-ins (6246) and (6247): The backup object might not hold a valid destination connection pointer. Also, do not reset the page cache when establishing a read-lock while there is a persistent or truncated journal, only if there is a journal that really needs to rollback. Otherwise backups always reset whenever the source database file is read. (CVS 6248) file: [ddae8526] check-in: [7f827ba9] user: drh branch: trunk, size: 20221 | |
22:17 | A backup must clear the internal schema of the destination database so that the schema will be reloaded for the next sqlite3_prepare() (CVS 6247) file: [0491573a] check-in: [76f23a43] user: drh branch: trunk, size: 20083 | |
21:13 | Must hold mutex on the destination during backups. Add documentation to warn programmers that attempting to use the destination connection during a backup can lead to deadlock. (CVS 6246) file: [cc6c8a1c] check-in: [5f6c06b9] user: drh branch: trunk, size: 20034 | |
16:51 | Commit first version of the 'backup' feature. (CVS 6241) file: [a7605687] check-in: [663479b4] user: danielk1977 branch: trunk, size: 19676 Added | |