]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
7 years agoPRAGMA integrity_check returns SQLITE_OK even if it encounters corruption improved-integrity-check
drh [Wed, 13 Sep 2017 00:13:05 +0000 (00:13 +0000)] 
PRAGMA integrity_check returns SQLITE_OK even if it encounters corruption
while scanning indexes.

FossilOrigin-Name: 81f62e99f27dedf3dc10fa1593c4cd9fc158680867206aee853e503a0cc8df71

7 years agoSimplifications to the PRAGMA integrity_check code generator.
drh [Sun, 10 Sep 2017 01:06:05 +0000 (01:06 +0000)] 
Simplifications to the PRAGMA integrity_check code generator.

FossilOrigin-Name: 99b9140c795c0c17c4e9d2547477c9dac056edfd443f2b2bd70edecd43c49ab7

7 years agoSimplification and performance improvement to sqlite3_reset().
drh [Sat, 9 Sep 2017 22:46:56 +0000 (22:46 +0000)] 
Simplification and performance improvement to sqlite3_reset().

FossilOrigin-Name: b6425d0170721d803a055a958f1823c9c4be925cd93ac47562ff723daf8ce2ed

7 years agoImproved detection of malformed records by PRAGMA integrity_check.
drh [Sat, 9 Sep 2017 20:38:49 +0000 (20:38 +0000)] 
Improved detection of malformed records by PRAGMA integrity_check.

FossilOrigin-Name: 8fa923caa1535fc9ebed0214d211fc3d09a015d78afd01f288c215a7980d25f2

7 years agoFix harmless compiler warnings seen with MSVC.
mistachkin [Sat, 9 Sep 2017 00:51:36 +0000 (00:51 +0000)] 
Fix harmless compiler warnings seen with MSVC.

FossilOrigin-Name: faa22e29a5a05a16d46a428d838acedfa7d6fad6239495d59a6a1f4764e1b1b6

7 years agoHave the header comment for sqlite3Checkpoint() mention TRUNCATE along with
dan [Fri, 8 Sep 2017 17:48:00 +0000 (17:48 +0000)] 
Have the header comment for sqlite3Checkpoint() mention TRUNCATE along with
the other three checkpoint types. No changes to code.

FossilOrigin-Name: e1e3ca7ea43a68b9b57dc38d8855f63b63a53feb8128b666a1becf87a2c70341

7 years agoPrevent a possible crash when trying to recover using a carefully corrupted \
drh [Thu, 7 Sep 2017 09:56:37 +0000 (09:56 +0000)] 
Prevent a possible crash when trying to recover using a carefully corrupted \
and truncated rollback journal.  (Test case in TH3)

FossilOrigin-Name: 02828d717e2d97b1f59e9279cea9c06eed4accd4e262606bd90d060449c5a1a3

7 years agoUpdate "PRAGMA integrity_check" to detect inconsistencies between a single
dan [Tue, 5 Sep 2017 20:16:19 +0000 (20:16 +0000)] 
Update "PRAGMA integrity_check" to detect inconsistencies between a single
record's header and body.

FossilOrigin-Name: 9e393a0edf1a578ddecc16a72fe3c54b75c2a650d507bcbc37c9724fbede1494

7 years agoFix a comment describing the xRowid method of the "series" virtual table. No
dan [Tue, 5 Sep 2017 17:23:39 +0000 (17:23 +0000)] 
Fix a comment describing the xRowid method of the "series" virtual table. No
code changes.

FossilOrigin-Name: 868cd1960015dc1bf003f911dcc417a94540d1948617ea1838a48b5cff59afda

7 years agoAdd experimental API sqlite3rbu_temp_size_limit(). For limiting the amount of
dan [Tue, 5 Sep 2017 16:24:38 +0000 (16:24 +0000)] 
Add experimental API sqlite3rbu_temp_size_limit(). For limiting the amount of
temporary disk space RBU uses.

FossilOrigin-Name: 7fdd629830679db620d477df3c206bf84598cc935ccb51547c0d8444a186b63e

7 years agoUse the SQLITE_CORRUPT_BKPT return code in a couple more places.
mistachkin [Mon, 4 Sep 2017 19:31:54 +0000 (19:31 +0000)] 
Use the SQLITE_CORRUPT_BKPT return code in a couple more places.

FossilOrigin-Name: 72d22c226bf4311345e8844fd9801ebddf77aceb80a038dce46608bf4ccae636

7 years agoAdd the 'mksourceid' executable to the clean target for MSVC.
mistachkin [Mon, 4 Sep 2017 18:44:54 +0000 (18:44 +0000)] 
Add the 'mksourceid' executable to the clean target for MSVC.

FossilOrigin-Name: 77854694b2da989aa4dbbdbd3ccf61756c46cc368de9731f5fd1c3aa38d7cad5

7 years agoProposed fix for ticket [b899b6042f97f5]
drh [Mon, 4 Sep 2017 00:33:04 +0000 (00:33 +0000)] 
Proposed fix for ticket [b899b6042f97f5]

FossilOrigin-Name: c7f9f47b239fdd99b555fb0a31eb82b22dbe6c821f1612d67a0d6a822288d9f7

