Commit Graph

17351 Commits

Author SHA1 Message Date
drh
cdf360a0d5 Performance optimization in accessPayload().
FossilOrigin-Name: ebb1fd98d4e448aa6d8f1e5be7ddc5bedb3db95b
2017-01-27 01:13:49 +00:00
drh
42e28f12a3 Simplify the accessPayload() routine so that it always populates the overflow
page cache.  In the one case where populating the page cache can lead to 
problems, simply invalidate the cache as soon as accessPayload() returns.  
This simplification reduces code size and helps accessPayload() to run a 
little faster.  This backs out the eOp==2 mode of accessPayload() added by 
check-in [da59198505].

FossilOrigin-Name: 68e7a8c6765649195ef1ad9407d87d44a307b462
2017-01-27 00:31:59 +00:00
drh
945b094632 Remove an unreachable branch in the error handling logic for
sqlite3BtreePayloadChecked().

FossilOrigin-Name: 293bf3ed7e40745349c83b202b27ed1b48517e1a
2017-01-26 21:30:00 +00:00
drh
b7dab70a92 Improvement to the OP_Permutation opcode to prevent it from using CPU cycles
for initialization in prepared statements that do not use that opcode.

FossilOrigin-Name: b4a98f65564a0d9fba2fef95ebd00a39b3e1e572
2017-01-26 18:00:00 +00:00
drh
fae58d51ce Remove the obsolete lastRowid cache from the sqlite3VdbeExec() for a size
reduction and performance improvement.

FossilOrigin-Name: b4803184652e5f4f823c1521412bc480baeb3dbf
2017-01-26 17:26:44 +00:00
drh
d08406477a Performance optimization in sqlite3VdbeCloseStatement().
FossilOrigin-Name: 1e96e5ec1ee617cb5b5cbdc5a2ee79c8cc35821d
2017-01-26 17:11:18 +00:00
drh
83ec2761fa Performance optimization to sqlite3_blob_read().
FossilOrigin-Name: 7459f4b7ed4007d9ec44c3bf0fcba04f5f8540a9
2017-01-26 16:54:47 +00:00
drh
8bb9fd3b45 Minor simplification and performance optimization for Direct Overflow Read.
FossilOrigin-Name: 3e96d6efa867b765c8acf1454014b1e71b2e4f21
2017-01-26 16:27:32 +00:00
drh
d930b5cb06 Make SQLITE_DIRECT_OVERFLOW_READ work for in WAL mode as long as the page
being read is not in the the -wal file.

FossilOrigin-Name: 9879be1899adf5634f551a2077b15ccb1133e4e3
2017-01-26 02:26:02 +00:00
drh
2b15f6e11b Enhancements to the kvtest utility program. Add the --jmode option.
Improved output formatting.

FossilOrigin-Name: 62a4851ccf88837d1c16dae8204f7f264e80e3c9
2017-01-26 01:54:39 +00:00
drh
87f500ce43 Modify the ICU extension to use a static initializer, as VC++ complains about
a dynamic initialization.  Maybe the dynamic structure initialization is a
GCC extension.

FossilOrigin-Name: 50e60cb44fd3687dde5551d02bad60c323beaabc
2017-01-26 00:58:27 +00:00
drh
d447dced96 Trim NULL values off the end of records when the SQLITE_ENABLE_TRIM_NULLS
compile-time option is used.  Increase the size of the P5 operand to 16 bits.
Fix a problem with short records in the sessions extension.

FossilOrigin-Name: 4801bd59a01dcc11a3eb9e776e7599b36f162d2a
2017-01-25 20:55:11 +00:00
dan
7271d7a19c Fix another pre-update hook issue, this time in sqlite3preupdate_old().
FossilOrigin-Name: c7651d21bfdfd9b8cf04b26e0264bc58c03d247f
2017-01-25 18:53:27 +00:00
dan
d47e1ccb57 Fix a test script problem in exclusive2.test causing it to fail on this
branch.

FossilOrigin-Name: f66614dc78e32d2d369518200b3322cd97990ffe
2017-01-25 18:12:46 +00:00
dan
2a86c1962c Fix a problem with the pre-update hook on this branch.
FossilOrigin-Name: 6fc4fbfa29cfa795edf32e4a1f2d0eceb3007f68
2017-01-25 17:44:13 +00:00
drh
585ce1923c Experimental enhancement to automatically trim NULL values from the end of
records, for a reduced disk footprint.  This change also involves increasing
the P5 operand from 8 to 16 bits.

FossilOrigin-Name: 118ded403b95050b74ae2b03919c43d614094a32
2017-01-25 14:58:27 +00:00
drh
7888d14caa Ensure that sqlite3_blob_reopen() correctly handles short rows.
Fix for ticket [e6e962d6b0f06f46e].

