]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
11 years agoFix some problems with resuming ota updates if saving the state is interrupted by...
dan [Sat, 21 Feb 2015 20:08:25 +0000 (20:08 +0000)] 
Fix some problems with resuming ota updates if saving the state is interrupted by a power failure or system crash.

FossilOrigin-Name: 6d5ed70d0dbabe9c2ab2f2dba47747d17d937781

11 years agoUpdate document on sqlite3_mprintf() and related functions. Discuss the
drh [Sat, 21 Feb 2015 15:42:57 +0000 (15:42 +0000)] 
Update document on sqlite3_mprintf() and related functions.  Discuss the
%w format and point out that obscure ANSI-C formats are not supported.
No changes to code.

FossilOrigin-Name: f8917ba4d917bc762b3b252466ab72a8a70dc0d8

11 years agoMerge all recent trunk changes into the sessions branch.
drh [Sat, 21 Feb 2015 15:13:50 +0000 (15:13 +0000)] 
Merge all recent trunk changes into the sessions branch.

FossilOrigin-Name: f36bb5fa5c5e3430808fe35d58f45559a216d341

11 years agoFix a compiler warning associated with USE_PREAD64.
drh [Sat, 21 Feb 2015 00:56:05 +0000 (00:56 +0000)] 
Fix a compiler warning associated with USE_PREAD64.

FossilOrigin-Name: c299e55a661c04f71ab43cb8aed04f8ece6e0567

11 years agoFix over-length source code lines in os_unix.c.
drh [Sat, 21 Feb 2015 00:49:00 +0000 (00:49 +0000)] 
Fix over-length source code lines in os_unix.c.

FossilOrigin-Name: 7560a9fa50236ecaa0617f1ab5bb5662f4a61c72

