]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
8 years agoThis is an experimental patch that ensures that all cursors have their position savepoint-rollback
drh [Thu, 2 Feb 2017 00:46:55 +0000 (00:46 +0000)] 
This is an experimental patch that ensures that all cursors have their position
saved prior to starting a ROLLBACK TO.

FossilOrigin-Name: 01d97e5b6502b1811b52a681f445e1aaae6c0ee6

8 years agoFix harmless compiler warnings seen with MSVC.
mistachkin [Wed, 1 Feb 2017 23:06:17 +0000 (23:06 +0000)] 
Fix harmless compiler warnings seen with MSVC.

FossilOrigin-Name: 0c66cf0f0a9ada2ddcb8d61001ef791b86226416

8 years agoBackout the change in [02f6293f27] as it causes MSVC to complain.
mistachkin [Wed, 1 Feb 2017 23:03:54 +0000 (23:03 +0000)] 
Backout the change in [02f6293f27] as it causes MSVC to complain.

FossilOrigin-Name: aaae74d06f4865818465cfdb440258ae8a5b985a

8 years agoFix C99-style variable declaration issue seen with older versions of MSVC.
mistachkin [Wed, 1 Feb 2017 22:59:29 +0000 (22:59 +0000)] 
Fix C99-style variable declaration issue seen with older versions of MSVC.

FossilOrigin-Name: 54d285464a222c59327eb6c917c1cc0125a55a27

8 years agoFix harmless compiler warnings seen with MSVC.
mistachkin [Wed, 1 Feb 2017 22:43:08 +0000 (22:43 +0000)] 
Fix harmless compiler warnings seen with MSVC.

FossilOrigin-Name: 997f765bc6706769ae15f3e719354473e02bd78b

8 years agoAdd an option to the MSVC makefile to enable treating warnings as errors.
mistachkin [Wed, 1 Feb 2017 22:32:49 +0000 (22:32 +0000)] 
Add an option to the MSVC makefile to enable treating warnings as errors.

FossilOrigin-Name: 6a378c29b43d61313ca9daa599e59d8eeeed9a27

8 years agoUnwind the RTREE dimension loop inside of rtreeCallbackConstraint().
drh [Wed, 1 Feb 2017 17:08:56 +0000 (17:08 +0000)] 
Unwind the RTREE dimension loop inside of rtreeCallbackConstraint().

FossilOrigin-Name: 4854ea9c18e7d8066c90b41568d0fae97b01ea6d

8 years agoCompletely unroll the dimension loop inside of cellArea() in RTREE.
drh [Wed, 1 Feb 2017 16:41:30 +0000 (16:41 +0000)] 
Completely unroll the dimension loop inside of cellArea() in RTREE.

FossilOrigin-Name: 3c4c0126c287f844220b65e00fec17c059fbb7c8

8 years agoPrecompute the nDim2 value in the Rtree object and use that to make loops
drh [Wed, 1 Feb 2017 15:49:02 +0000 (15:49 +0000)] 
Precompute the nDim2 value in the Rtree object and use that to make loops
over coordinates faster.

FossilOrigin-Name: f1f3c8cc733a05c12dd980f2dfa0ab4ccd76c04b

8 years agoUse compiler intrinsic functions (when available) for byteswapping in RTREE.
drh [Wed, 1 Feb 2017 15:24:32 +0000 (15:24 +0000)] 
Use compiler intrinsic functions (when available) for byteswapping in RTREE.

FossilOrigin-Name: 82fcd54a5941c20895ffc22d8009c1ebdae44eda

8 years agoFix the build by making the OPFLAG_ISNOOP macro available unconditionally.
drh [Wed, 1 Feb 2017 15:19:29 +0000 (15:19 +0000)] 
Fix the build by making the OPFLAG_ISNOOP macro available unconditionally.

FossilOrigin-Name: 510933cb24c5bf883265af3a6075e60a4b5ffa37

8 years agoUpdate the documentation comment in sqlite.h.in for sqlite3_preupdate_hook().
dan [Wed, 1 Feb 2017 14:19:43 +0000 (14:19 +0000)] 
Update the documentation comment in sqlite.h.in for sqlite3_preupdate_hook().