7 years agoFix recent test cases in test/indexepxr2.test so that they work even without
drh [Mon, 4 Sep 2017 00:19:29 +0000 (00:19 +0000)] 
Fix recent test cases in test/indexepxr2.test so that they work even without
SQLITE_ENABLE_STAT4 and SQLITE_ENABLE_JSON1.

FossilOrigin-Name: 03f3cc03aaf233ad663d32a0200bfafee24a6c81f6a0ad14094ff014f880f00f

7 years agoAdd the new sqlite3PagerUnrefPageOne() pager method to deal with the special
drh [Fri, 1 Sep 2017 14:50:19 +0000 (14:50 +0000)] 
Add the new sqlite3PagerUnrefPageOne() pager method to deal with the special
case of unreferencing page1.

FossilOrigin-Name: b2e2100cf766da1cb499aec0ca0a9969d7af5d93312ab8cf895fbf4a6ffb9b2f

7 years agoRemove an obsolete optimization in pcache that due to more recent changes
drh [Fri, 1 Sep 2017 12:57:33 +0000 (12:57 +0000)] 
Remove an obsolete optimization in pcache that due to more recent changes
was recently making the code a little slower.

FossilOrigin-Name: c4e7e175eecfd79015f4fae99618dfce6baf97c21bf3c909ea535d4e12dcaaad

7 years agoSmall size and performance improvement in pcacheManageDirtyList() by not
drh [Fri, 1 Sep 2017 12:18:41 +0000 (12:18 +0000)] 
Small size and performance improvement in pcacheManageDirtyList() by not
zeroing the PgHdr.pDirtyNext and PgHdr.pDirtyPrev pointers for PgHdr objects
that are not on the dirty list.

FossilOrigin-Name: 919863b14859d958d6c078097faae02070c7bd082e2814cf3f84bd84921e4419

7 years agoClarify the documentation about "protected" versus "unprotected" sqlite3_value
drh [Thu, 31 Aug 2017 21:11:52 +0000 (21:11 +0000)] 
Clarify the documentation about "protected" versus "unprotected" sqlite3_value
objects.  No changes to code.

FossilOrigin-Name: 4094a3410e05597d0adc740d161e0358a3041c5a4e73bde35b1e983594c6879a

7 years agoRemove unnecessary "__declspec(dllexport)" qualifiers from generated file
dan [Wed, 30 Aug 2017 13:21:17 +0000 (13:21 +0000)] 
Remove unnecessary "__declspec(dllexport)" qualifiers from generated file
shell.c.

FossilOrigin-Name: bcc20be5b290c563183e82a590cc1fdabadfb13475fd8f6b3d810365cea5d868

7 years agoSmall performance optimization in pcache1.
drh [Wed, 30 Aug 2017 04:44:59 +0000 (04:44 +0000)] 
Small performance optimization in pcache1.

FossilOrigin-Name: ffd437da9541f8a2792e3e07c0a43f388f856fdc211fe42755eb51bfa5995d9f

7 years agoFaster memory allocation from lookaside by not trying to keep track of the
drh [Tue, 29 Aug 2017 20:21:12 +0000 (20:21 +0000)] 
Faster memory allocation from lookaside by not trying to keep track of the
number of outstanding allocations, and rather computing that value only
when requested.

FossilOrigin-Name: a06263f1efd2d45eac88b8d59e8fe8e458670fa3808c795feaa7f247fc36cbe9

7 years agoAdd the --enable-update-limit option to the ./configure script.
drh [Mon, 28 Aug 2017 17:00:12 +0000 (17:00 +0000)] 
Add the --enable-update-limit option to the ./configure script.

FossilOrigin-Name: 64a8ae68381b7fbb29b659901ca7ce8d50510e4753758d5761f7e41539288cef

7 years agoAvoid unnecessary mutexes in the pcache1 implementation in the common case
drh [Mon, 28 Aug 2017 16:11:05 +0000 (16:11 +0000)] 
Avoid unnecessary mutexes in the pcache1 implementation in the common case
where no auxiliary page cache memory is configured.

FossilOrigin-Name: 1ba051e34d7512ab5e8fc969c1b5aaaf827b8e6493ba4235895257aca78b500f

7 years agoRemove the rarely-used scratch memory allocator. This makes the code smaller,
drh [Mon, 28 Aug 2017 15:51:35 +0000 (15:51 +0000)] 
Remove the rarely-used scratch memory allocator.  This makes the code smaller,
faster, and easier to maintain.  In place of the scratch allocator, add the
SQLITE_CONFIG_SMALL_MALLOC configuration option that provides a hint to SQLite
that large memory allocations should be avoided.

FossilOrigin-Name: 54b000246cfb5c7b8adb61a17357ef5a49adddde9e48e8937834d5ba0beb8a6b

7 years agoBackport changes to shell.c into shell.c.in.
drh [Mon, 28 Aug 2017 14:33:27 +0000 (14:33 +0000)] 
Backport changes to shell.c into shell.c.in.

