]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
11 years agoMake sure one-pass DELETE for WITHOUT ROWID tables correctly positions the optimize-delete
drh [Sun, 17 Nov 2013 02:42:02 +0000 (02:42 +0000)] 
Make sure one-pass DELETE for WITHOUT ROWID tables correctly positions the
PRIMARY KEY cursor.  Make the same fix for UPDATE.

FossilOrigin-Name: 6bd5750b7d5da221b0689f6df6be5ed0dce61bec

11 years agoFix a couple of minor problems with the new delete logic.
drh [Sat, 16 Nov 2013 23:16:31 +0000 (23:16 +0000)] 
Fix a couple of minor problems with the new delete logic.

FossilOrigin-Name: a11243f840d35aaed8ee3b9901c3950bc584a417

11 years agoFix an OOM-recovery problem in the DELETE code generator.
drh [Sat, 16 Nov 2013 23:03:06 +0000 (23:03 +0000)] 
Fix an OOM-recovery problem in the DELETE code generator.

FossilOrigin-Name: dc7be158b82ab9156d0fcdf3394f881eac4d23c3

11 years agoCombine the rowid and WITHOUT ROWID paths for DELETE into a single path.
drh [Sat, 16 Nov 2013 22:48:52 +0000 (22:48 +0000)] 
Combine the rowid and WITHOUT ROWID paths for DELETE into a single path.

FossilOrigin-Name: c4734b881a64a9d21d03a14e901785797577fbd8

11 years agoThe one-pass optimization is now working for DELETE on WITHOUT ROWID tables.
drh [Sat, 16 Nov 2013 20:45:01 +0000 (20:45 +0000)] 
The one-pass optimization is now working for DELETE on WITHOUT ROWID tables.

FossilOrigin-Name: e4d220a381388f900a95d1b656a82f14c837f92e

11 years agoEnhance the DELETE logic so that it can make use of WHERE_ONEPASS_DESIRED
drh [Sat, 16 Nov 2013 20:13:39 +0000 (20:13 +0000)] 
Enhance the DELETE logic so that it can make use of WHERE_ONEPASS_DESIRED
for rowid tables.

FossilOrigin-Name: 8f479a72758ab6fedb171ada612b1963143c32fa

11 years agoFully constraint the ORDER BY on the top-10 line of the --summary output
drh [Sat, 16 Nov 2013 15:35:18 +0000 (15:35 +0000)] 
Fully constraint the ORDER BY on the top-10 line of the --summary output
from the wordcount test program.  Add the run-wordcount.bash script for
running wordcount in various configurations.

FossilOrigin-Name: 7edf39eb93a8f9059a788f5fccf41c2be40afd4d

11 years agoAvoid unnecessary OP_IfNull checks when doing a range query where there
drh [Sat, 16 Nov 2013 14:03:53 +0000 (14:03 +0000)] 
Avoid unnecessary OP_IfNull checks when doing a range query where there
is a constraint on the lower bound of the range.

FossilOrigin-Name: de08a7e7abbad9b94d0268d096ef4555d31c8b0c

11 years agoSimplification and performance improvement to the logic that factors
drh [Sat, 16 Nov 2013 13:55:34 +0000 (13:55 +0000)] 
Simplification and performance improvement to the logic that factors
constant expressions ouf of inner loops.

FossilOrigin-Name: ee9353fdf3c8f19cd3c344ea8fb7c6d13cadd632

11 years agoFix testcase misc7-16 so that it works with the new UNIQUE constraint error
drh [Sat, 16 Nov 2013 12:56:46 +0000 (12:56 +0000)] 
Fix testcase misc7-16 so that it works with the new UNIQUE constraint error
message format.

FossilOrigin-Name: c7f2ed9f44be3b66a542ee42c0db63bab8ffd2db

11 years agoAdd ALWAYS and NEVER macros to currently unreachable but important branches in expr-codegen-enhancement
drh [Fri, 15 Nov 2013 20:06:26 +0000 (20:06 +0000)] 
Add ALWAYS and NEVER macros to currently unreachable but important branches in
sqlite3ExprCompare().

FossilOrigin-Name: cee835fe902e46f283257fb8ec9d9744c7d6dd77

11 years agoMerge the operator comment fixes from trunk.
drh [Fri, 15 Nov 2013 19:00:20 +0000 (19:00 +0000)] 
Merge the operator comment fixes from trunk.

FossilOrigin-Name: 9f14f55c8ab77e73dbffb7a9c99422bef14cc17a

11 years agoFix comments on the OP_Divide and OP_Remainder operators, especially the
drh [Fri, 15 Nov 2013 18:58:37 +0000 (18:58 +0000)] 
Fix comments on the OP_Divide and OP_Remainder operators, especially the
"Synopsis:" comment, so that they agree with the actual implementation.