FossilOrigin-Name: 7f8570208c06c056d426e9299d9930181a0464f8

8 years agoChanges so that the pre-update hook and the sessions module work with WITHOUT
dan [Wed, 1 Feb 2017 14:10:24 +0000 (14:10 +0000)] 
Changes so that the pre-update hook and the sessions module work with WITHOUT
ROWID tables.

FossilOrigin-Name: 964bdc27f8f1b1db2e5c0c2a65c8156614cbe087

8 years agoMore RTREE performance optimizations related to decoding values.
drh [Wed, 1 Feb 2017 02:25:28 +0000 (02:25 +0000)] 
More RTREE performance optimizations related to decoding values.

FossilOrigin-Name: c5395e7496d0cd593f5e16ee5f6719d020dc0c66

8 years agoImproved comments on the statGet() implementation in ANALYZE. No changes
drh [Wed, 1 Feb 2017 01:34:15 +0000 (01:34 +0000)] 
Improved comments on the statGet() implementation in ANALYZE.  No changes
to code.

FossilOrigin-Name: 9663eea2a16bb4eec71476d307a3722a768308c3

8 years agoR-TREE optimization: unwrap the coordinate decode loop in
drh [Tue, 31 Jan 2017 21:22:03 +0000 (21:22 +0000)] 
R-TREE optimization: unwrap the coordinate decode loop in
rtreeCallbackConstraint().

FossilOrigin-Name: 0bf7b51896ec441f62490964c7a44a3c75c6b7e2

8 years agoVery small performance improvements and size reductions in
drh [Tue, 31 Jan 2017 19:10:42 +0000 (19:10 +0000)] 
Very small performance improvements and size reductions in
sqlite3VdbeExec() and blobSeekToRow().

FossilOrigin-Name: 85dddf2b453b8afaf1f485b96084d31e22f97dda

8 years agoSimplifications to blobSeekToRow(). micro-optimizations
drh [Tue, 31 Jan 2017 19:02:15 +0000 (19:02 +0000)] 
Simplifications to blobSeekToRow().

FossilOrigin-Name: 495ea824093ff535734c22c3115384c08f855c02

8 years agoAdd a speed-test program for the sessions module. preupdate-without-rowid
dan [Tue, 31 Jan 2017 17:31:30 +0000 (17:31 +0000)] 
Add a speed-test program for the sessions module.

FossilOrigin-Name: 25f1275fe3e940c1d9a7b013cb3744304b2eda1e

8 years agoRemove a C99-style comment. Fixes to the kvtest-speed.sh script.
drh [Tue, 31 Jan 2017 16:49:01 +0000 (16:49 +0000)] 
Remove a C99-style comment.  Fixes to the kvtest-speed.sh script.

FossilOrigin-Name: 91eb6b628e278d20eccc647293e5b30765163e12

8 years agoRemove another unnecessary local variable initialization from sqlite3VdbeExec()
drh [Tue, 31 Jan 2017 16:43:36 +0000 (16:43 +0000)] 
Remove another unnecessary local variable initialization from sqlite3VdbeExec()

FossilOrigin-Name: 2361b03b61311aab9b9ec9de040bbb73be31be0d

8 years agoRemove an unnecessary initialization of the pOp variable in sqlite3VdbeExec().
drh [Tue, 31 Jan 2017 16:34:51 +0000 (16:34 +0000)] 
Remove an unnecessary initialization of the pOp variable in sqlite3VdbeExec().

FossilOrigin-Name: 02f6293f278f7b0a0f4876f5c6a0f4dc42620d79

8 years agoAdd the "stat" command to kvtest.c. Also add the --variance option to the
drh [Tue, 31 Jan 2017 15:29:05 +0000 (15:29 +0000)] 
Add the "stat" command to kvtest.c.  Also add the --variance option to the
"init" command.  Add the tool/kvtest-speed.sh script used for doing
performance testing on key/value access patterns.

FossilOrigin-Name: b63deed600b1a457a6960ebad5645f4de9c56e5d

8 years agoFix a typo in a comment.
drh [Tue, 31 Jan 2017 15:27:04 +0000 (15:27 +0000)] 
Fix a typo in a comment.