FossilOrigin-Name: 2348045fbc3fc99e2b46095cc86db99815cd1f9254d30a3b72c2b15c02076a84

7 years agoFix the ".dump", ".schema", and ".fullschema" commands of the command-line
drh [Mon, 28 Aug 2017 11:12:57 +0000 (11:12 +0000)] 
Fix the ".dump", ".schema", and ".fullschema" commands of the command-line
shell so that they work even if PRAGMA empty_result_callbacks is enabled.
Fix for ticket [02f0f4c54f281].

FossilOrigin-Name: cf0d3715caac9149e65bb4802fd179d0952cfaf9add17ac243c6ca87cbd6e6b7

7 years agoFix a few over-length source code lines. No functional changes.
drh [Fri, 25 Aug 2017 19:51:51 +0000 (19:51 +0000)] 
Fix a few over-length source code lines.  No functional changes.

FossilOrigin-Name: 1783c54ce9dcb4b2c4f2a66f6d3315e646b71b54a8899fc32a7bf0f935a21f7f

7 years agoSize and performance optimization for sqlite3Init().
drh [Fri, 25 Aug 2017 15:43:34 +0000 (15:43 +0000)] 
Size and performance optimization for sqlite3Init().

FossilOrigin-Name: 776d91284a891bec64d6f649ff17de898b6ac6f66dd3d2afccc394a012a40c7d

7 years agoSmall performance optimization in sqlite3WhereBegin().
drh [Fri, 25 Aug 2017 13:34:18 +0000 (13:34 +0000)] 
Small performance optimization in sqlite3WhereBegin().

FossilOrigin-Name: 39f708d1e286931365a8992dbe7f900108ff1dad146032a284ad1dec09b11e06

7 years agoConvert a branch made unreachable by [59560d07] into an assert().
drh [Fri, 25 Aug 2017 13:02:48 +0000 (13:02 +0000)] 
Convert a branch made unreachable by [59560d07] into an assert().

FossilOrigin-Name: 2738b8db3caa6ce48d27cb5749d27b79241e6f6682b694886f6ef663e5443583

7 years agoImprove the internal mechanism used to keep track of what kind of syncing
drh [Fri, 25 Aug 2017 11:44:51 +0000 (11:44 +0000)] 
Improve the internal mechanism used to keep track of what kind of syncing
to do for WAL transaction commits and checkpoint operations.
Use the checkpoint-style of syncing to sync the header of a new
or restarted WAL file.

FossilOrigin-Name: e8d23afe8478e42779ec1dd602ca2d77d4f3c26c4d54f52112c5aaa928536538

7 years agoAvoid returning duplicate rows in experimental pragmas "pragma_list",
dan [Fri, 25 Aug 2017 09:17:14 +0000 (09:17 +0000)] 
Avoid returning duplicate rows in experimental pragmas "pragma_list",
"module_list" and "function_list".

FossilOrigin-Name: b79cc8dc88c8ae03daff1290fd650b2b0e6f673ec9d83be6a533a57172930190

7 years agoUpdate the mechanism used to keep track of what kind of syncing to do for wal-sync-refactor
drh [Fri, 25 Aug 2017 01:14:43 +0000 (01:14 +0000)] 
Update the mechanism used to keep track of what kind of syncing to do for
WAL transaction commits and checkpoint operations.  Use the checkpoint-style
of syncing to sync the header of a new or restarted WAL file.

FossilOrigin-Name: bf65dae8d4297c57ac63228ccf0100f9fabf2fb600438c9f2e10a29c4b118168

7 years agoFix an incorrect hyperlink in a comment.
drh [Thu, 24 Aug 2017 20:54:42 +0000 (20:54 +0000)] 
Fix an incorrect hyperlink in a comment.

FossilOrigin-Name: 25292b9a4eb5efc7db551da0b3c9cfd7e79da1594ee14729de44090e188c2b2a

7 years agoFixes to documentation about SQLITE_OPEN_URI.
drh [Thu, 24 Aug 2017 15:43:26 +0000 (15:43 +0000)] 
Fixes to documentation about SQLITE_OPEN_URI.

FossilOrigin-Name: 7ec72314d6b66e4969833194fd032f01963bb861a7bb30d060acdb82dc5d62fe

7 years agoMake sure the sqlite3_result_pointer() interface does not leave a VM register
drh [Thu, 24 Aug 2017 13:55:46 +0000 (13:55 +0000)] 
Make sure the sqlite3_result_pointer() interface does not leave a VM register
in an inconsistent state.  Fix for ticket [7486aa54b968e9b5].  Test cases
are in TH3.

FossilOrigin-Name: d2f9230c5c7ad6166e7d2b649f77960fa58b1cb583e529a43882753ab348413c

7 years agoPerformance optimization to pageFindSlot() in the b-tree layer.
drh [Wed, 23 Aug 2017 23:09:03 +0000 (23:09 +0000)] 
Performance optimization to pageFindSlot() in the b-tree layer.

FossilOrigin-Name: 59560d079fab4b91ec50855cc60349da178209c38fb6dae674ff874ccfc7f5fa

