Commit Graph

13342 Commits

Author SHA1 Message Date
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
71405b27c9 Merge latest trunk changes with this branch.
FossilOrigin-Name: 6f5888a5e430feb5d9a50009a2eb103d9945bd22
2015-02-19 14:41:24 +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
drh
4bf66fd6f3 Move the os_unix.c file closer to apple-osx.
FossilOrigin-Name: 81f242e338d6122e27aad86986bfd140012c6582
2015-02-19 02:43:02 +00:00
drh
883ad04985 First small steps toward brining trunk and apple-osx closer together.
FossilOrigin-Name: 28284ccc0d7301503f6d2d7bee9093738d52e331
2015-02-19 00:29:11 +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
drh
96c707a3c2 Improvements to SQLITE_ENABLE_API_ARMOR.
FossilOrigin-Name: 823ad40ccb5b51aaa0d5a48da63b465df9d0649a
2015-02-13 16:36:14 +00:00
drh
983b5ee73d Make sure the prepared statement auto-resets on extended error codes
of SQLITE_BUSY and SQLITE_LOCKED even when compiled using
SQLITE_OMIT_AUTORESET.

FossilOrigin-Name: 3c6ca414879feb1f5d31d5fd95a1737530aca624
2015-02-13 12:05:56 +00:00
mistachkin
a0efb1ae11 For the shell '.import' command, make sure the last column value present is considered before NULL filling any missing ones.
FossilOrigin-Name: 9c5bcad1f7d04c16f3ec7fc483280059ae93961b
2015-02-12 22:45:25 +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
drh
6728cd9180 Propagate COLLATE operators upward through function calls and CASE operations.
And do not flatten an aggregate subquery into a query that uses other
subqueries.  Fixes for tickets [ca0d20b6cdddec5] and
[2f7170d73bf9], respectively.

FossilOrigin-Name: 24e78b8d65734a6a8ae21a20542cd1839e756fb1
2015-02-09 18:28:03 +00:00
dan
9fab5ed01f Fix WITHOUT ROWID table handing in sqlite3_analyzer.
FossilOrigin-Name: 937e0fe7008c0f76b6a584180df9a9457166a0b1
2015-02-09 17:46:11 +00:00
drh
2c5e9b5672 Add test cases for the query flattener fix for
ticket [2f7170d73bf9abf8].

FossilOrigin-Name: dd8f7f7511639a1baa41a6ff2e359dc6f1e66943
2015-02-09 16:34:33 +00:00
drh
2308ed3854 Propagate the COLLATE operator upward through function calls.
Initial fix for ticket [ca0d20b6cdddec5e8].

FossilOrigin-Name: c053448a55f9d030e8ffe88cf4fc14ada7f6ec19
2015-02-09 16:09:34 +00:00
drh
885a5b030e Disable the query flattener for aggregate subqueries if the parent query
uses other subqueries in its result set or WHERE clause or ORDER BY clause.
Preliminary fix for ticket [2f7170d73bf9abf8].  However it still contains
a defect similar to the COLLATE problem of [ca0d20b6cddd].

FossilOrigin-Name: 0b7d65e3fda676d193347cb782854c28a48252af
2015-02-09 15:21:36 +00:00
drh
63f845734e Rename the internal "EP_Constant" bitmask to a less misleading "EP_ConstFunc".
FossilOrigin-Name: 4ef7ceced2b0000d21f7f8014384c04a0e4661d3
2015-02-09 14:07:07 +00:00
drh
17645f5eec In selecttrace 0x100 mode, show the parse tree after name resolution instead
of before flattening, so that it is always seen even if flattening does not
occur.  Also: add the hex pointer value to the top of each SELECT tree.

FossilOrigin-Name: aa093fef2d2a7e26d987b46654963e4d7e66d444
2015-02-09 13:42:59 +00:00
drh
0e86a1ac08 In selecttrace mode 0x100, show a complete parse-tree both before and after
query flattening.  This is a change to debugging code only.

FossilOrigin-Name: b3c6b8a3c1075d2a87cef68f061d6a0098e6d8d0
2015-02-09 11:54:41 +00:00
drh
31e7147dfa Fix over-length source code lines in resolver.c. No logic changes.
FossilOrigin-Name: c12edb85076d0832e3a0abbbba4d07f3cb5d7f0e
2015-02-09 10:20:19 +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
d10d18da5f Fix potential 32-bit integer overflow problems on the offset and length
parameters to sqlite3_blob_read() and sqlite3_blob_write().  For
sqlite3_blob_open(), make sure the *ppBlob return parameter is zeroed if
the interface fails with SQLITE_MISUSE.

FossilOrigin-Name: 5df02f50f8348dfde4fc15126abc7b7ef7803e69
2015-02-07 15:16:35 +00:00
drh
00dbc89824 Merge the command-line shell enhancements from trunk.
FossilOrigin-Name: c3931db560ab4a2601c7f7318fb02c8d5e6862b1
2015-02-06 15:03:45 +00:00
drh
0e55db1cd8 Change the name of ".info" to ".dbinfo" and add an optional second argument
which is the ATTACH-ed DB about which information is provided.  Provide
".indexes" as an alternative name to the legacy ".indices" command.

FossilOrigin-Name: 0f65a7e2e09f801b66897479d501607caeae4abf
2015-02-06 14:51:13 +00:00
drh
f7502f005e Add the ".info" command to the shell.
FossilOrigin-Name: 0a3100a7f264ffce6078c35e341f2f0af6c09fbb
2015-02-06 14:19:44 +00:00
drh
fe0e84c948 Add the index_xinfo pragma which gives information about the fields that
reference the table PRIMARY KEY in addition to the index key fields.
Add extra columns "desc", "coll", and "key" to the index_info and index_xinfo
pragmas.  Add the "origin" and "partial" columns to the index_list pragma.

FossilOrigin-Name: 2743846cdba572f616f56d310633703b8b50959e
2015-02-06 01:07:15 +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
drh
fe9752d934 Merge all changes from index_xinfo, including the move of the pragma table
into the separate pragma.h file.

FossilOrigin-Name: 21e95d28a51e56b45a9d4166475972535e53f954
2015-02-04 23:51:59 +00:00
drh
4bb8cb0927 Merge all recent trunk changes, including the movement of the pragma
table into the separate pragma.h header file.

FossilOrigin-Name: 3af19f84446ba5fc1ed754d0d73f6a6d7fb2f365
2015-02-04 23:13:48 +00:00
drh
8fb15e3b20 Fix a missing mutex in SQLITE_TESTCTRL_IMPOSTER.
FossilOrigin-Name: 71691c4be54b9ac6a35e35013f939b7d6fd4e6b8
2015-02-04 20:56:49 +00:00
dan
06c9722564 Fix the error messages returned by ota if an update violates a unique constraint.
FossilOrigin-Name: c4845a3b591723ff60b7b1da198f44908c12bdfc
2015-02-04 19:20:42 +00:00