FossilOrigin-Name: cc17f1f05f15e9c62659a49c0656ff2b667bf701

11 years agoChanges to make the new constant expression factoring logic more general
drh [Fri, 15 Nov 2013 18:15:19 +0000 (18:15 +0000)] 
Changes to make the new constant expression factoring logic more general
and more testable.

FossilOrigin-Name: d10fb49a92f5f6e93093ae83544e5aec7984361a

11 years agoAdd test cases for INSERT INTO ... DEFAULT VALUES on tables with numeric
drh [Fri, 15 Nov 2013 16:48:23 +0000 (16:48 +0000)] 
Add test cases for INSERT INTO ... DEFAULT VALUES on tables with numeric
constants in CHECK constraints.

FossilOrigin-Name: 79ec485b548fcfc508c4d5fa32ed0604e1b0c5d9

11 years agoImprovements to the Expr comparison routine to make it more general.
drh [Fri, 15 Nov 2013 15:52:39 +0000 (15:52 +0000)] 
Improvements to the Expr comparison routine to make it more general.
Improvements to unary-minus code generation so that it can make use of
a global constant register with a zero value.

FossilOrigin-Name: 835be656bb0e83c8108104869166aa9dd850d265

11 years agoAdd the --query option to the wordcount test program.
drh [Fri, 15 Nov 2013 13:12:30 +0000 (13:12 +0000)] 
Add the --query option to the wordcount test program.

FossilOrigin-Name: 5960d11eba4fc6ca136331279689424d03bd6e76

11 years agoSimplify the range scan code generate while also avoiding an unnecessary
drh [Fri, 15 Nov 2013 12:41:01 +0000 (12:41 +0000)] 
Simplify the range scan code generate while also avoiding an unnecessary
OP_Affinity opcode.

FossilOrigin-Name: 372686bfbb1da08b04bddb085e30da5dbc8b30d8

11 years agoMerge EXPLAIN fixes from trunk.
drh [Fri, 15 Nov 2013 03:30:07 +0000 (03:30 +0000)] 
Merge EXPLAIN fixes from trunk.

FossilOrigin-Name: cd579727b107a07140b94f5839d193959d29e6db

11 years agoFix a typo in the "synopsis" for the OP_Lt opcode that causes an
drh [Fri, 15 Nov 2013 03:21:43 +0000 (03:21 +0000)] 
Fix a typo in the "synopsis" for the OP_Lt opcode that causes an
incorrect comment to be added to EXPLAIN output.

FossilOrigin-Name: d99a30a25d6102c389f1fb5ec389c137168615e9

11 years agoAnother adjustment to the EXPLAIN indentation logic, in order to deal with
drh [Fri, 15 Nov 2013 03:16:34 +0000 (03:16 +0000)] 
Another adjustment to the EXPLAIN indentation logic, in order to deal with
the sorter loop on a CREATE INDEX statement.

FossilOrigin-Name: cbe85cc2a991d89a6cca391ffa1be0582a684e49

11 years agoRework the logic that factors constant expressions out of inner loops, making
drh [Fri, 15 Nov 2013 01:10:18 +0000 (01:10 +0000)] 
Rework the logic that factors constant expressions out of inner loops, making
it both simpler and faster.

FossilOrigin-Name: 8dc5c76c766828d7c28090bec30ff48227e7b140

11 years agoAdjust the command-line shell EXPLAIN indentation logic to handle the
drh [Thu, 14 Nov 2013 23:59:33 +0000 (23:59 +0000)] 
Adjust the command-line shell EXPLAIN indentation logic to handle the
second loop of an UPDATE that reads out a RowSet.

FossilOrigin-Name: ea141a9b87dbb5fa1402bf7f6e36e89cc9de3cb3

11 years agoRemove an unused local variable.
drh [Thu, 14 Nov 2013 19:34:10 +0000 (19:34 +0000)] 
Remove an unused local variable.

FossilOrigin-Name: 10d59226382adcb8016fc2d927e5a0c0b36f3980

11 years agoSimplification to the progress callback check. On branch removed.
drh [Thu, 14 Nov 2013 00:09:48 +0000 (00:09 +0000)] 
Simplification to the progress callback check. On branch removed.

FossilOrigin-Name: 24ef16548eebcdb9d8b40308f6a16dabf8f8d474

11 years agoMake sure the progress callback is invoked prior to an SQLITE_ROW return if
drh [Wed, 13 Nov 2013 23:48:46 +0000 (23:48 +0000)] 
Make sure the progress callback is invoked prior to an SQLITE_ROW return if
it is overdue to be called.