7 years agoSize and performance optimization to dropCell() and freeSpace().
drh [Wed, 23 Aug 2017 20:36:06 +0000 (20:36 +0000)] 
Size and performance optimization to dropCell() and freeSpace().

FossilOrigin-Name: bc1ec123ce05c9d16b0942f870381145dc9725764e47806939ff207a73066f4d

7 years agoSmaller and faster implementation of the fillInCell() routine.
drh [Wed, 23 Aug 2017 14:45:59 +0000 (14:45 +0000)] 
Smaller and faster implementation of the fillInCell() routine.

FossilOrigin-Name: 77074990edef6c42bdfe7ccce1affc8ed64a86dde3ad4fa50b60ba0a6d851eea

7 years agoUpdate documentation to make it clear that SQLITE_SOURCE_ID and
drh [Tue, 22 Aug 2017 21:23:02 +0000 (21:23 +0000)] 
Update documentation to make it clear that SQLITE_SOURCE_ID and
sqlite3_sourceid() might changes if the source code is edited.

FossilOrigin-Name: e69c0c8770d3cc2fcdc779c6290caf1575644d457326caa00327b9070251d620

7 years agoLess dramatic changes to the source-id following an edit. Modify the way
drh [Tue, 22 Aug 2017 21:07:03 +0000 (21:07 +0000)] 
Less dramatic changes to the source-id following an edit.  Modify the way
that the amalgamation is constructed to give it the opportunity to detect
changes and modify the source-id.

FossilOrigin-Name: 564c7340a3368501c3da885afde52123ed7f558801f6190cbe6173dfe9704b70

7 years agoModify the SQLITE_SOURCE_ID if the source code has changed in any way since
drh [Tue, 22 Aug 2017 19:54:34 +0000 (19:54 +0000)] 
Modify the SQLITE_SOURCE_ID if the source code has changed in any way since
the previous check-in.

FossilOrigin-Name: 515d6a8377cc1dc76d2e78e242fe256cbeef1c1217ec35367648ddeeb17007ec

7 years agoTrying again to get out-of-tree builds to work correctly. mksourceid
drh [Tue, 22 Aug 2017 19:49:34 +0000 (19:49 +0000)] 
Trying again to get out-of-tree builds to work correctly.

FossilOrigin-Name: a1b3337e949fc431e19a3d977d07a312bb253ab7fec6811c0221abd514985d55

7 years agoAttempting to fix the source-id generator so that it works for out-of-tree
drh [Tue, 22 Aug 2017 19:43:41 +0000 (19:43 +0000)] 
Attempting to fix the source-id generator so that it works for out-of-tree
builds.

FossilOrigin-Name: 5a037ac2da7449be3e26c36910ac5d865d7e74d3c25af0a10578c1f92fe2afea

7 years agoAdd the "mksourceid" program to the build process. That program changes
drh [Tue, 22 Aug 2017 19:19:00 +0000 (19:19 +0000)] 
Add the "mksourceid" program to the build process.  That program changes
the SQLITE_SOURCE_ID if the source tree has been modified in any way.

FossilOrigin-Name: d4c05e04f7e1325a3260808ee17252876f678e78bf0cf6569a18a52ff674bd7a

7 years agoFix error tests in seldom-used compile-time branches of the unix backend.
drh [Tue, 22 Aug 2017 15:21:54 +0000 (15:21 +0000)] 
Fix error tests in seldom-used compile-time branches of the unix backend.

FossilOrigin-Name: 885c2b44a44f8d054014e4079b2cac8279c11d13206d5b5215189ef75b9c5254

7 years agoRemove an unnecessary conditional.
drh [Mon, 21 Aug 2017 02:20:57 +0000 (02:20 +0000)] 
Remove an unnecessary conditional.

FossilOrigin-Name: 56d19f9fd7b01d4ed5c3e7309977b43fedffee168c9760d3e3b7e885790f781e

7 years agoMinor optimization to sqlite3VdbeMemSetStr().
drh [Mon, 21 Aug 2017 02:05:22 +0000 (02:05 +0000)] 
Minor optimization to sqlite3VdbeMemSetStr().

FossilOrigin-Name: 6538ef7b6b56c7a6629a0bb7418910c64c8b2e73af2296a116c073ecf2e0d429

7 years agoSpace and size optimization to the printf implementation.
drh [Sat, 19 Aug 2017 20:38:18 +0000 (20:38 +0000)] 
Space and size optimization to the printf implementation.

FossilOrigin-Name: d01d2cffefd1cdb52b386e4983599534c0fbbe6aebda186db53200e4b2283f0a

7 years agoAnother size and performance optimization to readDbPage(). This time we
drh [Fri, 18 Aug 2017 22:30:20 +0000 (22:30 +0000)] 
Another size and performance optimization to readDbPage().  This time we
eliminate some unnecessary local variables.

FossilOrigin-Name: 745bc8decd18d4dc00589474fd3928a3a9f4156d09e05e6f5b8623de6491795a

7 years agoSize and performance optimization the readDbPage() routine in the pager.
drh [Fri, 18 Aug 2017 21:14:50 +0000 (21:14 +0000)] 
Size and performance optimization the readDbPage() routine in the pager.