11 years agoKeep track of the optimal number of reserved bytes (by looking at reserve
drh [Sat, 21 Feb 2015 00:19:25 +0000 (00:19 +0000)] 
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.

FossilOrigin-Name: 28c2b726285ea88b334acfd6390a057d2d244838

11 years agoAdd some missing comments and fix other minor code issues in sqlite3ota.c.
dan [Fri, 20 Feb 2015 14:36:16 +0000 (14:36 +0000)] 
Add some missing comments and fix other minor code issues in sqlite3ota.c.

FossilOrigin-Name: 718fd8b673d6557dd0eaad03e6a3332b5490afbf

11 years agoEnsure the mutex used to protect the linked list of all main database files opened...
dan [Thu, 19 Feb 2015 19:59:35 +0000 (19:59 +0000)] 
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

11 years agoUpdate various documentation comments in sqlite3ota.c and sqlite3ota.h.
dan [Thu, 19 Feb 2015 18:06:40 +0000 (18:06 +0000)] 
Update various documentation comments in sqlite3ota.c and sqlite3ota.h.

FossilOrigin-Name: 60e0a46b82dd9c704e8aa977d1ccdd73d388422f

11 years agoFix errors in the EBCDIC upper-case to lower-case translation table.
drh [Thu, 19 Feb 2015 17:16:14 +0000 (17:16 +0000)] 
Fix errors in the EBCDIC upper-case to lower-case translation table.

FossilOrigin-Name: 905009f6723040d4da4776b6fd07e83c628dea2b

11 years agoRemove a redundant call to statfs() in the xOpen() method of the unix VFS.
drh [Thu, 19 Feb 2015 16:12:04 +0000 (16:12 +0000)] 
Remove a redundant call to statfs() in the xOpen() method of the unix VFS.
Also fix an unused local variable warning.

FossilOrigin-Name: 8215727dda384351765ab1d5c53ea80775b4ec65

11 years agoMerge latest trunk changes with this branch.
dan [Thu, 19 Feb 2015 14:41:24 +0000 (14:41 +0000)] 
Merge latest trunk changes with this branch.

FossilOrigin-Name: 6f5888a5e430feb5d9a50009a2eb103d9945bd22

11 years agoAdd tests for a couple of previously untested branches in the ota code.
dan [Thu, 19 Feb 2015 13:36:02 +0000 (13:36 +0000)] 
Add tests for a couple of previously untested branches in the ota code.

FossilOrigin-Name: a3c1bc5d5e3f4b197f48cbbc240608e94bfc2b45

11 years agoMove the os_unix.c file closer to apple-osx.
drh [Thu, 19 Feb 2015 02:43:02 +0000 (02:43 +0000)] 
Move the os_unix.c file closer to apple-osx.

FossilOrigin-Name: 81f242e338d6122e27aad86986bfd140012c6582

11 years agoFirst small steps toward brining trunk and apple-osx closer together.
drh [Thu, 19 Feb 2015 00:29:11 +0000 (00:29 +0000)] 
First small steps toward brining trunk and apple-osx closer together.

FossilOrigin-Name: 28284ccc0d7301503f6d2d7bee9093738d52e331

11 years agoAdd new file ota12.test, containing tests for applying ota updates to live databases...
dan [Wed, 18 Feb 2015 20:17:14 +0000 (20:17 +0000)] 
Add new file ota12.test, containing tests for applying ota updates to live databases with other active reader/writer clients.

FossilOrigin-Name: 0864d127fe42fc0db7ab30a3ebf74c0114095648

11 years agoAdd ota tests to increase code coverage. Fix some minor issues in error handling...
dan [Wed, 18 Feb 2015 20:16:15 +0000 (20:16 +0000)] 
Add ota tests to increase code coverage. Fix some minor issues in error handling within the ota code.

FossilOrigin-Name: 2b10c5d2b8b8b535d3dec0c68a777db16268e1e5

11 years agoFix a problem with OTA updates in the presence of database readers.
dan [Wed, 18 Feb 2015 17:40:05 +0000 (17:40 +0000)] 
Fix a problem with OTA updates in the presence of database readers.

FossilOrigin-Name: 144bb29ffcbfe96dc10c0224113e73a80e89314b

11 years agoImprove test coverage of ota code a bit.
dan [Tue, 17 Feb 2015 20:49:42 +0000 (20:49 +0000)] 
Improve test coverage of ota code a bit.

FossilOrigin-Name: a438fa6c9ad2fb1d78ac747172d07455d6381387

11 years agoAdd extra tests and fixes for ota.
dan [Mon, 16 Feb 2015 21:13:19 +0000 (21:13 +0000)] 
Add extra tests and fixes for ota.

FossilOrigin-Name: e0b7151962fedbcac975f2216fd6b33b995a8945

11 years agoAdd further tests and fixes for ota.
dan [Mon, 16 Feb 2015 11:48:34 +0000 (11:48 +0000)] 
Add further tests and fixes for ota.

FossilOrigin-Name: 62dc1fffc38cb157c15105098749b6dd0198eb84

11 years agoMove tcl test code from sqlite3ota.c to new file ext/ota/test_ota.c.
dan [Mon, 16 Feb 2015 06:27:37 +0000 (06:27 +0000)] 
Move tcl test code from sqlite3ota.c to new file ext/ota/test_ota.c.

FossilOrigin-Name: f20779a6e890ba73bfaa904cefcf3a029b01fed4

11 years agoChange the way the "incremental checkpoint" function of OTA works in order to reduce...
dan [Sat, 14 Feb 2015 18:58:22 +0000 (18:58 +0000)] 
Change the way the "incremental checkpoint" function of OTA works in order to reduce the effect on the SQLite core code.

FossilOrigin-Name: b64a11a754dc56f3406d3b703531ebe9e4af4908

11 years agoImprovements to SQLITE_ENABLE_API_ARMOR.
drh [Fri, 13 Feb 2015 16:36:14 +0000 (16:36 +0000)] 
Improvements to SQLITE_ENABLE_API_ARMOR.

FossilOrigin-Name: 823ad40ccb5b51aaa0d5a48da63b465df9d0649a

11 years agoMake sure the prepared statement auto-resets on extended error codes
drh [Fri, 13 Feb 2015 12:05:56 +0000 (12:05 +0000)] 
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

11 years agoFor the shell '.import' command, make sure the last column value present is considere...
mistachkin [Thu, 12 Feb 2015 22:45:25 +0000 (22:45 +0000)] 
For the shell '.import' command, make sure the last column value present is considered before NULL filling any missing ones.

FossilOrigin-Name: 9c5bcad1f7d04c16f3ec7fc483280059ae93961b

11 years agoMerge the ota-update-no-pager_ota_mode branch into this one.
dan [Wed, 11 Feb 2015 17:05:17 +0000 (17:05 +0000)] 
Merge the ota-update-no-pager_ota_mode branch into this one.

FossilOrigin-Name: 71887cd9b38def398d48eaf0ec34eeac3c7c5177

11 years agoMerge latest trunk changes with this branch. ota-update-no-pager_ota_mode
dan [Wed, 11 Feb 2015 16:54:48 +0000 (16:54 +0000)] 
Merge latest trunk changes with this branch.

FossilOrigin-Name: 0b63e8dcbaec5043e353734e684c2a46552a3409

11 years agoEnsure that an error is reported if an attempt is made to update a wal mode database...
dan [Wed, 11 Feb 2015 16:25:27 +0000 (16:25 +0000)] 
Ensure that an error is reported if an attempt is made to update a wal mode database via ota.

FossilOrigin-Name: 6fc5d4d26a603b3906f02ceea0f507780d0c35eb

11 years agoFurther tweaks to work with zipvfs.
dan [Tue, 10 Feb 2015 20:00:38 +0000 (20:00 +0000)] 
Further tweaks to work with zipvfs.

FossilOrigin-Name: 0f152416be792457c52417aeb531ac860d12a5bd

11 years agoAdd documentation and test cases for sqlite3ota_create_vfs(). Also code to detect...
dan [Tue, 10 Feb 2015 17:08:17 +0000 (17:08 +0000)] 
Add documentation and test cases for sqlite3ota_create_vfs(). Also code to detect errors in zipvfs/ota setup.

FossilOrigin-Name: e729668168f00325459bc2e9b515aa95e57f2754

11 years agoAdd the sqlite3ota_create_vfs() and sqlite3ota_destroy_vfs() functions.
dan [Mon, 9 Feb 2015 20:07:35 +0000 (20:07 +0000)] 
Add the sqlite3ota_create_vfs() and sqlite3ota_destroy_vfs() functions.

FossilOrigin-Name: 96443ecb6909141aa621a16e628455857d036482

11 years agoPropagate COLLATE operators upward through function calls and CASE operations.
drh [Mon, 9 Feb 2015 18:28:03 +0000 (18:28 +0000)] 
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

11 years agoFix WITHOUT ROWID table handing in sqlite3_analyzer.
dan [Mon, 9 Feb 2015 17:46:11 +0000 (17:46 +0000)] 
Fix WITHOUT ROWID table handing in sqlite3_analyzer.

FossilOrigin-Name: 937e0fe7008c0f76b6a584180df9a9457166a0b1

11 years agoAdd test cases for the query flattener fix for tkt-2f7170d7
drh [Mon, 9 Feb 2015 16:34:33 +0000 (16:34 +0000)] 
Add test cases for the query flattener fix for
ticket [2f7170d73bf9abf8].

FossilOrigin-Name: dd8f7f7511639a1baa41a6ff2e359dc6f1e66943

11 years agoPropagate the COLLATE operator upward through function calls.
drh [Mon, 9 Feb 2015 16:09:34 +0000 (16:09 +0000)] 
Propagate the COLLATE operator upward through function calls.
Initial fix for ticket [ca0d20b6cdddec5e8].

FossilOrigin-Name: c053448a55f9d030e8ffe88cf4fc14ada7f6ec19

11 years agoDisable the query flattener for aggregate subqueries if the parent query
drh [Mon, 9 Feb 2015 15:21:36 +0000 (15:21 +0000)] 
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

11 years agoRename the internal "EP_Constant" bitmask to a less misleading "EP_ConstFunc".
drh [Mon, 9 Feb 2015 14:07:07 +0000 (14:07 +0000)] 
Rename the internal "EP_Constant" bitmask to a less misleading "EP_ConstFunc".

FossilOrigin-Name: 4ef7ceced2b0000d21f7f8014384c04a0e4661d3

11 years agoIn selecttrace 0x100 mode, show the parse tree after name resolution instead
drh [Mon, 9 Feb 2015 13:42:59 +0000 (13:42 +0000)] 
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

11 years agoIn selecttrace mode 0x100, show a complete parse-tree both before and after
drh [Mon, 9 Feb 2015 11:54:41 +0000 (11:54 +0000)] 
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

11 years agoFix over-length source code lines in resolver.c. No logic changes.
drh [Mon, 9 Feb 2015 10:20:19 +0000 (10:20 +0000)] 
Fix over-length source code lines in resolver.c.  No logic changes.

FossilOrigin-Name: c12edb85076d0832e3a0abbbba4d07f3cb5d7f0e

11 years agoAdd comments to explain the role of the ota vfs.
dan [Sat, 7 Feb 2015 20:20:32 +0000 (20:20 +0000)] 
Add comments to explain the role of the ota vfs.

FossilOrigin-Name: 7bb633639d1e41067903a49653f09a823054e213

11 years agoRemove "PRAGMA pager_ota_mode".
dan [Sat, 7 Feb 2015 19:17:36 +0000 (19:17 +0000)] 
Remove "PRAGMA pager_ota_mode".

FossilOrigin-Name: 8ac58e46782bd6b81c06fdf1cb5b316b8a4e1ddf

11 years agoFix potential 32-bit integer overflow problems on the offset and length
drh [Sat, 7 Feb 2015 15:16:35 +0000 (15:16 +0000)] 
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

11 years agoMerge all the latest enhancements from trunk.
drh [Fri, 6 Feb 2015 15:40:32 +0000 (15:40 +0000)] 
Merge all the latest enhancements from trunk.

FossilOrigin-Name: ae7eef117f28a5dae7a05805f2d31ac532a9fcc5

11 years agoMerge the command-line shell enhancements from trunk.
drh [Fri, 6 Feb 2015 15:03:45 +0000 (15:03 +0000)] 
Merge the command-line shell enhancements from trunk.

FossilOrigin-Name: c3931db560ab4a2601c7f7318fb02c8d5e6862b1

11 years agoChange the name of ".info" to ".dbinfo" and add an optional second argument
drh [Fri, 6 Feb 2015 14:51:13 +0000 (14:51 +0000)] 
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

11 years agoAdd the ".info" command to the shell.
drh [Fri, 6 Feb 2015 14:19:44 +0000 (14:19 +0000)] 
Add the ".info" command to the shell.

FossilOrigin-Name: 0a3100a7f264ffce6078c35e341f2f0af6c09fbb

11 years agoAdd the index_xinfo pragma which gives information about the fields that
drh [Fri, 6 Feb 2015 01:07:15 +0000 (01:07 +0000)] 
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

11 years agoRevise the way that the index structure for a WITHOUT ROWID table is
drh [Fri, 6 Feb 2015 00:31:45 +0000 (00:31 +0000)] 
Revise the way that the index structure for a WITHOUT ROWID table is
discovered.

FossilOrigin-Name: 7f10a0eaf1fedfa020cbd7019ec9342ffdc3b9b0

11 years agoChange a comment in sqlite3ota.h to make it clear that it is not possible to insert...
dan [Thu, 5 Feb 2015 17:46:19 +0000 (17:46 +0000)] 
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

11 years agoPrevent ota updates from violating NOT NULL constraints. Add a comment to the "limita...
dan [Thu, 5 Feb 2015 17:36:30 +0000 (17:36 +0000)] 
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

11 years agoFigure out the primary-key type of a table using queries of sqlite_master
drh [Thu, 5 Feb 2015 01:49:31 +0000 (01:49 +0000)] 
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

11 years agoMerge all changes from index_xinfo, including the move of the pragma table
drh [Wed, 4 Feb 2015 23:51:59 +0000 (23:51 +0000)] 
Merge all changes from index_xinfo, including the move of the pragma table
into the separate pragma.h file.

FossilOrigin-Name: 21e95d28a51e56b45a9d4166475972535e53f954

11 years agoMerge all recent trunk changes, including the movement of the pragma index_xinfo
drh [Wed, 4 Feb 2015 23:13:48 +0000 (23:13 +0000)] 
Merge all recent trunk changes, including the movement of the pragma
table into the separate pragma.h header file.

FossilOrigin-Name: 3af19f84446ba5fc1ed754d0d73f6a6d7fb2f365

11 years agoFix a missing mutex in SQLITE_TESTCTRL_IMPOSTER.
drh [Wed, 4 Feb 2015 20:56:49 +0000 (20:56 +0000)] 
Fix a missing mutex in SQLITE_TESTCTRL_IMPOSTER.

FossilOrigin-Name: 71691c4be54b9ac6a35e35013f939b7d6fd4e6b8

11 years agoFix the error messages returned by ota if an update violates a unique constraint.
dan [Wed, 4 Feb 2015 19:20:42 +0000 (19:20 +0000)] 
Fix the error messages returned by ota if an update violates a unique constraint.

FossilOrigin-Name: c4845a3b591723ff60b7b1da198f44908c12bdfc

11 years agoAvoid a linear scan of the entire table when ota updates or deletes a row from a...
dan [Wed, 4 Feb 2015 16:32:47 +0000 (16:32 +0000)] 
Avoid a linear scan of the entire table when ota updates or deletes a row from a table with an external primary key index.

FossilOrigin-Name: 1db198ccca1e5c5a922cefe3daeff8d2e5d3a7f7

11 years agoFix a memory leak that could follow an OOM error in ota.
dan [Wed, 4 Feb 2015 11:08:47 +0000 (11:08 +0000)] 
Fix a memory leak that could follow an OOM error in ota.

FossilOrigin-Name: 0d5415f26427d0af89663c5a3e944e488143b648

11 years agoFix a typo in the --help output for speedtest1. Fix a dependency error
drh [Tue, 3 Feb 2015 19:20:03 +0000 (19:20 +0000)] 
Fix a typo in the --help output for speedtest1.  Fix a dependency error
in the Makefile.in for speedtest1.

FossilOrigin-Name: f30a057aeeac2b863493b6325325b075a76b9d21

11 years agoFix some problems surrounding WITHOUT ROWID tables with DESC primary key indexes
dan [Tue, 3 Feb 2015 18:43:42 +0000 (18:43 +0000)] 
Fix some problems surrounding WITHOUT ROWID tables with DESC primary key indexes
.

FossilOrigin-Name: a21fefb79a161e6bb057ae4f6ba554f659706ac1

11 years agoRemove "PRAGMA ota_mode".
dan [Tue, 3 Feb 2015 15:56:08 +0000 (15:56 +0000)] 
Remove "PRAGMA ota_mode".

FossilOrigin-Name: 1c111447a07687c30ed4ad5a6c27a169c85b7ea6

11 years agoBreak out the (script-generated) pragma parsing tables into a separate file,
drh [Mon, 2 Feb 2015 21:34:54 +0000 (21:34 +0000)] 
Break out the (script-generated) pragma parsing tables into a separate file,
pragma.h, to make editing easier.

FossilOrigin-Name: 32c0325bcb083fe3f0f0cfe999d00f754e15299e

11 years agoEnsure generated header file fts5parse.h is included in sqlite3.c.
dan [Mon, 2 Feb 2015 11:58:21 +0000 (11:58 +0000)] 
Ensure generated header file fts5parse.h is included in sqlite3.c.

FossilOrigin-Name: bc7be2fcfd29d6f1b567b69b3b20896eceb99798

11 years agoFix some problems with building fts5 and fts3 together using the amalgamation.
dan [Mon, 2 Feb 2015 11:32:20 +0000 (11:32 +0000)] 
Fix some problems with building fts5 and fts3 together using the amalgamation.

FossilOrigin-Name: fb10bbb9f9c4481e6043d323a3018a4ec68eb0ff

11 years agoMerge latest trunk changes with this branch.
dan [Mon, 2 Feb 2015 09:40:36 +0000 (09:40 +0000)] 
Merge latest trunk changes with this branch.

FossilOrigin-Name: 76212f2c9a3c3ff0e238d6dad776938c6af674e6

11 years agoHave ota use imposter tables to write to indexes instead of the sqlite3_index_writer...
dan [Sat, 31 Jan 2015 20:42:04 +0000 (20:42 +0000)] 
Have ota use imposter tables to write to indexes instead of the sqlite3_index_writer() interface. The error handling in this version is broken in a few small ways.

FossilOrigin-Name: cdaeab467f6aa3217be161377a9b78a4eec37093

11 years agoMinor optimizations to fts5 writes.
dan [Sat, 31 Jan 2015 15:23:44 +0000 (15:23 +0000)] 
Minor optimizations to fts5 writes.

FossilOrigin-Name: 1fffe51fa92f1784365140d5b163ab6c690981ae

11 years agoMerge in support for the index_xinfo pragma.
drh [Sat, 31 Jan 2015 02:34:23 +0000 (02:34 +0000)] 
Merge in support for the index_xinfo pragma.

FossilOrigin-Name: f9b6dc77021ee421bffd5697d5d337d3bbd07eb9

11 years agoAdd the "index_xinfo" pragma. Add new columns to the "index_info" and
drh [Sat, 31 Jan 2015 02:00:01 +0000 (02:00 +0000)] 
Add the "index_xinfo" pragma.  Add new columns to the "index_info" and
"index_list" pragmas.

FossilOrigin-Name: 30f51d7b3b292191e8351223242e708bb7f3dfa6

11 years agoMerge the SQLITE_TESTCTRL_IMPOSTER changes from trunk.
drh [Fri, 30 Jan 2015 21:00:10 +0000 (21:00 +0000)] 
Merge the SQLITE_TESTCTRL_IMPOSTER changes from trunk.

FossilOrigin-Name: 3ed6eb2fab5d95709ef392170339e6dd5ba13971

11 years agoChange SQLITE_TESTCTRL_INITMODE to SQLITE_TESTCTRL_IMPOSTER. Revise the order
drh [Fri, 30 Jan 2015 20:59:27 +0000 (20:59 +0000)] 
Change SQLITE_TESTCTRL_INITMODE to SQLITE_TESTCTRL_IMPOSTER.  Revise the order
of parameters.  Give it the ability to reset the schema parse table so that
imposter tables can be erased.

FossilOrigin-Name: 42d5601739c90434e5adfda8fa99ef7b903877db

11 years agoMerge all recent trunk changes, and especially the SQLITE_TESTCTRL_INITMODE
drh [Fri, 30 Jan 2015 16:36:17 +0000 (16:36 +0000)] 
Merge all recent trunk changes, and especially the SQLITE_TESTCTRL_INITMODE
enhancement.

FossilOrigin-Name: 36436dde74ce2536a9a430b4458216499ad113bf

11 years agoAdded SQLITE_TESTCTRL_INITMODE for improved testability.
drh [Fri, 30 Jan 2015 15:52:26 +0000 (15:52 +0000)] 
Added SQLITE_TESTCTRL_INITMODE for improved testability.

FossilOrigin-Name: 98e029134dc1300d3ecb48b41b5107ec69ba85db

11 years agoAdd a few simple test cases for SQLITE_TESTCTRL_INITMODE - cases which initmode-testctrl
drh [Fri, 30 Jan 2015 15:40:15 +0000 (15:40 +0000)] 
Add a few simple test cases for SQLITE_TESTCTRL_INITMODE - cases which
also test PRAGMA integrity_check.

FossilOrigin-Name: 3a6e2afe408d2b0c8166d00def2048568169d87a

11 years agoFix some problems with transactions that both read and write an fts5 table.
dan [Thu, 29 Jan 2015 20:59:34 +0000 (20:59 +0000)] 
Fix some problems with transactions that both read and write an fts5 table.

FossilOrigin-Name: 0e225b15357765f132c3364b222f9931a608a5b2

11 years agoFix some duplicated test names.
mistachkin [Thu, 29 Jan 2015 19:27:31 +0000 (19:27 +0000)] 
Fix some duplicated test names.

FossilOrigin-Name: 1797158db2a818134c5cba1578f69ed85948b980

11 years agoEnsure that "PRAGMA wal_checkpoint = TRUNCATE|FULL|RESTART" block on other connection...
dan [Thu, 29 Jan 2015 19:12:12 +0000 (19:12 +0000)] 
Ensure that "PRAGMA wal_checkpoint = TRUNCATE|FULL|RESTART" block on other connections and truncate the database file as required even if the entire wal file has already been checkpointed.

FossilOrigin-Name: 53429689d4fcf472edbc89cc50b5e69ba3270634

11 years agoSplit up the SRC variable in Makefile.msc to avoid over-long cmd.exe commands when...
drh [Thu, 29 Jan 2015 18:38:05 +0000 (18:38 +0000)] 
Split up the SRC variable in Makefile.msc to avoid over-long cmd.exe commands when TOP is set to a long pathname.

FossilOrigin-Name: 7d70ac65c16f08832a1f0fc4dec0f62a17cbcc85

11 years agoAdd the INITMODE test-control.
drh [Thu, 29 Jan 2015 17:54:52 +0000 (17:54 +0000)] 
Add the INITMODE test-control.

FossilOrigin-Name: 5940af8e7872209ce41feb958643b23f7e55d258

11 years agoOptimize range constraints on the rowid column of fts3/4 tables even if there is...
dan [Thu, 29 Jan 2015 11:52:22 +0000 (11:52 +0000)] 
Optimize range constraints on the rowid column of fts3/4 tables even if there is no MATCH clause in the query.

FossilOrigin-Name: 85dc12625d300fe48f3c096f54ebcb8b6ef4e30a

11 years agoAdd missing VdbeCoverage() macros to the sqlite3_index_writer() implementation.
drh [Wed, 28 Jan 2015 20:37:03 +0000 (20:37 +0000)] 
Add missing VdbeCoverage() macros to the sqlite3_index_writer() implementation.

FossilOrigin-Name: 6f8cda26e93f09eadf0b084131a1d4002d94d959

11 years agoWhen a "full", "restart" or "truncate" checkpoint is attempted, return SQLITE_BUSY...
dan [Wed, 28 Jan 2015 15:30:03 +0000 (15:30 +0000)] 
When a "full", "restart" or "truncate" checkpoint is attempted, return SQLITE_BUSY if a reader prevents the checkpointer from copying any frames at all into the database file.

FossilOrigin-Name: f270004016ef20f1963e0f1ad32e76bcbaeb6798

11 years agoCorrectly detect errors returned by walCheckpointStart() due to OOM.
drh [Wed, 28 Jan 2015 12:27:35 +0000 (12:27 +0000)] 
Correctly detect errors returned by walCheckpointStart() due to OOM.

FossilOrigin-Name: 8e878c20238ecf60e5d98d088a955e834ffd35c1

11 years agoMerge in all changes from trunk.
drh [Wed, 28 Jan 2015 12:00:40 +0000 (12:00 +0000)] 
Merge in all changes from trunk.

FossilOrigin-Name: 17c69be80542c5f84e21d60df3edc49422b087d9

11 years agoFix harmless compiler warnings.
mistachkin [Tue, 27 Jan 2015 21:24:33 +0000 (21:24 +0000)] 
Fix harmless compiler warnings.

FossilOrigin-Name: e7d2ec048c88237c124fbe598f8f7e950d43d90f

11 years agoFix a problem with fts5 doclist-indexes that occured if the first rowid of the first...
dan [Tue, 27 Jan 2015 20:41:00 +0000 (20:41 +0000)] 
Fix a problem with fts5 doclist-indexes that occured if the first rowid of the first non-term page of a doclist is zero.

FossilOrigin-Name: f704bc059e06b01f1d68fa7dad89e33eace6c389

11 years agoFix a bug in the fts3 snippet() function causing it to omit leading separator charact...
dan [Tue, 27 Jan 2015 19:01:26 +0000 (19:01 +0000)] 
Fix a bug in the fts3 snippet() function causing it to omit leading separator characters from snippets that begin with the first token in a column.

FossilOrigin-Name: adc9283dd9bc3a6463f8c4fe23dd58a3712c349d

11 years agoImprove the performance of fts3/4 queries that use the OR operator and at least one...
dan [Tue, 27 Jan 2015 18:43:02 +0000 (18:43 +0000)] 
Improve the performance of fts3/4 queries that use the OR operator and at least one auxiliary fts function.

FossilOrigin-Name: 245e8730451fbdc1c729beff7295c452df604009

11 years agoFix a (almost always harmless) read past the end of a memory allocation
drh [Tue, 27 Jan 2015 13:17:05 +0000 (13:17 +0000)] 
Fix a (almost always harmless) read past the end of a memory allocation
that comes about because the Expr.pTab field is checked on an
EXPR_REDUCEDSIZE Expr object before checking the Expr.op field to
know that the Expr.pTab field is meaningless.

FossilOrigin-Name: e098de691002a78270540430b0df1e120582b53f

11 years agoThe va_list argument cannot take on a NULL value and cannot be compared with
drh [Sun, 25 Jan 2015 20:19:53 +0000 (20:19 +0000)] 
The va_list argument cannot take on a NULL value and cannot be compared with
NULL on some platforms (ex: ARM).  So do not attempt to do so.

FossilOrigin-Name: 1964e656b4b420e8d6a4ba12d270ed02db292b88

11 years agoHave fts5 store rowids in ascending order. Query speed is virtually the same regardle...
dan [Sat, 24 Jan 2015 19:57:03 +0000 (19:57 +0000)] 
Have fts5 store rowids in ascending order. Query speed is virtually the same regardless of rowid order, and ascending order makes some insert optimizations easier.

FossilOrigin-Name: 5206ca6005bfa9dfc7346d4b89430c9748d32c10

11 years agoIn the command-line shell, make sure stderr is unbuffered so that it
drh [Sat, 24 Jan 2015 12:12:57 +0000 (12:12 +0000)] 
In the command-line shell, make sure stderr is unbuffered so that it
automatically flushes.  This has always been the case already for unix and
on Windows when the output is a console, but apparently was not the case
on Windows when the output was a pipe.

FossilOrigin-Name: 2a9ea9b4a7d6904efb2112e32efe84123dfa75d7

11 years agoFix compression of keys stored on internal segment b-tree nodes by fts5.
dan [Fri, 23 Jan 2015 17:43:21 +0000 (17:43 +0000)] 
Fix compression of keys stored on internal segment b-tree nodes by fts5.

FossilOrigin-Name: 51444f67c0cc58a3023eb1cd78e7cf889da6c80f

11 years agoRemove some redundant code from fts5.
dan [Fri, 23 Jan 2015 06:50:33 +0000 (06:50 +0000)] 
Remove some redundant code from fts5.

FossilOrigin-Name: 939b7a5de25e064bdf08e03864c35ab718da6f6f

11 years agoAdd further tests and fixes for fts5.
dan [Thu, 22 Jan 2015 19:13:08 +0000 (19:13 +0000)] 
Add further tests and fixes for fts5.

FossilOrigin-Name: 5b295897153e9b26cd0d2e7ea112a4d461d0a665

11 years agoMake sure errors in the FROM clause of a SELECT cause analysis to abort
drh [Thu, 22 Jan 2015 12:00:17 +0000 (12:00 +0000)] 
Make sure errors in the FROM clause of a SELECT cause analysis to abort
and unwind the stack before those errors have a chance to mischief
in the "*" column-name wildcard expander. Fix for ticket [32b63d542433ca67].

FossilOrigin-Name: 9e6eae660a02303fd140dac5fbff82364f4120cd

11 years agoChange the undocumented ".selecttrace" command in the shell to accept
drh [Thu, 22 Jan 2015 11:29:25 +0000 (11:29 +0000)] 
Change the undocumented ".selecttrace" command in the shell to accept
an integer bitmask rather than a boolean.

FossilOrigin-Name: bd63bf882c5a925f921adc9cf7425d2e7950f0b2

11 years agoFurther tests and fixes for fts5.
dan [Wed, 21 Jan 2015 20:30:14 +0000 (20:30 +0000)] 
Further tests and fixes for fts5.

FossilOrigin-Name: c020a291ed293a66d21c5885e50a7fee04aa6366

11 years agoFix an fts5 issue with loading doclist-indexes for a term that is the last thing...
dan [Wed, 21 Jan 2015 18:23:25 +0000 (18:23 +0000)] 
Fix an fts5 issue with loading doclist-indexes for a term that is the last thing on its leaf page.

FossilOrigin-Name: e0d614425f7f5ffe266fdc03642931b1ec19ad25