FossilOrigin-Name: 21f59b04f74738d08ebad693646bbaea24dc45ef

11 years agoMerge the skip-scan enhancement into trunk.
drh [Wed, 13 Nov 2013 20:46:11 +0000 (20:46 +0000)] 
Merge the skip-scan enhancement into trunk.

FossilOrigin-Name: b0bb975c0986fe01f1184c1d4888fe397174ad0f

11 years agoImport the "PRAGMA vdbe_eqp" enhancement and the enhanced EXPLAIN formatting skip-scan
drh [Wed, 13 Nov 2013 19:01:41 +0000 (19:01 +0000)] 
Import the "PRAGMA vdbe_eqp" enhancement and the enhanced EXPLAIN formatting
the shell from trunk.  Fix a bug in skip-scan and add a test case to prevent
a regression.

FossilOrigin-Name: f668616a29686f3ce532731c534b168e536adbb5

11 years agoIn the shell tool, if an "EXPLAIN" command is executed in ".explain on" mode, attempt...
dan [Wed, 13 Nov 2013 18:35:01 +0000 (18:35 +0000)] 
In the shell tool, if an "EXPLAIN" command is executed in ".explain on" mode, attempt to automatically indent the bodies of loops in the output VDBE program.

FossilOrigin-Name: e7d34ec6814ed4606a6d5d7f68c218ae4d25e666

11 years agoAdd the "PRAGMA vdbe_eqp" command, only available with SQLITE_DEBUG. Simplify
drh [Wed, 13 Nov 2013 17:58:23 +0000 (17:58 +0000)] 
Add the "PRAGMA vdbe_eqp" command, only available with SQLITE_DEBUG.  Simplify
some of the other debugging logic.

FossilOrigin-Name: 8ce33f4c818e1c785a1c176f6f631b8184e1166b

11 years agoAdd VDBE comments to the beginning and end of skip-scan loops.
drh [Wed, 13 Nov 2013 17:24:38 +0000 (17:24 +0000)] 
Add VDBE comments to the beginning and end of skip-scan loops.

FossilOrigin-Name: 0c85d93b52311dee7980d977be6ed0dc70b060c1

11 years agoImprove the way that skip-scan loops are constructued. Add test cases.
drh [Wed, 13 Nov 2013 16:58:54 +0000 (16:58 +0000)] 
Improve the way that skip-scan loops are constructued.  Add test cases.
Improved the scoring of skip-scan loops.

FossilOrigin-Name: 5e75ab93881b85801cb4ebf70f2063ff7c51ac19

11 years agoAdd test cases for skip-scan. Enhance "do_test" so that if the expected result
drh [Wed, 13 Nov 2013 15:32:15 +0000 (15:32 +0000)] 
Add test cases for skip-scan.  Enhance "do_test" so that if the expected result
is of the form "/*..*/" or "~/*..*/" it treats the expected result as a glob
pattern rather than as a regular expression.  Fix a bug in ANALYZE result
loading associated with WITHOUT ROWID tables.

FossilOrigin-Name: d3e6e9b2a74074c05429d3c341c23525504351ab

11 years agoAdd the ability to use an index even if the left-most columns of the index
drh [Wed, 13 Nov 2013 12:27:25 +0000 (12:27 +0000)] 
Add the ability to use an index even if the left-most columns of the index
are unconstrainted, provided that the left-most columns have few distinct
values.

FossilOrigin-Name: 27dd5993d1ae5625eb94bf406421eb390d001be9

11 years agoAvoid an unnecessary OP_IfNull while doing an indexed search.
drh [Wed, 13 Nov 2013 08:55:02 +0000 (08:55 +0000)] 
Avoid an unnecessary OP_IfNull while doing an indexed search.

FossilOrigin-Name: 5196000930600d0cd931b87e864507791b9dab08

11 years agoAdjust the SQLITE_MALLOCSIZE defines, primarily to make sure _msize gets used with...
mistachkin [Tue, 12 Nov 2013 21:37:04 +0000 (21:37 +0000)] 
Adjust the SQLITE_MALLOCSIZE defines, primarily to make sure _msize gets used with MSVC when appropriate.

FossilOrigin-Name: 4e7e805e1139b2dc05d85e86e5c8254e5d361bf2

11 years agoFix harmless compiler warning.
mistachkin [Tue, 12 Nov 2013 21:10:02 +0000 (21:10 +0000)] 
Fix harmless compiler warning.

FossilOrigin-Name: ddacd10105c6df2d3a9d707947e72c62e88212eb