FossilOrigin-Name: ca9e1875c3a893321d70a131fc4ffc76d169ad05e0b48b7006f53b6b467db4be

7 years agoFor the unix VFS, avoid an unnecessary stat() system call prior to opening
drh [Fri, 18 Aug 2017 16:09:52 +0000 (16:09 +0000)] 
For the unix VFS, avoid an unnecessary stat() system call prior to opening
any file in the common case where there are no unused file descriptors.

FossilOrigin-Name: 3075cfa07489eaf13cb9a2760e2391e79dd73181fe1730fae7bdcd6ad66d2a1f

7 years agoCombine the OP_CreateTable and OP_CreateIndex opcodes of the bytecode engine
drh [Fri, 18 Aug 2017 14:34:28 +0000 (14:34 +0000)] 
Combine the OP_CreateTable and OP_CreateIndex opcodes of the bytecode engine
into a single OP_CreateBtree opcode.  This simplifies the implementation and
makes the bytecode programs clearer.

FossilOrigin-Name: eb1202b5e43f1f029ad2bdf845509e7f31361e4dc189943e5e2bd4462e2ef3f3

7 years agoOnly use indexes on expressions to optimize ORDER BY and GROUP BY if the
dan [Fri, 18 Aug 2017 08:29:37 +0000 (08:29 +0000)] 
Only use indexes on expressions to optimize ORDER BY and GROUP BY if the
collation sequence matches. Possible fix for [e20dd54a].

FossilOrigin-Name: 37e1900880b70be6802eaf43b0e568fda709a1dd6083d8be11e5a7a7d1fda41a

7 years agoUse the __builtin_clzll() function of gcc to improve the performance and
drh [Thu, 17 Aug 2017 20:53:07 +0000 (20:53 +0000)] 
Use the __builtin_clzll() function of gcc to improve the performance and
reduce the size of the sqlite3LogEst() routine.

FossilOrigin-Name: a42a438cbbd721765ca55e71c464552dbaa494050cf472593599b8c7f0249516

7 years agoSmall optimization in the Expr tree walker.
drh [Thu, 17 Aug 2017 19:23:16 +0000 (19:23 +0000)] 
Small optimization in the Expr tree walker.

FossilOrigin-Name: 264a5e1b75ee073bd019483e289c3d8d79abcf5a765435be23ac3c21b1db8246

7 years agoSize optimization in the authorizer error message generation logic.
drh [Thu, 17 Aug 2017 18:54:27 +0000 (18:54 +0000)] 
Size optimization in the authorizer error message generation logic.

FossilOrigin-Name: 0367a4d58682a64d7ed4c5a4b4377899e22432851587c649d419efb6d7bac250

7 years agoIn sqlite3ViewGetColumnNames(), return the number of errors, not an error code.
drh [Thu, 17 Aug 2017 18:23:46 +0000 (18:23 +0000)] 
In sqlite3ViewGetColumnNames(), return the number of errors, not an error code.

FossilOrigin-Name: f13682ea2350ba366026a4a58e59591af378c496b92da60803c4c642c3bfc8de

7 years agoThe RTREE extension should return SQLITE_CORRUPT_VTAB, not just SQLITE_CORRUPT
drh [Thu, 17 Aug 2017 18:17:24 +0000 (18:17 +0000)] 
The RTREE extension should return SQLITE_CORRUPT_VTAB, not just SQLITE_CORRUPT
when it encounters incorrectly formatted shadow tables.

FossilOrigin-Name: 0712f057ef3dcd907984dda30f6d961a29b61c1d2b25627028c4e227ec85dbba

7 years agoRemove an unnecessary branch from the [be436a7f4587ce517ddc] fix.
drh [Thu, 17 Aug 2017 14:47:56 +0000 (14:47 +0000)] 
Remove an unnecessary branch from the [be436a7f4587ce517ddc] fix.

FossilOrigin-Name: fb6ca99b88c67414eab425e2b4ddb6a5e2fd48a6b2cd96a34627c86a5b568c9b

7 years agoAdd test cases for ticket [be436a7f4587ce517] using virtual table modules fts5
dan [Thu, 17 Aug 2017 14:12:16 +0000 (14:12 +0000)] 
Add test cases for ticket [be436a7f4587ce517] using virtual table modules fts5
and rtree.

FossilOrigin-Name: 2101b4208787d297788e05f2bd82d4a9aff26e2237a7016ac857a52fb5252ce0

7 years agoDefer schema resets when the query planner is running.
drh [Thu, 17 Aug 2017 02:26:35 +0000 (02:26 +0000)] 
Defer schema resets when the query planner is running.
Proposed fix for ticket [be436a7f4587ce517].

FossilOrigin-Name: a7bc7752ba0266684f5317e424a4ee9add4af002272082183519e708ab9ffc79

7 years agoAvoid a test for CURTYPE_BTREE in sqlite3VdbeCursorMoveto() in order to reduce
drh [Wed, 16 Aug 2017 19:20:20 +0000 (19:20 +0000)] 
Avoid a test for CURTYPE_BTREE in sqlite3VdbeCursorMoveto() in order to reduce
the size and improve the performance of OP_Column.

