Commit Graph

97 Commits

Author SHA1 Message Date
dan
ef648698c8 Fix minor problems in the ota demo application.
FossilOrigin-Name: 6aaaec6e63cdf713b0d67e24a892088ff251c82a
2015-06-29 15:41:50 +00:00
dan
815bd625c2 Remove the sqlite3ota_open_v2() API. Add a new parameter to sqlite3ota_open() instead.
FossilOrigin-Name: c74e0bc481ce995f83ca8384e05dfbe068a0ae85
2015-05-19 17:48:11 +00:00
dan
a6fb464878 Allow OTA update state data to be stored in a database separate from the OTA update database.
FossilOrigin-Name: 5af8db56af457d60ea030d84666ca7fffb6821fe
2015-05-19 16:22:58 +00:00
dan
6758959ec3 Fix a problem in the "ota" utility program causing it to crash if SQLite failed to open the target database.
FossilOrigin-Name: a1a2b4a2eff4f641fa80e8ffa805c97afb73be95
2015-04-23 19:38:20 +00:00
dan
55d46f01c5 Fix a performance problem in calls to sqlite3ota_close() made after the OTA update has been completely applied and checkpointed.
FossilOrigin-Name: fa62093b2531424846ea500c4155170d1bc7110e
2015-04-23 19:18:42 +00:00
dan
1cdd523a50 Have OTA maintain a small LRU cache of UPDATE statements. This reduces the amount of time it spends compiling UPDATE if a single data_xxx table contains many different ota_control strings.
FossilOrigin-Name: baee3556ea10d96f1623cf4dce112fa1a1070820
2015-04-23 18:14:21 +00:00
dan
39b7ff7987 Add comments related to database locking to sqlite3ota.h.
FossilOrigin-Name: 77242965e77446313a8f0a65a39fccb67fe4cabf
2015-04-22 11:34:38 +00:00
dan
903dd7d5d1 Add a comment to sqlite3ota.h. No code changes.
FossilOrigin-Name: 352fa09efd8240567b8f9487944e8c3ade4e664a
2015-04-21 15:35:30 +00:00
dan
1c29c27bb0 Ensure that filenames passed to the VFS xOpen() function are terminated by 2 '\0' bytes.
FossilOrigin-Name: 66eff473c3634edb42f6ad6955acfba3e3a10def
2015-04-17 17:00:52 +00:00
dan
43030868e6 Fix a memory leak in sqlite3ota.c that can follow an OOM error.
FossilOrigin-Name: c3dc15e71782fc70e92b71ad9eec0cf8ffef611f
2015-04-17 16:29:11 +00:00
dan
ec16d98489 Have OTA always specify SQLITE_CONFIG_URI when opening databases. Fix a test issue causing otacrash.test to fail.
FossilOrigin-Name: 0d0e5ec064eaecb200b9b601b7a54a1700cd176e
2015-04-17 08:36:05 +00:00
dan
5c06dd831f Be sure to release any xShmLock locks held when closing an OTA handle.
FossilOrigin-Name: d0fba72a47f73082ade40a732aab114bc8f6d83e
2015-04-16 18:49:53 +00:00
dan
28b22a0159 Fix a mismatched printf() argument and format specifier. Add ota files to Makefile.in.
FossilOrigin-Name: 5db810a88dac5cbf1f6b321345d01cc0d9d05d31
2015-04-16 14:33:09 +00:00
dan
4141a81b30 Avoid attempting to rename the *-oal file while it is still open.
FossilOrigin-Name: 658c3b0c80b9fe7eaac5982573651dc649a4c53f
2015-04-16 10:55:58 +00:00
dan
f37120a416 When the OTA module updates or deletes a row, save only those fields that are part of an index or primary key to the ota update database.
FossilOrigin-Name: 6326fd3249bee267da0172f8afd1e7b3f71521b9
2015-03-24 18:03:29 +00:00
dan
5e4eeb3c00 Fix a broken assert() in the ota module.
FossilOrigin-Name: 858de8a5e7925bd96d7b9c0f00bc16358cf3b295
2015-03-23 17:10:51 +00:00
dan
c3b328da6e Allow whereShortCut() to use the PRIMARY KEY index of a WITHOUT ROWID table to optimize a vector of "IS" operators in a WHERE clause.
FossilOrigin-Name: 52e73eeca063bb30092ce600068bf487641399a0
2015-03-18 20:03:27 +00:00
dan
9340de52e2 Clarify that OTA is unable to update or delete rows with NULL values in primary key fields.
FossilOrigin-Name: 2e7c1e0a0d128d9bac119692b2505b5ed0abe87a
2015-03-18 19:04:40 +00:00
dan
54fc21438e Fix some problems with OTA and empty target databases, or target databases with the wrong set of tables. Also add SQLITE_FCNTL_VFSNAME support to the OTA VFS.
FossilOrigin-Name: 46119e8d8e391d8dea844352521b58415f7365b1
2015-03-05 16:21:20 +00:00
dan
2bd7ace54e Add comments to sqlite3ota.h to make it clear that passing NULL in place of a parent VFS name to sqlite3ota_create_vfs() causes the new VFS to use the system default as its parent.
FossilOrigin-Name: 158c1a48818a9abc001b9ea547167c2624a7bad3
2015-03-05 14:07:25 +00:00
dan
67d4b20c46 Fix a typo in sqlite3ota.h.
FossilOrigin-Name: 04087dec4c3db5f322eca289585525b7267ed4f8
2015-03-05 13:43:21 +00:00
dan
5b828f8c33 Fix building with ENABLE_OTA and OMIT_LOAD_EXTENSION.
FossilOrigin-Name: d6d21ff55228d3ffe6cdbb5755645b147806a1da
2015-02-23 20:09:50 +00:00
dan
04f121c187 Change SQLITE_FCNTL_ZIPVFS_PAGER to SQLITE_FCNTL_ZIPVFS.
FossilOrigin-Name: f7865b942834dd2f6b865336e08ba1adbf20612a
2015-02-23 15:41:48 +00:00
dan
5ebc83b1d2 Update the sqlite3ota_db() API to account for the fact that each OTA handle now uses two SQLite database handles.
FossilOrigin-Name: ef08ecceb7e237a01af6cc3141dccee09ffe9ae3
2015-02-23 15:02:13 +00:00
dan
882b8e0974 Improve tests for resuming ota updates following power failures. Fix a problem revealed by the same.
FossilOrigin-Name: 1cb675e5392f179516d8e7a52760922a6c7df4d0
2015-02-23 12:22:55 +00:00
dan
ee9fa4af15 Fix some problems with resuming ota updates if saving the state is interrupted by a power failure or system crash.
FossilOrigin-Name: 6d5ed70d0dbabe9c2ab2f2dba47747d17d937781
2015-02-21 20:08:25 +00:00
dan
92f55ceb70 Add some missing comments and fix other minor code issues in sqlite3ota.c.
FossilOrigin-Name: 718fd8b673d6557dd0eaad03e6a3332b5490afbf
2015-02-20 14:36:16 +00:00
dan
942b0a68ea Ensure the mutex used to protect the linked list of all main database files opened by a single ota vfs is allocated.
FossilOrigin-Name: 9c8682d6650a94e11f9bec5baff69ed9668874fa
2015-02-19 19:59:35 +00:00
dan
138bf3bc7f Update various documentation comments in sqlite3ota.c and sqlite3ota.h.
FossilOrigin-Name: 60e0a46b82dd9c704e8aa977d1ccdd73d388422f
2015-02-19 18:06:40 +00:00
dan
20ab217f93 Add tests for a couple of previously untested branches in the ota code.
FossilOrigin-Name: a3c1bc5d5e3f4b197f48cbbc240608e94bfc2b45
2015-02-19 13:36:02 +00:00
dan
7551c5c3e6 Add new file ota12.test, containing tests for applying ota updates to live databases with other active reader/writer clients.
FossilOrigin-Name: 0864d127fe42fc0db7ab30a3ebf74c0114095648
2015-02-18 20:17:14 +00:00
dan
e3e031ce85 Add ota tests to increase code coverage. Fix some minor issues in error handling within the ota code.
FossilOrigin-Name: 2b10c5d2b8b8b535d3dec0c68a777db16268e1e5
2015-02-18 20:16:15 +00:00
dan
d092df51de Fix a problem with OTA updates in the presence of database readers.
FossilOrigin-Name: 144bb29ffcbfe96dc10c0224113e73a80e89314b
2015-02-18 17:40:05 +00:00
dan
eadc772beb Improve test coverage of ota code a bit.
FossilOrigin-Name: a438fa6c9ad2fb1d78ac747172d07455d6381387
2015-02-17 20:49:42 +00:00
dan
f5fe23909d Add extra tests and fixes for ota.
FossilOrigin-Name: e0b7151962fedbcac975f2216fd6b33b995a8945
2015-02-16 21:13:19 +00:00
dan
5902352fca Add further tests and fixes for ota.
FossilOrigin-Name: 62dc1fffc38cb157c15105098749b6dd0198eb84
2015-02-16 11:48:34 +00:00
dan
c76c64f931 Move tcl test code from sqlite3ota.c to new file ext/ota/test_ota.c.
FossilOrigin-Name: f20779a6e890ba73bfaa904cefcf3a029b01fed4
2015-02-16 06:27:37 +00:00
dan
52800df9fc Change the way the "incremental checkpoint" function of OTA works in order to reduce the effect on the SQLite core code.
FossilOrigin-Name: b64a11a754dc56f3406d3b703531ebe9e4af4908
2015-02-14 18:58:22 +00:00
dan
01325e86e6 Merge the ota-update-no-pager_ota_mode branch into this one.
FossilOrigin-Name: 71887cd9b38def398d48eaf0ec34eeac3c7c5177
2015-02-11 17:05:17 +00:00
dan
a3cf4f7ccb Merge latest trunk changes with this branch.
FossilOrigin-Name: 0b63e8dcbaec5043e353734e684c2a46552a3409
2015-02-11 16:54:48 +00:00
dan
2e24971f2a Ensure that an error is reported if an attempt is made to update a wal mode database via ota.
FossilOrigin-Name: 6fc5d4d26a603b3906f02ceea0f507780d0c35eb
2015-02-11 16:25:27 +00:00
dan
cd73244144 Further tweaks to work with zipvfs.
FossilOrigin-Name: 0f152416be792457c52417aeb531ac860d12a5bd
2015-02-10 20:00:38 +00:00
dan
07427d0350 Add documentation and test cases for sqlite3ota_create_vfs(). Also code to detect errors in zipvfs/ota setup.
FossilOrigin-Name: e729668168f00325459bc2e9b515aa95e57f2754
2015-02-10 17:08:17 +00:00
dan
faa8c4fdcb Add the sqlite3ota_create_vfs() and sqlite3ota_destroy_vfs() functions.
FossilOrigin-Name: 96443ecb6909141aa621a16e628455857d036482
2015-02-09 20:07:35 +00:00
dan
de1f6a270b Add comments to explain the role of the ota vfs.
FossilOrigin-Name: 7bb633639d1e41067903a49653f09a823054e213
2015-02-07 20:20:32 +00:00
dan
dd0ad3785b Remove "PRAGMA pager_ota_mode".
FossilOrigin-Name: 8ac58e46782bd6b81c06fdf1cb5b316b8a4e1ddf
2015-02-07 19:17:36 +00:00
drh
2f8109cef1 Revise the way that the index structure for a WITHOUT ROWID table is
discovered.

FossilOrigin-Name: 7f10a0eaf1fedfa020cbd7019ec9342ffdc3b9b0
2015-02-06 00:31:45 +00:00
dan
8800b53bc5 Change a comment in sqlite3ota.h to make it clear that it is not possible to insert a NULL value into an INTEGER PRIMARY KEY column using ota.
FossilOrigin-Name: a5e86bea4ad51bbb988a2a2215961706894f4a02
2015-02-05 17:46:19 +00:00
dan
a8ccf3ed74 Prevent ota updates from violating NOT NULL constraints. Add a comment to the "limitations" section of sqlite3ota.h saying that CHECK constraints are not enforced.
FossilOrigin-Name: 74e073dd604142212f3d3e1931065d124daabd80
2015-02-05 17:36:30 +00:00
drh
d4ef7c50bb Figure out the primary-key type of a table using queries of sqlite_master
and the table_info and index_list pragmas, obviating the need for
SQLITE_TESTCTRL_TBLTYPE.

FossilOrigin-Name: 50ecdfc443b51e3569c6add2fba5132f959c61cb
2015-02-05 01:49:31 +00:00