11 years agoMinor enhancements to the auxiliary information added to EXPLAIN output with
drh [Tue, 12 Nov 2013 20:18:14 +0000 (20:18 +0000)] 
Minor enhancements to the auxiliary information added to EXPLAIN output with
SQLITE_EXPLAIN_ENABLE_COMMENTS.

FossilOrigin-Name: 0d1328e33ca761eddcf8a50e8e83c997861e9047

11 years agoBreak out the structure and macro definitions of where.c into a separate
drh [Tue, 12 Nov 2013 18:37:25 +0000 (18:37 +0000)] 
Break out the structure and macro definitions of where.c into a separate
header file whereInt.h for easier editing and debugging.

FossilOrigin-Name: c44467124623733aac64096d605f16139b733a7f

11 years agoWhen possible, have FTS use 32-bit operations to read varints from the database.
dan [Tue, 12 Nov 2013 17:46:44 +0000 (17:46 +0000)] 
When possible, have FTS use 32-bit operations to read varints from the database.

FossilOrigin-Name: aa7ba302ed13aedde89b5bcbe9119799c0da8a42

11 years agoA better (simpler) fix to the count(*) problem addressed in the previous
drh [Tue, 12 Nov 2013 15:33:40 +0000 (15:33 +0000)] 
A better (simpler) fix to the count(*) problem addressed in the previous
check-in.

FossilOrigin-Name: 0f924c6ef6cf2ac5a61aafa8dd8e3309b3970499

11 years agoMake sure the count(*) optimization works correctly on WITHOUT ROWID tables.
drh [Tue, 12 Nov 2013 14:55:40 +0000 (14:55 +0000)] 
Make sure the count(*) optimization works correctly on WITHOUT ROWID tables.

FossilOrigin-Name: 91174779786be07d63f3c4a5277602ddc5f0ba26