FossilOrigin-Name: f078deb25149b7b1881b7f3374b343d0677e82336d8fdd7f1cdd06d926b5dd57

7 years agoRemove an unnecessary local variable from OP_Column, for a small size
drh [Wed, 16 Aug 2017 14:16:19 +0000 (14:16 +0000)] 
Remove an unnecessary local variable from OP_Column, for a small size
reduction and performance increase.

FossilOrigin-Name: 39543903282409ad3f139f8a0bb376661e7595a33af4f647945b1513a028ccb4

7 years agoPerformance improvement in the OP_Column opcode.
drh [Wed, 16 Aug 2017 11:04:22 +0000 (11:04 +0000)] 
Performance improvement in the OP_Column opcode.

FossilOrigin-Name: dc98a92f32511ee322b0207bd286e967248a8e59b418f11168eb31e34b0fa0fa

7 years agoSmall size and performance in the OP_Column opcode.
drh [Tue, 15 Aug 2017 14:14:36 +0000 (14:14 +0000)] 
Small size and performance in the OP_Column opcode.

FossilOrigin-Name: 2cf3f3de8a48465bd6b0af7763bfe905f3bb0151488f63c9ecc3147bcb345094

7 years agoBtree optimization: New field BtCursor.pPage that points to the current page,
drh [Tue, 15 Aug 2017 03:46:47 +0000 (03:46 +0000)] 
Btree optimization:  New field BtCursor.pPage that points to the current page,
saving a single pointer dereference on each access.

FossilOrigin-Name: 373b71d19cad785922d5a80828f2fee0cbe7dff6594743e625bbdfa31b1ca131

7 years agoMinor size and performance optimization to sqlite3BtreeCloseCursor().
drh [Mon, 14 Aug 2017 23:53:02 +0000 (23:53 +0000)] 
Minor size and performance optimization to sqlite3BtreeCloseCursor().

FossilOrigin-Name: 16969338841734d00ab906a94b82480c7e1e426eb0ddf7b9e6aed722aee5d91f

7 years agoChange the internal btree routine moveToRoot() to return SQLITE_EMPTY if
drh [Mon, 14 Aug 2017 18:13:52 +0000 (18:13 +0000)] 
Change the internal btree routine moveToRoot() to return SQLITE_EMPTY if
the table is empty or if it has pgnoRoot==0.  This simplifies the callers,
making them smaller and faster.  The SQLITE_EMPTY result code is intercepted
and changed into SQLITE_OK before surfacing in an API.

FossilOrigin-Name: 240d57143d943eaddd5f7c2d473f47a1d29417e61d28142f70f3d960bb9b30df

7 years agoFix harmless indentation error.
drh [Mon, 14 Aug 2017 17:03:58 +0000 (17:03 +0000)] 
Fix harmless indentation error.

FossilOrigin-Name: 25e92baaaeb9e8a2650b3083d3febf3661ecf1e05d9d24b26fe9f87a03bdd8fa

7 years agoSometimes a TK_COLUMN Expr node can have Expr.pTab==0 if it is a reference
drh [Mon, 14 Aug 2017 14:53:24 +0000 (14:53 +0000)] 
Sometimes a TK_COLUMN Expr node can have Expr.pTab==0 if it is a reference
to an expression column in an index on and expression.  Fix for ticket
[aa98619ad08ddcab].

FossilOrigin-Name: d0da791ba0edfb65186459345e43500d8364a086a5a1651d828fecc1a1dd1edb

7 years agoProperly dequote column names in tables constructed by an aggregate SELECT.
drh [Mon, 14 Aug 2017 01:33:07 +0000 (01:33 +0000)] 
Properly dequote column names in tables constructed by an aggregate SELECT.

FossilOrigin-Name: 7e0d3e9cb071873564b7916c022aba5cd9f3b8ebab9dba787ecd7113c5b7816a

7 years agoAdd new test file fts5vocab2.test.
dan [Sat, 12 Aug 2017 18:31:31 +0000 (18:31 +0000)] 
Add new test file fts5vocab2.test.

FossilOrigin-Name: 02174842c353bfaa747019cb3dcdee5bca6551d0a06d83fc1ac6d4569e16bc34

7 years agoUpdate the speed-check.sh test script to append log output to the end of the
drh [Sat, 12 Aug 2017 02:16:34 +0000 (02:16 +0000)] 
Update the speed-check.sh test script to append log output to the end of the
cout-NAME.txt file.

FossilOrigin-Name: 14d262d6aa4e281dfe0490988f0c1965c4babf98038a1a96b9bb5772a61521a3

7 years agoRemove the zBase field from the StrAccum object. Resulting code is slightly
drh [Sat, 12 Aug 2017 02:01:55 +0000 (02:01 +0000)] 
Remove the zBase field from the StrAccum object.  Resulting code is slightly
smaller and faster.

FossilOrigin-Name: 6e52fa5fd79988a433bae0152ceae036edab4bb18d2b48ed04c1f53f141728b0