FossilOrigin-Name: bd22bf9cbe028e9811ca3afaadafd90312cb0fc9

8 years agoMerge latest trunk with this branch.
dan [Tue, 31 Jan 2017 14:08:04 +0000 (14:08 +0000)] 
Merge latest trunk with this branch.

FossilOrigin-Name: 4a592abbc555fd3b70979b551b00c2ba631253df

8 years agoFurther minor enhancement and size reduction in
drh [Tue, 31 Jan 2017 12:41:48 +0000 (12:41 +0000)] 
Further minor enhancement and size reduction in
sqlite3ExprAssignVarNumber().

FossilOrigin-Name: eacfdcf25796ea29b5e63499c3d7397498305ad9

8 years agoPerformance optimization in sqlite3ExprAssignVarNumber().
drh [Tue, 31 Jan 2017 03:52:34 +0000 (03:52 +0000)] 
Performance optimization in sqlite3ExprAssignVarNumber().

FossilOrigin-Name: 5987ca1ff94ed3c1666f783bb15b16158aa7e1db

8 years agoExperimental change to invoke the preupdate hook when WITHOUT ROWID tables are
dan [Mon, 30 Jan 2017 19:44:53 +0000 (19:44 +0000)] 
Experimental change to invoke the preupdate hook when WITHOUT ROWID tables are
written.

FossilOrigin-Name: 856f8604c59c8fdd9bfb7d86fc0e212f091ab49a

8 years agoFix building with SQLITE_OMIT_FOREIGN_KEY defined.
dan [Mon, 30 Jan 2017 11:38:19 +0000 (11:38 +0000)] 
Fix building with SQLITE_OMIT_FOREIGN_KEY defined.

FossilOrigin-Name: e93d2c49a44af994ff10cc9cc7eafacd5a4f73ab

8 years agoIn the amalgamation, allocate the parser engine object from stack rather than
drh [Sat, 28 Jan 2017 20:46:37 +0000 (20:46 +0000)] 
In the amalgamation, allocate the parser engine object from stack rather than
from heap, for improved performance.  This only happens in the amalgamation,
since otherwise the sqlite3RunParser() routine does not know the object size.

FossilOrigin-Name: 4fe879d4b5da6ae0688a7a99004683a234966597

8 years agoFix a couple comment typos. No changes to code.
mistachkin [Sat, 28 Jan 2017 19:53:51 +0000 (19:53 +0000)] 
Fix a couple comment typos.  No changes to code.

FossilOrigin-Name: 2a2e7d86b275c970726f642a37a098950a3b906e

8 years agoAvoid redundant table b-tree cursor seeks in UPDATE statements that use the
dan [Sat, 28 Jan 2017 19:45:34 +0000 (19:45 +0000)] 
Avoid redundant table b-tree cursor seeks in UPDATE statements that use the
two-pass strategy.

FossilOrigin-Name: dc555b1039c6930f6d15355c698ff917a85e8056

8 years agoUpdates to the sqlite3_blob documentation. No changes to code.
drh [Sat, 28 Jan 2017 15:26:14 +0000 (15:26 +0000)] 
Updates to the sqlite3_blob documentation.  No changes to code.

FossilOrigin-Name: 426b440a5745f9c431c6a3d9ba542af61a6a83fb

8 years agoIn the speed-check.sh script, automatically invoke "fossil test-diff --tk" on
drh [Sat, 28 Jan 2017 13:40:55 +0000 (13:40 +0000)] 
In the speed-check.sh script, automatically invoke "fossil test-diff --tk" on
the cachegrind output against trunk, if not generating a trunk run.

FossilOrigin-Name: aa1ab37100a91ab4bb91d50a1267c26967efcb21

8 years agoFix a typo in the docs for sqlite3_update_hook().
dan [Sat, 28 Jan 2017 06:50:15 +0000 (06:50 +0000)] 
Fix a typo in the docs for sqlite3_update_hook().

FossilOrigin-Name: 7c029655cc3369a1e46741fdd3701d36d420b28b