11 years agoUpdate test command [explain_i] to handle the opcodes used by virtual tables (VNext...
dan [Tue, 12 Nov 2013 12:30:09 +0000 (12:30 +0000)] 
Update test command [explain_i] to handle the opcodes used by virtual tables (VNext, VFilter etc.).

FossilOrigin-Name: 1b215ee3219750d3beda8f3628c8673efd517061

11 years agoFix for [4065ac8595]: Do not order CROSS or LEFT joins, even if the right-hand-side...
dan [Tue, 12 Nov 2013 12:17:16 +0000 (12:17 +0000)] 
Fix for [4065ac8595]: Do not order CROSS or LEFT joins, even if the right-hand-side is a virtual table.

FossilOrigin-Name: e2684ece455f53563ae6da7cbb5505d9a4a3076a

11 years agoFix an error message in the spellfix extension so that it conforms to the
drh [Tue, 12 Nov 2013 01:11:56 +0000 (01:11 +0000)] 
Fix an error message in the spellfix extension so that it conforms to the
style of error messages in the core.

FossilOrigin-Name: b896ae3d2787c370be3ff5d09da7d631a16d3a2a

11 years agoAdd a comment to the sqlite3_index_info structure indicating that the new
drh [Mon, 11 Nov 2013 23:26:34 +0000 (23:26 +0000)] 
Add a comment to the sqlite3_index_info structure indicating that the new
field is only available in SQLite 3.8.2 or later.

FossilOrigin-Name: 239648f8ccf057eb05841ce65b108da53fdbf0a4

11 years agoFix typos in compile and run-time tests of the sqlite library version number in ...
dan [Mon, 11 Nov 2013 19:56:35 +0000 (19:56 +0000)] 
Fix typos in compile and run-time tests of the sqlite library version number in  rtree.c.

FossilOrigin-Name: f58d57017199421167dae8ebc67db2f19be45082

11 years agoAdd a way for virtual tables to return the expected number of rows for a scan (not...
dan [Mon, 11 Nov 2013 19:01:33 +0000 (19:01 +0000)] 
Add a way for virtual tables to return the expected number of rows for a scan (not just the overall cost) to SQLite. Have the rtree module make use of this.

FossilOrigin-Name: 5a3cfd747a85480d215784817c3821d87ecfa2f7

11 years agoRemove unreachable code, replacing it in most cases with assert() or NEVER()
drh [Mon, 11 Nov 2013 16:55:52 +0000 (16:55 +0000)] 
Remove unreachable code, replacing it in most cases with assert() or NEVER()
macros.

FossilOrigin-Name: 924d63b283a3d059838114c95d42c6feaf913529

11 years agoFix issue with several memory allocation tests due to KeyInfo allocations now being...
mistachkin [Mon, 11 Nov 2013 03:37:04 +0000 (03:37 +0000)] 
Fix issue with several memory allocation tests due to KeyInfo allocations now being shared.

FossilOrigin-Name: 569fedd6bb07bdd3430da8dc65de4a9fdfe204cc

11 years agoConvert several ALWAYS() macros in vdbe.c into assert() statements.
drh [Mon, 11 Nov 2013 03:24:11 +0000 (03:24 +0000)] 
Convert several ALWAYS() macros in vdbe.c into assert() statements.

FossilOrigin-Name: acc40ff6b47595432ebc1b3ec71ac50384bec323

11 years agoFix several harmless compiler warnings.
mistachkin [Mon, 11 Nov 2013 02:46:32 +0000 (02:46 +0000)] 
Fix several harmless compiler warnings.

FossilOrigin-Name: e6ff492f0d475c395b82e2b3b294155674d4c6d1

11 years agoModify a HeapValidate assert in the Win32 native allocator.
mistachkin [Mon, 11 Nov 2013 01:42:10 +0000 (01:42 +0000)] 
Modify a HeapValidate assert in the Win32 native allocator.

FossilOrigin-Name: aaed7d1d3ba0aef9f99fb157d3704b9f279aef71

11 years agoFix a problem in OP_IdxDelete as used by REPLACE conflict resolution that
drh [Mon, 11 Nov 2013 00:43:21 +0000 (00:43 +0000)] 
Fix a problem in OP_IdxDelete as used by REPLACE conflict resolution that
comes up due to recent enhancements that reduce the work required for
UNIQUE NOT NULL indices.

FossilOrigin-Name: 61d7d4753f36932293c0eb1ca893b17d18355ad3

11 years agoFix typo in comment and remove superfluous blank line. No changes to code.
mistachkin [Sun, 10 Nov 2013 00:03:11 +0000 (00:03 +0000)] 
Fix typo in comment and remove superfluous blank line.  No changes to code.

FossilOrigin-Name: 023233f16ec2e6f582a7491643036ba5cad9379c

11 years agoFix compilation errors with some compilers that do not reference recent Windows SDK...
mistachkin [Sat, 9 Nov 2013 23:55:18 +0000 (23:55 +0000)] 
Fix compilation errors with some compilers that do not reference recent Windows SDK header files.

FossilOrigin-Name: a5805976f0e06ece2eeebd825f383a1ee88121fc

11 years agoFix memory type mismatch when compiled with MEMDEBUG.
mistachkin [Sat, 9 Nov 2013 23:44:02 +0000 (23:44 +0000)] 
Fix memory type mismatch when compiled with MEMDEBUG.

FossilOrigin-Name: 2c32bd6d4d5da2055633e8fb43ee184f729d8b91

11 years agoAdd the sqlite3_win32_compact_heap() function for cleaning up memory
drh [Sat, 9 Nov 2013 22:08:10 +0000 (22:08 +0000)] 
Add the sqlite3_win32_compact_heap() function for cleaning up memory
allocations on Win32 system.  Also cleanup the winGetTempname() function.
Changes to the Win32 VFS only.

FossilOrigin-Name: d06d9fdb6e6ac369035c825d9c30970115b3ba71

11 years agoUpdates to documentation on sqlite3_last_insert_rowid(). No changes to code.
drh [Sat, 9 Nov 2013 21:19:12 +0000 (21:19 +0000)] 
Updates to documentation on sqlite3_last_insert_rowid().  No changes to code.

FossilOrigin-Name: a4c5804efc63ff993e93f8a7b6acb6bb0a19dd3e

11 years agoUse the UNICODE_STRING_MAX_CHARS constant from WinNT.h. win32heap
mistachkin [Sat, 9 Nov 2013 21:11:36 +0000 (21:11 +0000)] 
Use the UNICODE_STRING_MAX_CHARS constant from WinNT.h.

FossilOrigin-Name: 3fefe4dd43539ec7e525ef58f0bfeffd31288ebd

11 years agoFurhter cleanup of the winGetTempname function.
mistachkin [Sat, 9 Nov 2013 21:10:47 +0000 (21:10 +0000)] 
Furhter cleanup of the winGetTempname function.

FossilOrigin-Name: 674de36bcaafc1130b7603e69616c71fc8cd7de7

11 years agoUpdates to requirements marks. No changes to code.
drh [Sat, 9 Nov 2013 19:47:15 +0000 (19:47 +0000)] 
Updates to requirements marks.  No changes to code.

FossilOrigin-Name: 8a0366285b94dc43d932736e7b1eedb71e241857

11 years agoThrow an error if AUTOINCREMENT appears in a WITHOUT ROWID table.
drh [Sat, 9 Nov 2013 18:15:35 +0000 (18:15 +0000)] 
Throw an error if AUTOINCREMENT appears in a WITHOUT ROWID table.
Updates to API documentation to discuss WITHOUT ROWID.

FossilOrigin-Name: b1abb2b078d1cb9ec5fbd7f98221914b93632e9f

11 years agoAdd more assert() statements and fix compilation issues when the Win32 native heap...
mistachkin [Fri, 8 Nov 2013 20:10:57 +0000 (20:10 +0000)] 
Add more assert() statements and fix compilation issues when the Win32 native heap is not enabled.

FossilOrigin-Name: fbf8c3828327d19bbce0d7f6735e7577abfd54b3

11 years agoDisable use of HeapCompact on Windows CE as it is not available on all versions.
mistachkin [Fri, 8 Nov 2013 19:51:12 +0000 (19:51 +0000)] 
Disable use of HeapCompact on Windows CE as it is not available on all versions.

FossilOrigin-Name: e9694b877178572665048d1015ca033c469160e7

11 years agoAdjust the winMemInit return code handling used when resetting the Win32 native heap.
mistachkin [Fri, 8 Nov 2013 18:52:45 +0000 (18:52 +0000)] 
Adjust the winMemInit return code handling used when resetting the Win32 native heap.

FossilOrigin-Name: 37853665e75fc92b4d15e6db0b3346722527e799

11 years agoMinor corrections to logging for sqlite3_win32_compact_heap().
mistachkin [Fri, 8 Nov 2013 18:37:02 +0000 (18:37 +0000)] 
Minor corrections to logging for sqlite3_win32_compact_heap().

FossilOrigin-Name: 71347d021bea90ad7e4cc0d3e54940ce29b9ea69

11 years agoEnhancements to the Win32 native heap integration.
mistachkin [Fri, 8 Nov 2013 18:13:48 +0000 (18:13 +0000)] 
Enhancements to the Win32 native heap integration.

FossilOrigin-Name: c54dc9672b686c8e323eac0c33cd90ea89d36364

11 years agoFix harmless compiler warnings.
drh [Fri, 8 Nov 2013 17:13:23 +0000 (17:13 +0000)] 
Fix harmless compiler warnings.

FossilOrigin-Name: 0077c0772a884b54d81fa3733aac6f0c364ef1a8

11 years agoMerge the Cygwin directory separator fix. Also fix a C++-ism in the
drh [Fri, 8 Nov 2013 17:03:50 +0000 (17:03 +0000)] 
Merge the Cygwin directory separator fix.  Also fix a C++-ism in the
multiplexor code so that it will compile on MSVC.

FossilOrigin-Name: 830629d31d171155d90ff87ae8e70094d17bb2d3

11 years agoPerformance improvement: Avoid unnecessary seeks on REPLACE INTO for a
drh [Fri, 8 Nov 2013 16:54:56 +0000 (16:54 +0000)] 
Performance improvement: Avoid unnecessary seeks on REPLACE INTO for a
WITHOUT ROWID table.

FossilOrigin-Name: fd11afa5f5c853dcac2290444b581a3fe1d4332d

11 years agoPerformance improvements:
drh [Fri, 8 Nov 2013 15:19:46 +0000 (15:19 +0000)] 
Performance improvements:
Avoid unnecessary seeks when doing a single-row UPDATE on a WITHOUT ROWID
table.

FossilOrigin-Name: 6f187a0fb1b09ebc4732c4afbf3c813f82e069f1

11 years agoMerge change to drop the mutex on the multiplexor before entering the xRead
drh [Fri, 8 Nov 2013 12:14:50 +0000 (12:14 +0000)] 
Merge change to drop the mutex on the multiplexor before entering the xRead
VFS call, in order to enhance parallelizability.

FossilOrigin-Name: 3c566e41e4c9c66960cc5a3ddee8556835237999

11 years agoOptimize out a NotExists/NotFound opcode that occurs in UPDATE processing
drh [Fri, 8 Nov 2013 01:09:15 +0000 (01:09 +0000)] 
Optimize out a NotExists/NotFound opcode that occurs in UPDATE processing
after constraint checks if there is no possiblity that the constraint checking
code might have moved the cursor.

FossilOrigin-Name: 74e3ee2ee6ea89af2c12dd0bce248467fd0f1310

11 years agoOn the --summary output of wordcount, add the a PRAGMA integrity_check and
drh [Fri, 8 Nov 2013 00:16:58 +0000 (00:16 +0000)] 
On the --summary output of wordcount, add the a PRAGMA integrity_check and
a 64-bit checksum of the entire table.

FossilOrigin-Name: 1d1d13b89056903543c909b094030d205473fa82

11 years agoAdd many new options to the wordcount test program: --delete, --pagesize,
drh [Thu, 7 Nov 2013 23:23:27 +0000 (23:23 +0000)] 
Add many new options to the wordcount test program: --delete, --pagesize,
--cachesize, --commit, --nosync, and --journal.

FossilOrigin-Name: e938112d316ca31460f247cc104ca3ff1d60b4da

11 years agoFix temporary directory separator handling for Cygwin. cygDirSep
mistachkin [Thu, 7 Nov 2013 22:11:55 +0000 (22:11 +0000)] 
Fix temporary directory separator handling for Cygwin.

FossilOrigin-Name: 9d870d5f0d8f02e5c91396a1f98b5ddb56b40b70

11 years agoFix a compiler warning introduced by the previous check-in.
drh [Thu, 7 Nov 2013 21:32:16 +0000 (21:32 +0000)] 
Fix a compiler warning introduced by the previous check-in.

FossilOrigin-Name: 404bd98fb41f71d041932d68a908570995825ec1

11 years agoEnable the WHERE_ONEPASS_DESIRED optimization for UPDATE operations on
drh [Thu, 7 Nov 2013 21:25:13 +0000 (21:25 +0000)] 
Enable the WHERE_ONEPASS_DESIRED optimization for UPDATE operations on
WITHOUT ROWID tables.

FossilOrigin-Name: 215307985590c2f3f7aa0d5a0b7799155a506045

11 years agoAdd the --stats and --summary options to the wordcount.c test program.
drh [Thu, 7 Nov 2013 19:43:21 +0000 (19:43 +0000)] 
Add the --stats and --summary options to the wordcount.c test program.

FossilOrigin-Name: 8aa21e6791d408c8f018bd779e09cb7e7179f884

11 years agoIncrease the version number to 3.8.2.
drh [Thu, 7 Nov 2013 18:40:39 +0000 (18:40 +0000)] 
Increase the version number to 3.8.2.

FossilOrigin-Name: 9ad5b74c26c5a18068a2418a2092a05c226912c2

11 years agoAdd the "wordcount.c" test program.
drh [Thu, 7 Nov 2013 18:37:31 +0000 (18:37 +0000)] 
Add the "wordcount.c" test program.

FossilOrigin-Name: f02ee5463084cef45ae412c51211b66de7e86baf

11 years agoAdd support for WITHOUT ROWID tables. This change also includes
drh [Thu, 7 Nov 2013 16:08:10 +0000 (16:08 +0000)] 
Add support for WITHOUT ROWID tables.  This change also includes
(1) standardization of the error message returned from run-time constraint
errors, (2) improved EXPLAIN comments, (3) the SQLITE_ENABLE_EXPLAIN_COMMENTS
option, (4) the SQLITE_ENABLE_MODULE_COMMENTS option, and (5) a bug fix
(see [573cc27427]) in the handling of REPLACE on the rowid when secondary
indices use FAIL or IGNORE.

FossilOrigin-Name: c80e229dd9c1230abefbc707d4bf0b24315c6bb5

11 years agoMake sure cached KeyInfo objects are only valid for a single database omit-rowid
drh [Thu, 7 Nov 2013 14:09:39 +0000 (14:09 +0000)] 
Make sure cached KeyInfo objects are only valid for a single database
connection.  Clear all cached KeyInfo objects on any collating sequence
change.

FossilOrigin-Name: 55eea1782aead6a6aaf93f14d85486f8fd2209ad

11 years agoReference count the KeyInfo object. Cache a copy of an appropriate KeyInfo
drh [Wed, 6 Nov 2013 19:59:23 +0000 (19:59 +0000)] 
Reference count the KeyInfo object.  Cache a copy of an appropriate KeyInfo
for each index in the Index object, and reuse that one copy as much as possible.

FossilOrigin-Name: defd5205a7cc3543cdd18f906f568e943b8b3a2c

11 years agoHave the OP_NoConflict opcode set the VdbeCursor.seekResult variable. This speeds...
dan [Wed, 6 Nov 2013 16:28:59 +0000 (16:28 +0000)] 
Have the OP_NoConflict opcode set the VdbeCursor.seekResult variable. This speeds up subsequent OP_Insert and OP_IdxInsert opcodes.

FossilOrigin-Name: 474555002d45f8741faceea599c057eef4e7931e

11 years agoUse ansi escape codes to use different colored text for opcode names in the output...
dan [Wed, 6 Nov 2013 14:52:40 +0000 (14:52 +0000)] 
Use ansi escape codes to use different colored text for opcode names in the output of [explain_i]: Red for opcodes that insert or delete b-tree elements, blue for opcodes that move cursors and green for the ResultRow opcode.

FossilOrigin-Name: 4be2b64b3e5237ee1fb156c06cffaf7d96f6c532

11 years agoAllocate extra stack space for UnpackedRecord objects, reducing the need
drh [Wed, 6 Nov 2013 14:36:08 +0000 (14:36 +0000)] 
Allocate extra stack space for UnpackedRecord objects, reducing the need
to malloc for them as often, and thereby get a performance improvement.

FossilOrigin-Name: a725a75f870d7d9b21946fbcc71a956492986ab0

11 years agoMinor optimization to the OP_Halt opcode.
drh [Wed, 6 Nov 2013 14:05:21 +0000 (14:05 +0000)] 
Minor optimization to the OP_Halt opcode.

FossilOrigin-Name: d70c78814ba565a44628eab61a3a0a5dba56269a

11 years agoImproved ORDER BY optimization for WITHOUT ROWID tables.
drh [Wed, 6 Nov 2013 12:56:04 +0000 (12:56 +0000)] 
Improved ORDER BY optimization for WITHOUT ROWID tables.

FossilOrigin-Name: 8f1709ff2d52d5ceca3da6a2a4e06da204d9e65a

11 years agoDisable the OR optimization for WITHOUT ROWID tables, since it relies on
drh [Wed, 6 Nov 2013 12:05:57 +0000 (12:05 +0000)] 
Disable the OR optimization for WITHOUT ROWID tables, since it relies on
the use of rowids.

FossilOrigin-Name: 6055dad2ba2f9256b1f2d0a9e32ca00f1b81b0cf

11 years agoRemove an incorrect test case from conflict2.test.
drh [Wed, 6 Nov 2013 11:46:48 +0000 (11:46 +0000)] 
Remove an incorrect test case from conflict2.test.

FossilOrigin-Name: 427612efc169c8ebe94a8b586d7abd0fcd43d0d0

11 years agoRemove an unused variable.
drh [Wed, 6 Nov 2013 02:36:04 +0000 (02:36 +0000)] 
Remove an unused variable.

FossilOrigin-Name: e9c1e419b7227d86f2e1882cebf360116cdf1a13

11 years agoMake sure the query planner knows that the PRIMARY KEY index of a
drh [Tue, 5 Nov 2013 22:39:17 +0000 (22:39 +0000)] 
Make sure the query planner knows that the PRIMARY KEY index of a
WITHOUT ROWID table is always a covering index.

FossilOrigin-Name: 03e7019e14255dbeb85bb299569c82ef48ac4a98

11 years agoFix conflict handling for the case when the rowid uses REPLACE but other
drh [Tue, 5 Nov 2013 19:41:32 +0000 (19:41 +0000)] 
Fix conflict handling for the case when the rowid uses REPLACE but other
unique constraints use FAIL or IGNORE.

FossilOrigin-Name: 573cc27427af297185f11aac8dce88ca31f471ca

11 years agoFix a bug in secondary index initialization when the secondary index is
drh [Tue, 5 Nov 2013 17:30:04 +0000 (17:30 +0000)] 
Fix a bug in secondary index initialization when the secondary index is
a superset of the PRIMARY KEY for a WITHOUT ROWID table.

FossilOrigin-Name: 52a3d885192c5d31f956c5ee17e29e2d1f3d5c9f

11 years agoRemove an "explain" command from test script without_rowid1.test that was accidentall...
dan [Tue, 5 Nov 2013 16:56:11 +0000 (16:56 +0000)] 
Remove an "explain" command from test script without_rowid1.test that was accidentally committed.

FossilOrigin-Name: 4b41d989e894b9214a9b973228ef8446356f9fbb

11 years agoUnless the destination table is completely empty, disable the xfer optimization for...
dan [Tue, 5 Nov 2013 16:39:31 +0000 (16:39 +0000)] 
Unless the destination table is completely empty, disable the xfer optimization for WITHOUT ROWID tables.

FossilOrigin-Name: 3877c9f50582b51817dcf3cd75d836891a34e590

11 years agoUpdates to the backcompat.test test script so that it works with really old (3.6...
dan [Tue, 5 Nov 2013 15:02:39 +0000 (15:02 +0000)] 
Updates to the backcompat.test test script so that it works with really old (3.6.*) versions.

FossilOrigin-Name: ace7e7b64261aeabc9525d5d0cfebe0275c9ddf5

11 years agoAdd tests for updates of without-rowid tables that use non-BINARY collation sequences...
dan [Tue, 5 Nov 2013 14:19:22 +0000 (14:19 +0000)] 
Add tests for updates of without-rowid tables that use non-BINARY collation sequences for the primary key columns. And a minor bugfix to the same.

FossilOrigin-Name: 99b1fa4b1664a79eae1dddce2b9a848384cdb1d7