7 years agoSize and performance micro-optimization on sqlite3SrcListIndexedBy().
drh [Sat, 12 Aug 2017 01:09:06 +0000 (01:09 +0000)] 
Size and performance micro-optimization on sqlite3SrcListIndexedBy().

FossilOrigin-Name: 28a5aec118f9d078c9e7225f85cd48a91920b13908c540771e309557c3f15f84

7 years agoFix compiler warnings that arise if the PAGERTRACE macro is turned on.
drh [Fri, 11 Aug 2017 18:59:00 +0000 (18:59 +0000)] 
Fix compiler warnings that arise if the PAGERTRACE macro is turned on.
This changes does not affect production builds.

FossilOrigin-Name: 831156a4bd7c4408085f7c5584cdeebd1953c539972f80c5ef29bc147008630e

7 years agoImproved comments in the header of the LSM1 vtab module. No code changes.
drh [Fri, 11 Aug 2017 18:55:04 +0000 (18:55 +0000)] 
Improved comments in the header of the LSM1 vtab module.  No code changes.

FossilOrigin-Name: aa49926dbffaae4f7c486be72ad814f381cca65c549f9d2605f47540a5f4be84

7 years agoNew test cases for LSM1.
drh [Fri, 11 Aug 2017 13:51:41 +0000 (13:51 +0000)] 
New test cases for LSM1.

FossilOrigin-Name: cb0c49cbd1eede157c5bd60d1e28e02c642aefe1ff82553eac1117a4c73dd9db

7 years agoConvert the LSM1 virtual table to be WITHOUT ROWID and get UPDATE and DELETE
drh [Fri, 11 Aug 2017 12:49:59 +0000 (12:49 +0000)] 
Convert the LSM1 virtual table to be WITHOUT ROWID and get UPDATE and DELETE
operations working on it.

FossilOrigin-Name: 2164031b509dc6eae367ffb9d915f3e1d33d26210506b2de8b2bfca38c53465f

7 years agoSimplification to the like optimization logic. Remove unnecessary branches.
drh [Fri, 11 Aug 2017 03:47:21 +0000 (03:47 +0000)] 
Simplification to the like optimization logic.  Remove unnecessary branches.

FossilOrigin-Name: 9466d952e169a6a60f6e575e679a61f05887b51c693505764edaf10f62cd829f

7 years agoAllow WITHOUT ROWID virtual tables to be writable as long as they have
drh [Thu, 10 Aug 2017 20:43:07 +0000 (20:43 +0000)] 
Allow WITHOUT ROWID virtual tables to be writable as long as they have
exactly one column as their PRIMARY KEY.

FossilOrigin-Name: c601d128ff1f1dd6d221ee9f55595a95b58ba07d043e1d530743ea913731560e

7 years agoAdd the "instance" type to the fts5vocab virtual table module. For direct
dan [Thu, 10 Aug 2017 20:36:56 +0000 (20:36 +0000)] 
Add the "instance" type to the fts5vocab virtual table module. For direct
access to the contents of the fts5 term index.

FossilOrigin-Name: 34a7bd7121a478e14982d59be95ad891fab8050ad5e006638f826c57c392b93e

7 years agoFix a typo in csv01.test introduced by the previous commit. writable-vtab-without-rowid
dan [Thu, 10 Aug 2017 19:12:04 +0000 (19:12 +0000)] 
Fix a typo in csv01.test introduced by the previous commit.

FossilOrigin-Name: f38ff718278c8ff477d1c6379ced32167063de15f0666c8eac2e4dd30cbd975c

7 years agoAdd extra tests to this branch.
dan [Thu, 10 Aug 2017 19:10:23 +0000 (19:10 +0000)] 
Add extra tests to this branch.

FossilOrigin-Name: b0e3b88a792623f7761586d8bfac058ddf939f49944ff0c4376627ff920895db

7 years agoTest case for writing to a WITHOUT ROWID virtual table. The TCLVAR virtual
drh [Thu, 10 Aug 2017 17:53:11 +0000 (17:53 +0000)] 
Test case for writing to a WITHOUT ROWID virtual table.  The TCLVAR virtual
table is modified to add a "fullname" column which is the primary key, and
to accept update operations against the primary key.

FossilOrigin-Name: 6997e00c3221f266f4d9187501d8a9e5bafb85551e88a744cdc8ffe3b75ec2a4

7 years agoExperimental changes that allow a WITHOUT ROWID virtual table to be writable
drh [Thu, 10 Aug 2017 15:19:39 +0000 (15:19 +0000)] 
Experimental changes that allow a WITHOUT ROWID virtual table to be writable
as long as it has only a single-column PRIMARY KEY.

FossilOrigin-Name: ab9ee4c1e64c09c7130e385a23d043d78bad95dff5509c7adc9b992350a4a537

7 years agoAdd a first draft of the "vtablog" extensions that implements a generic
drh [Thu, 10 Aug 2017 03:27:27 +0000 (03:27 +0000)] 
Add a first draft of the "vtablog" extensions that implements a generic
virtual table useful for experimentation using the command-line shell.