8 years agoAdd the sha1.c loadable extension that implements the sha1() and sha1_query()
drh [Fri, 27 Jan 2017 19:27:38 +0000 (19:27 +0000)] 
Add the sha1.c loadable extension that implements the sha1() and sha1_query()
SQL functions.

FossilOrigin-Name: 24e77c1cef163a9822635570b3211789ff23d5c9

8 years agoFix a problem causing the pre-update hook to be invoked by DROP TABLE
dan [Fri, 27 Jan 2017 17:02:26 +0000 (17:02 +0000)] 
Fix a problem causing the pre-update hook to be invoked by DROP TABLE
statements.

FossilOrigin-Name: fbb6bf1b69cfd581b4ffd778c344e3fbd9c9406f

8 years agoAlternative ICU fix (compare to check-in [50e60cb4]) that avoids casting
drh [Fri, 27 Jan 2017 13:14:12 +0000 (13:14 +0000)] 
Alternative ICU fix (compare to check-in [50e60cb4]) that avoids casting
integers to pointers.

FossilOrigin-Name: d9752c8f7c55426fd7d2b877c5cc3784f93b5349

8 years agoIn the command-line shell, enhance the ".mode" command so that it restores the
drh [Fri, 27 Jan 2017 01:52:42 +0000 (01:52 +0000)] 
In the command-line shell, enhance the ".mode" command so that it restores the
default column and row separators for modes "line", "list", "column", and
"tcl".

FossilOrigin-Name: 58f02e6eae8fc9e2577fe435b0282fb46af3960d

8 years agoAnother micro-optimization in accessPayload(). Slightly smaller and faster.
drh [Fri, 27 Jan 2017 01:25:00 +0000 (01:25 +0000)] 
Another micro-optimization in accessPayload().  Slightly smaller and faster.

FossilOrigin-Name: c012619b65d70b4ef6cf33532ef57d7f8ba42d74

8 years agoPerformance optimization in accessPayload().
drh [Fri, 27 Jan 2017 01:13:49 +0000 (01:13 +0000)] 
Performance optimization in accessPayload().

FossilOrigin-Name: ebb1fd98d4e448aa6d8f1e5be7ddc5bedb3db95b

8 years agoSimplify the accessPayload() routine so that it always populates the overflow
drh [Fri, 27 Jan 2017 00:31:59 +0000 (00:31 +0000)] 
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

8 years agoRemove an unreachable branch in the error handling logic for
drh [Thu, 26 Jan 2017 21:30:00 +0000 (21:30 +0000)] 
Remove an unreachable branch in the error handling logic for
sqlite3BtreePayloadChecked().

FossilOrigin-Name: 293bf3ed7e40745349c83b202b27ed1b48517e1a

8 years agoImprovement to the OP_Permutation opcode to prevent it from using CPU cycles
drh [Thu, 26 Jan 2017 18:00:00 +0000 (18:00 +0000)] 
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

8 years agoRemove the obsolete lastRowid cache from the sqlite3VdbeExec() for a size
drh [Thu, 26 Jan 2017 17:26:44 +0000 (17:26 +0000)] 
Remove the obsolete lastRowid cache from the sqlite3VdbeExec() for a size
reduction and performance improvement.

FossilOrigin-Name: b4803184652e5f4f823c1521412bc480baeb3dbf

8 years agoPerformance optimization in sqlite3VdbeCloseStatement().
drh [Thu, 26 Jan 2017 17:11:18 +0000 (17:11 +0000)] 
Performance optimization in sqlite3VdbeCloseStatement().

FossilOrigin-Name: 1e96e5ec1ee617cb5b5cbdc5a2ee79c8cc35821d

8 years agoPerformance optimization to sqlite3_blob_read().
drh [Thu, 26 Jan 2017 16:54:47 +0000 (16:54 +0000)] 
Performance optimization to sqlite3_blob_read().

FossilOrigin-Name: 7459f4b7ed4007d9ec44c3bf0fcba04f5f8540a9

8 years agoMinor simplification and performance optimization for Direct Overflow Read.
drh [Thu, 26 Jan 2017 16:27:32 +0000 (16:27 +0000)] 
Minor simplification and performance optimization for Direct Overflow Read.