FossilOrigin-Name: 8cd1a4451cce1fe28f462800e2be1dee1735c0d0
2017-01-25 14:38:19 +00:00
drh
666d34c791 Fix SQLITEINT_H macro usage in two extensions.
FossilOrigin-Name: 0803390c152141c9ab4e7a28406b2a5d72a5c2fa
2017-01-25 13:54:27 +00:00
drh
210b0d0eb3 Ensure that sqlite3_blob_reopen() correctly handles short rows.
Proposed fix for ticket [e6e962d6b0f06f46e].  Further testing needed.

FossilOrigin-Name: 57d8dad35c2a9ab635e954dce7f3986ae1ca8ed2
2017-01-25 04:41:34 +00:00
drh
d1b2566b07 Document the --mmap option in the --help screen for kvtest. Enhance kvtest so
that numeric arguments can have suffixes like "K" or "M".  Add kvtest to the
unix makefiles.

FossilOrigin-Name: 175bda87288c7ce15b163316159f53a60822ccad
2017-01-23 19:11:38 +00:00
drh
bace324082 Add the --mmap option to the kvtest utility program.
FossilOrigin-Name: 4948f7e6d2a1cfce36a7aab2f5b65be07c285ac3
2017-01-23 18:40:15 +00:00
drh
6aabff38e9 Optimization: Try to avoid unnecessary btree searching when repositioning
a cursor to the next row.

FossilOrigin-Name: ee793d30c1dc1f78f49e6230d17750eceedbd8ed
2017-01-23 16:56:18 +00:00
dan
65c4c0b02d Add the missing SQLITE_API symbol to test_delete.c (it is not added
automatically as this file is not part of the amalgamation).

FossilOrigin-Name: 7a4f512ddf9e7e718389c80930d6268ab598459c
2017-01-23 15:58:09 +00:00
dan
1b9fd2651b Fix a problem preventing FTS5 from correctly passing the FTS5_TOKENIZE_PREFIX
flag to custom tokenizer implementations.

FossilOrigin-Name: 03c601344ed56b316bcc5fd02f6648b0009ba61b
2017-01-23 07:06:27 +00:00
drh
38305ab55f Fix an uninitialized variable in the command-line shell.
FossilOrigin-Name: 06b8001ade62bc59e6ae20f761167a81d85a4272
2017-01-22 16:34:35 +00:00
mistachkin
35f30d3398 Fixes to documentation comments in the public header file.
FossilOrigin-Name: 772dcb08f400f20d4dbfb74df39de78da24ee5fd
2017-01-22 02:04:05 +00:00
drh
eacb4412b1 Fix an initialized variable in kvtest.
FossilOrigin-Name: ed62c5a6562262709128099f757ae60807a930d7
2017-01-22 00:11:07 +00:00
drh
7f11afaba1 A better implementation of the moveto-neighbor optimization that checks for
nearby rows on adjacent pages.

FossilOrigin-Name: 2c4ecb85a475b9063aa8a3bb517ac181a7ded649
2017-01-21 21:47:54 +00:00
drh
451e76d5b5 B-tree optimization: When seeking on a rowid table that has already been
positioned, check to see if the new row happens to be the next row on the
same leaf page.  That is a reasonably common case, and if it is true it
avoids a full binary search.

FossilOrigin-Name: 8e5cfb2039126da7689c4b1c88760f10e1234eaf
2017-01-21 16:54:19 +00:00
drh
3b2936fada Change sqlite3_blob_reopen() to call sqlite3VdbeExec() directly rather than
going through sqlite3_step().  Performance enhancement.

FossilOrigin-Name: 347df3c1fd7322e7aacaf1e9f8be81830947c482
2017-01-21 16:27:56 +00:00
drh
184d902db1 In the kvtest.c test utility, reuse the buffer into which blobs are read,
rather than reallocating it for each row.  This is a closer match to how
other test programs work, and thus provides a better comparison.

FossilOrigin-Name: 0d1ad13a296b22d6fe36879b56f99bd6af1acd3a
2017-01-21 15:55:41 +00:00
drh
36cae856ee Remove an unnecessary sqlite3_bind_int64() call from sqlite3_blob_open().
Also other minor refactoring of the sqlite3_blob implementation.

FossilOrigin-Name: 9d197a532349f4b1caf66bbed70ca46df86cb86f
2017-01-21 14:11:28 +00:00
drh
cd64553015 Minor performance optimization and size reduction to the accessPayload()
routine in btree.c.

FossilOrigin-Name: 264e5c10d7144910b3223b64546567fa20e4bc65
2017-01-20 20:43:14 +00:00
dan
dfd0de82f1 Fix a typo in the help message for kvtest.
FossilOrigin-Name: 8971d98f25a4f5fb060db8ed6a4b06f083122a50
2017-01-20 16:47:34 +00:00
dan
befcd8ad84 Add option "--stats" to test program kvtest. Specifying --stats causes kvtest
to output information similar to the shell tool option of the same name.