FossilOrigin-Name: e49279e65169a939b6058a0960dc1fe09ce4ee2d78992a1969773cbc7ce1043b

7 years agoPreserve the error code from xConnect or xCreate methods in virtual table
drh [Wed, 9 Aug 2017 22:55:09 +0000 (22:55 +0000)] 
Preserve the error code from xConnect or xCreate methods in virtual table
implementations when they are encountered during parsing.

FossilOrigin-Name: dcdf091388251292ff9939bdff920708320bc64dacfe0fa1878c5ffd11b679c9

7 years agoVarious bug fixes for the new LSM1 virtual table design.
drh [Wed, 9 Aug 2017 19:27:24 +0000 (19:27 +0000)] 
Various bug fixes for the new LSM1 virtual table design.

FossilOrigin-Name: 94434a252f0f2b57f325fd8fb82534f20cc1340ff13076cd88deeb47740ef6a2

7 years agoWork toward redesigning the interface to the LSM1 virtual table.
drh [Wed, 9 Aug 2017 18:40:35 +0000 (18:40 +0000)] 
Work toward redesigning the interface to the LSM1 virtual table.

FossilOrigin-Name: 313df946668b943b0a9a9a91fd7bafa7212d05765c7714fa6c0de46aa9062a74

7 years agoThe identifier "vsnprintf" appears to be a reserved word in recent versions
drh [Tue, 8 Aug 2017 21:40:23 +0000 (21:40 +0000)] 
The identifier "vsnprintf" appears to be a reserved word in recent versions
of XCode, so avoid using it as a structure field.

FossilOrigin-Name: 795eede331b832a53e886318466dedc12504f7181c1d7295af7935864a04b72c

7 years agoFix a faulty signed/unsigned character comparison in the LIKE optimization
drh [Tue, 8 Aug 2017 21:30:43 +0000 (21:30 +0000)] 
Fix a faulty signed/unsigned character comparison in the LIKE optimization
logic.

FossilOrigin-Name: f4a4b1497355c1b27d3d0770550fffcc3b2d2d51ab284101f19e8fc4264ee675

7 years agoEnhance the CSV virtual table extension so that it accepts the last row of
drh [Tue, 8 Aug 2017 20:03:10 +0000 (20:03 +0000)] 
Enhance the CSV virtual table extension so that it accepts the last row of
the CSV file even if the last row omits the closing \n, as long as the last
row has a full set of columns.

FossilOrigin-Name: 537e3be2e9503183799afffcd91defc751fea2c779e9b77b77f9485f7de5d170

7 years agoAvoid casting a value larger than 2^31 to a (size_t) or (SIZE_T) on systems
dan [Mon, 7 Aug 2017 19:12:49 +0000 (19:12 +0000)] 
Avoid casting a value larger than 2^31 to a (size_t) or (SIZE_T) on systems
where it is a 32-bit type.

FossilOrigin-Name: b26d7a1c7b5d59a2ceabc3716ccea32e26de729eb164a9c0e47f2d8f6ad3df37

7 years agoOn Windows, avoid casting a value larger than 2^31 to a (SIZE_T) on systems where... mmap-size-limit
mistachkin [Mon, 7 Aug 2017 19:06:54 +0000 (19:06 +0000)] 
On Windows, avoid casting a value larger than 2^31 to a (SIZE_T) on systems where it is a 32-bit type.

FossilOrigin-Name: f08d63b413601b22726e8b96ff8eb779857321b9df30db0333f71e50ffb5077d

7 years agoFix a problem with handling SQLITE_FCNTL_MMAP_SIZE requests with a negative
dan [Mon, 7 Aug 2017 18:54:10 +0000 (18:54 +0000)] 
Fix a problem with handling SQLITE_FCNTL_MMAP_SIZE requests with a negative
parameter in os_unix.c.

FossilOrigin-Name: 4249fcf7b0c0233f9b3ba5139702738d5221c5309240e6e91dc139eff59471fe

7 years agoUpdate bigmmap.test to account for builds that use
dan [Mon, 7 Aug 2017 18:27:19 +0000 (18:27 +0000)] 
Update bigmmap.test to account for builds that use
"-DSQLITE_MAX_MMAP_SIZE=<integer-constant>LL".

FossilOrigin-Name: 7c8b6f1cace42ee1182c252c8e66e5679f523f4248c27d38c075ae21e7c25374

7 years agoAvoid casting a value larger than 2^31 to a (size_t) on systems where it
dan [Mon, 7 Aug 2017 18:13:28 +0000 (18:13 +0000)] 
Avoid casting a value larger than 2^31 to a (size_t) on systems where it
 is a 32-bit type.

FossilOrigin-Name: 46c3085dcad6372ac20eff499e17fe11680fdf4adb9186bf8b12221a5047e485

7 years agoFix an out-of-order test number.
mistachkin [Mon, 7 Aug 2017 17:28:18 +0000 (17:28 +0000)] 
Fix an out-of-order test number.

FossilOrigin-Name: 38f30091f9b1e2c393396da7257f3487fa374e1ee6d610577291909768ff9626