FossilOrigin-Name: 3e96d6efa867b765c8acf1454014b1e71b2e4f21

8 years agoMake SQLITE_DIRECT_OVERFLOW_READ work for in WAL mode as long as the page
drh [Thu, 26 Jan 2017 02:26:02 +0000 (02:26 +0000)] 
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

8 years agoEnhancements to the kvtest utility program. Add the --jmode option.
drh [Thu, 26 Jan 2017 01:54:39 +0000 (01:54 +0000)] 
Enhancements to the kvtest utility program.  Add the --jmode option.
Improved output formatting.

FossilOrigin-Name: 62a4851ccf88837d1c16dae8204f7f264e80e3c9

8 years agoModify the ICU extension to use a static initializer, as VC++ complains about
drh [Thu, 26 Jan 2017 00:58:27 +0000 (00:58 +0000)] 
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

8 years agoTrim NULL values off the end of records when the SQLITE_ENABLE_TRIM_NULLS
drh [Wed, 25 Jan 2017 20:55:11 +0000 (20:55 +0000)] 
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

8 years agoFix another pre-update hook issue, this time in sqlite3preupdate_old(). trim-nulls
dan [Wed, 25 Jan 2017 18:53:27 +0000 (18:53 +0000)] 
Fix another pre-update hook issue, this time in sqlite3preupdate_old().

FossilOrigin-Name: c7651d21bfdfd9b8cf04b26e0264bc58c03d247f

8 years agoFix a test script problem in exclusive2.test causing it to fail on this
dan [Wed, 25 Jan 2017 18:12:46 +0000 (18:12 +0000)] 
Fix a test script problem in exclusive2.test causing it to fail on this
branch.

FossilOrigin-Name: f66614dc78e32d2d369518200b3322cd97990ffe

8 years agoFix a problem with the pre-update hook on this branch.
dan [Wed, 25 Jan 2017 17:44:13 +0000 (17:44 +0000)] 
Fix a problem with the pre-update hook on this branch.

FossilOrigin-Name: 6fc4fbfa29cfa795edf32e4a1f2d0eceb3007f68

8 years agoExperimental enhancement to automatically trim NULL values from the end of
drh [Wed, 25 Jan 2017 14:58:27 +0000 (14:58 +0000)] 
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

8 years agoEnsure that sqlite3_blob_reopen() correctly handles short rows.
drh [Wed, 25 Jan 2017 14:38:19 +0000 (14:38 +0000)] 
Ensure that sqlite3_blob_reopen() correctly handles short rows.
Fix for ticket [e6e962d6b0f06f46e].

FossilOrigin-Name: 8cd1a4451cce1fe28f462800e2be1dee1735c0d0

8 years agoFix SQLITEINT_H macro usage in two extensions.
drh [Wed, 25 Jan 2017 13:54:27 +0000 (13:54 +0000)] 
Fix SQLITEINT_H macro usage in two extensions.

FossilOrigin-Name: 0803390c152141c9ab4e7a28406b2a5d72a5c2fa

8 years agoEnsure that sqlite3_blob_reopen() correctly handles short rows. blob_reopen-fix
drh [Wed, 25 Jan 2017 04:41:34 +0000 (04:41 +0000)] 
Ensure that sqlite3_blob_reopen() correctly handles short rows.
Proposed fix for ticket [e6e962d6b0f06f46e].  Further testing needed.

FossilOrigin-Name: 57d8dad35c2a9ab635e954dce7f3986ae1ca8ed2

8 years agoDocument the --mmap option in the --help screen for kvtest. Enhance kvtest so
drh [Mon, 23 Jan 2017 19:11:38 +0000 (19:11 +0000)] 
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

8 years agoAdd the --mmap option to the kvtest utility program.
drh [Mon, 23 Jan 2017 18:40:15 +0000 (18:40 +0000)] 
Add the --mmap option to the kvtest utility program.

FossilOrigin-Name: 4948f7e6d2a1cfce36a7aab2f5b65be07c285ac3

8 years agoOptimization: Try to avoid unnecessary btree searching when repositioning
drh [Mon, 23 Jan 2017 16:56:18 +0000 (16:56 +0000)] 
Optimization: Try to avoid unnecessary btree searching when repositioning
a cursor to the next row.