FossilOrigin-Name: 90291327fc127671d9847a4a2ce1ed47a408cfc6
2017-01-20 16:46:20 +00:00
drh
508286701a Get the "--testset rtree" option working on speedtest1. Add the --rtree,
--lookaside, and --clang options to the speed-check.sh script.

FossilOrigin-Name: 87b640c8d07a76b2bc7e896e01965cc09e06f77b
2017-01-20 16:09:12 +00:00
drh
4df65fc20f Minor performance optimizations to sqlite3_blob_open() and
sqlite3_blob_reopen().

FossilOrigin-Name: 52a61967d920047ea0b4409b79793e05c0128964
2017-01-20 00:40:26 +00:00
drh
8674e49214 If compiled with SQLITE_INLINE_MEMCPY, all memcpy() calls are replaced with
in-line code.  With that change, cachegrind shows which memcpy() calls
are taking the most time.  This is a performance-measurement hack only and
is not for production use.

FossilOrigin-Name: 9ed38521617136223a667988aed40e25797faf84
2017-01-19 21:20:11 +00:00
mistachkin
2f31d02049 In the 'vtshim' extension, avoid accessing freed memory when handling errors from xCreate/xConnect.
FossilOrigin-Name: ffd559afd32dcdce9c733ebccdee88fda9b689cf
2017-01-19 18:20:36 +00:00
mistachkin
aac853bae8 In the 'windirent' test module, use a macro for the hidden/system attribute checking.
FossilOrigin-Name: a84a08d0716656dc0b26eafb1841c48d83c67ef2
2017-01-18 22:47:42 +00:00
mistachkin
d3e73d6c1c Remove superfluous option to Tcl 'lsort' in the vtabH test file.
FossilOrigin-Name: b92cc6e58ae31cbe6600a522beb5485f7add04b2
2017-01-18 22:19:01 +00:00
mistachkin
7059138a08 Make the vtabH-3.1 test more portable and robust.
FossilOrigin-Name: d3c91c1fb345fbcbfc60a897bebf771c795430c9
2017-01-18 22:16:34 +00:00
mistachkin
8a9e83583b Fix handling of initial hidden and/or system files in the opendir() implementation for Windows. No changes to non-test code.
FossilOrigin-Name: 26dd42b462dc621b8b0a2295fc91d3e61ac732b6
2017-01-18 22:16:20 +00:00
dan
25fd2e247b Fix a problem that could cause a spurious SQLITE_NOMEM error when attempting
to resume an RBU operation if the previous client failed right after
completing the incremental checkpoint. Also a "cannot vacuum wal db" error
that could occur when resuming an RBU vacuum if an error (OOM or IO error)
occurs during the incremental checkpoint.

FossilOrigin-Name: 681d96eb822e606da53700867191d4738bda20c8
2017-01-17 10:41:42 +00:00
drh
c711f53f30 Disable intrinsic functions for Windows using Clang, due to reports of
linkage errors.  This causes a 0.6% performance reduction.  We will want to
revisit this change in the future.

FossilOrigin-Name: 7fd560c6d2ff470b755ad118287a0a8825b3009e
2017-01-17 00:10:58 +00:00
drh
de48a3f98a Back out check-in [0b3174e0b1364c] and replace it with a better fix for \ticket [91e2e8ba6ff2e2] - a fix that does not cause the problem identified by
ticket [7ffd1ca1d2ad4ec]. Add new test cases for both tickets.

FossilOrigin-Name: 9b64af7b5201a8700ae9e384b04714ca18df7449
2017-01-16 18:10:17 +00:00
drh
da060052e3 Back out check-in [0b3174e0b1364c] and replace it with a better fix
for ticket [91e2e8ba6ff2e2] - a fix that does not cause the problem
identified by ticket [7ffd1ca1d2ad4ec].

FossilOrigin-Name: 0613665274346917f5482f9210bf0c60a0fed7d9
2017-01-16 16:43:02 +00:00
drh
ce31643fd9 Add test cases for tickets [91e2e8ba6ff2e2] and [7ffd1ca1d2ad4ec].
FossilOrigin-Name: 9d0dfe0b088a5917afa06207ca3ac5618e3da82f
2017-01-16 16:01:50 +00:00
dan
ef2f5925d8 Fix a problem preventing resumption of RBU operations after recovering from a
process or system failure that occurs during the incremental-checkpoint phase.

FossilOrigin-Name: 97914266cb4ec63b0c9185ab139673139bd2f0ed
2017-01-13 18:24:37 +00:00
drh
be7a0cee4e Fix the build for SQLITE_ENABLE_MEMORY_MANAGEMENT.
FossilOrigin-Name: 8c85b8fdd7f0ba65fba83361d361a567b797a184
2017-01-13 12:53:35 +00:00