FossilOrigin-Name: ee793d30c1dc1f78f49e6230d17750eceedbd8ed

8 years agoAdd the missing SQLITE_API symbol to test_delete.c (it is not added
dan [Mon, 23 Jan 2017 15:58:09 +0000 (15:58 +0000)] 
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

8 years agoFix a problem preventing FTS5 from correctly passing the FTS5_TOKENIZE_PREFIX
dan [Mon, 23 Jan 2017 07:06:27 +0000 (07:06 +0000)] 
Fix a problem preventing FTS5 from correctly passing the FTS5_TOKENIZE_PREFIX
flag to custom tokenizer implementations.

FossilOrigin-Name: 03c601344ed56b316bcc5fd02f6648b0009ba61b

8 years agoFix an uninitialized variable in the command-line shell.
drh [Sun, 22 Jan 2017 16:34:35 +0000 (16:34 +0000)] 
Fix an uninitialized variable in the command-line shell.

FossilOrigin-Name: 06b8001ade62bc59e6ae20f761167a81d85a4272

8 years agoFixes to documentation comments in the public header file.
mistachkin [Sun, 22 Jan 2017 02:04:05 +0000 (02:04 +0000)] 
Fixes to documentation comments in the public header file.

FossilOrigin-Name: 772dcb08f400f20d4dbfb74df39de78da24ee5fd

8 years agoFix an initialized variable in kvtest.
drh [Sun, 22 Jan 2017 00:11:07 +0000 (00:11 +0000)] 
Fix an initialized variable in kvtest.

FossilOrigin-Name: ed62c5a6562262709128099f757ae60807a930d7

8 years agoA better implementation of the moveto-neighbor optimization that checks for btree-moveto-neighbor
drh [Sat, 21 Jan 2017 21:47:54 +0000 (21:47 +0000)] 
A better implementation of the moveto-neighbor optimization that checks for
nearby rows on adjacent pages.

FossilOrigin-Name: 2c4ecb85a475b9063aa8a3bb517ac181a7ded649

8 years agoB-tree optimization: When seeking on a rowid table that has already been
drh [Sat, 21 Jan 2017 16:54:19 +0000 (16:54 +0000)] 
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

8 years agoChange sqlite3_blob_reopen() to call sqlite3VdbeExec() directly rather than
drh [Sat, 21 Jan 2017 16:27:56 +0000 (16:27 +0000)] 
Change sqlite3_blob_reopen() to call sqlite3VdbeExec() directly rather than
going through sqlite3_step().  Performance enhancement.

FossilOrigin-Name: 347df3c1fd7322e7aacaf1e9f8be81830947c482

8 years agoIn the kvtest.c test utility, reuse the buffer into which blobs are read,
drh [Sat, 21 Jan 2017 15:55:41 +0000 (15:55 +0000)] 
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

8 years agoRemove an unnecessary sqlite3_bind_int64() call from sqlite3_blob_open().
drh [Sat, 21 Jan 2017 14:11:28 +0000 (14:11 +0000)] 
Remove an unnecessary sqlite3_bind_int64() call from sqlite3_blob_open().
Also other minor refactoring of the sqlite3_blob implementation.

FossilOrigin-Name: 9d197a532349f4b1caf66bbed70ca46df86cb86f

8 years agoMinor performance optimization and size reduction to the accessPayload()
drh [Fri, 20 Jan 2017 20:43:14 +0000 (20:43 +0000)] 
Minor performance optimization and size reduction to the accessPayload()
routine in btree.c.

FossilOrigin-Name: 264e5c10d7144910b3223b64546567fa20e4bc65

8 years agoFix a typo in the help message for kvtest.
dan [Fri, 20 Jan 2017 16:47:34 +0000 (16:47 +0000)] 
Fix a typo in the help message for kvtest.

FossilOrigin-Name: 8971d98f25a4f5fb060db8ed6a4b06f083122a50

8 years agoAdd option "--stats" to test program kvtest. Specifying --stats causes kvtest
dan [Fri, 20 Jan 2017 16:46:20 +0000 (16:46 +0000)] 
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

8 years agoGet the "--testset rtree" option working on speedtest1. Add the --rtree,
drh [Fri, 20 Jan 2017 16:09:12 +0000 (16:09 +0000)] 
Get the "--testset rtree" option working on speedtest1.  Add the --rtree,
--lookaside, and --clang options to the speed-check.sh script.

FossilOrigin-Name: 87b640c8d07a76b2bc7e896e01965cc09e06f77b

8 years agoMinor performance optimizations to sqlite3_blob_open() and
drh [Fri, 20 Jan 2017 00:40:26 +0000 (00:40 +0000)] 
Minor performance optimizations to sqlite3_blob_open() and
sqlite3_blob_reopen().

FossilOrigin-Name: 52a61967d920047ea0b4409b79793e05c0128964

8 years agoIf compiled with SQLITE_INLINE_MEMCPY, all memcpy() calls are replaced with
drh [Thu, 19 Jan 2017 21:20:11 +0000 (21:20 +0000)] 
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

8 years agoIn the 'vtshim' extension, avoid accessing freed memory when handling errors from...
mistachkin [Thu, 19 Jan 2017 18:20:36 +0000 (18:20 +0000)] 
In the 'vtshim' extension, avoid accessing freed memory when handling errors from xCreate/xConnect.

FossilOrigin-Name: ffd559afd32dcdce9c733ebccdee88fda9b689cf

8 years agoIn the 'windirent' test module, use a macro for the hidden/system attribute checking.
mistachkin [Wed, 18 Jan 2017 22:47:42 +0000 (22:47 +0000)] 
In the 'windirent' test module, use a macro for the hidden/system attribute checking.

FossilOrigin-Name: a84a08d0716656dc0b26eafb1841c48d83c67ef2

8 years agoRemove superfluous option to Tcl 'lsort' in the vtabH test file.
mistachkin [Wed, 18 Jan 2017 22:19:01 +0000 (22:19 +0000)] 
Remove superfluous option to Tcl 'lsort' in the vtabH test file.

FossilOrigin-Name: b92cc6e58ae31cbe6600a522beb5485f7add04b2

8 years agoMake the vtabH-3.1 test more portable and robust.
mistachkin [Wed, 18 Jan 2017 22:16:34 +0000 (22:16 +0000)] 
Make the vtabH-3.1 test more portable and robust.

FossilOrigin-Name: d3c91c1fb345fbcbfc60a897bebf771c795430c9

8 years agoFix handling of initial hidden and/or system files in the opendir() implementation...
mistachkin [Wed, 18 Jan 2017 22:16:20 +0000 (22:16 +0000)] 
Fix handling of initial hidden and/or system files in the opendir() implementation for Windows.  No changes to non-test code.

FossilOrigin-Name: 26dd42b462dc621b8b0a2295fc91d3e61ac732b6

8 years agoFix a problem that could cause a spurious SQLITE_NOMEM error when attempting
dan [Tue, 17 Jan 2017 10:41:42 +0000 (10:41 +0000)] 
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

8 years agoDisable intrinsic functions for Windows using Clang, due to reports of
drh [Tue, 17 Jan 2017 00:10:58 +0000 (00:10 +0000)] 
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

8 years agoBack out check-in [0b3174e0b1364c] and replace it with a better fix for \ticket ...
drh [Mon, 16 Jan 2017 18:10:17 +0000 (18:10 +0000)] 
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

8 years agoBack out check-in [0b3174e0b1364c] and replace it with a better fix automatic-index-affinity
drh [Mon, 16 Jan 2017 16:43:02 +0000 (16:43 +0000)] 
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

8 years agoAdd test cases for tickets [91e2e8ba6ff2e2] and [7ffd1ca1d2ad4ec].
drh [Mon, 16 Jan 2017 16:01:50 +0000 (16:01 +0000)] 
Add test cases for tickets [91e2e8ba6ff2e2] and [7ffd1ca1d2ad4ec].

FossilOrigin-Name: 9d0dfe0b088a5917afa06207ca3ac5618e3da82f

8 years agoFix a problem preventing resumption of RBU operations after recovering from a
dan [Fri, 13 Jan 2017 18:24:37 +0000 (18:24 +0000)] 
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

8 years agoFix the build for SQLITE_ENABLE_MEMORY_MANAGEMENT.
drh [Fri, 13 Jan 2017 12:53:35 +0000 (12:53 +0000)] 
Fix the build for SQLITE_ENABLE_MEMORY_MANAGEMENT.

FossilOrigin-Name: 8c85b8fdd7f0ba65fba83361d361a567b797a184

8 years agoRemove a branch that is probably unreachable, and which adds no value.
drh [Thu, 12 Jan 2017 19:10:55 +0000 (19:10 +0000)] 
Remove a branch that is probably unreachable, and which adds no value.

FossilOrigin-Name: 9acc72381ccd5e36f3ffdf7e7fbefc5a15701eb4

8 years agoFix harmless compiler warnings in the UPDATE code generator.
drh [Thu, 12 Jan 2017 16:21:54 +0000 (16:21 +0000)] 
Fix harmless compiler warnings in the UPDATE code generator.

FossilOrigin-Name: 385db266673abaf7013ffad09b28014c246547ef

8 years agoRemove an unnecessary corruption test from the btree balancer. If corruption
drh [Thu, 12 Jan 2017 16:14:33 +0000 (16:14 +0000)] 
Remove an unnecessary corruption test from the btree balancer.  If corruption
is present, it will be found harmlessly by later tests.

FossilOrigin-Name: bddf39562d08e259c43dd59b82afb62fe0eb2eef

8 years agoImproved detection of cells that extend into the reserved space at the end
drh [Thu, 12 Jan 2017 15:11:03 +0000 (15:11 +0000)] 
Improved detection of cells that extend into the reserved space at the end
of the page while adjusting overflow page pointers during autovacuum.

FossilOrigin-Name: 8097712c9c1f4ea16bc5dd462da248ef98896061

8 years agoRemove invalid test case from cursorhints2.test
drh [Thu, 12 Jan 2017 11:52:47 +0000 (11:52 +0000)] 
Remove invalid test case from cursorhints2.test

FossilOrigin-Name: 163cc1b2f7100827d5803b81dcd97a1417744f66

8 years agoMake sure Tcl_AppendResult() always has a NULL-pointer argument at the end.
drh [Thu, 12 Jan 2017 11:50:08 +0000 (11:50 +0000)] 
Make sure Tcl_AppendResult() always has a NULL-pointer argument at the end.

FossilOrigin-Name: c07aef6f909fe35de110f0b180dbf5aa4c226af3

8 years agoChanges to allow some multi-row UPDATE statements to avoid the two-pass
dan [Wed, 11 Jan 2017 21:03:53 +0000 (21:03 +0000)] 
Changes to allow some multi-row UPDATE statements to avoid the two-pass
approach.

FossilOrigin-Name: 7ae6104a3e0d1d2cacfe2be732f0220a53908132

8 years agoFix a problem causing the pre-update hook to be passed an incorrect rowid onepass-update
dan [Wed, 11 Jan 2017 20:10:30 +0000 (20:10 +0000)] 
Fix a problem causing the pre-update hook to be passed an incorrect rowid
value in some single-pass multi-row updates.

FossilOrigin-Name: 62257eb53c13d4c7ed128d5d89f6f10d4aff945c

8 years agoFix a problem with single-pass multi-row UPDATE statements that invoke REPLACE
dan [Wed, 11 Jan 2017 19:03:08 +0000 (19:03 +0000)] 
Fix a problem with single-pass multi-row UPDATE statements that invoke REPLACE
conflict handling.

FossilOrigin-Name: 0a2b8e1b9dc600b5a93622e8eea6218649df5e0f

8 years agoFix a problem preventing UPDATE statements that use a range-scan on the PK
dan [Wed, 11 Jan 2017 15:42:14 +0000 (15:42 +0000)] 
Fix a problem preventing UPDATE statements that use a range-scan on the PK
index of a WITHOUT ROWID table from using a one-pass strategy.

FossilOrigin-Name: cab86c90945126c24c40cf2dedd053a8c46d00d6