]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
11 years agoAvoid using the GetVersionEx functions if they are considered deprecated. vs2013
mistachkin [Wed, 27 Nov 2013 03:01:34 +0000 (03:01 +0000)] 
Avoid using the GetVersionEx functions if they are considered deprecated.

FossilOrigin-Name: 0ea9e4722be10221c99cce5bc48d13c7b34e739f

11 years agoAdd additional test cases for skip-scan.
drh [Wed, 27 Nov 2013 01:23:53 +0000 (01:23 +0000)] 
Add additional test cases for skip-scan.

FossilOrigin-Name: 1ae4915d4d08ee5ce526c04d1d0cda1078641793

11 years agoAdd additional test cases and requirements evidence marks for WITHOUT ROWID.
drh [Wed, 27 Nov 2013 00:45:49 +0000 (00:45 +0000)] 
Add additional test cases and requirements evidence marks for WITHOUT ROWID.

FossilOrigin-Name: b408d788105efd007e3546f45d5dd15a5dc5688d

11 years agoMake sure the update hook is not invoked for WITHOUT ROWID tables, as
drh [Tue, 26 Nov 2013 23:27:07 +0000 (23:27 +0000)] 
Make sure the update hook is not invoked for WITHOUT ROWID tables, as
the documentation specifies.  This bug was found while adding requirements
marks, so a few extraneous requirements marks are included in this
check-in.

FossilOrigin-Name: 0978bac6b8aee229d7a0d148546f50d380d06a06

11 years agoAdd requirements test cases for determining when an expression is true and
drh [Tue, 26 Nov 2013 22:46:54 +0000 (22:46 +0000)] 
Add requirements test cases for determining when an expression is true and
when it is false.

FossilOrigin-Name: 838654e56304a5788ac384ca506c1938f48af488

11 years agoChanging the CAST behavior of REAL values actually changed a documented
drh [Tue, 26 Nov 2013 21:18:45 +0000 (21:18 +0000)] 
Changing the CAST behavior of REAL values actually changed a documented
requirement.  So we also have to change the requirement evidence text to
match.

FossilOrigin-Name: d84aa44e3919e25f9520c5120a35ec21e837a9ea

11 years agoReduce the amount of code used to implement OP_SeekGe and similar.
dan [Tue, 26 Nov 2013 18:22:59 +0000 (18:22 +0000)] 
Reduce the amount of code used to implement OP_SeekGe and similar.

FossilOrigin-Name: 8b12a15a2a8139d75f56a099f3f6af844da3ac9c

11 years agoFix a possible NULL pointer deference in the wordcount test program.
drh [Tue, 26 Nov 2013 16:51:13 +0000 (16:51 +0000)] 
Fix a possible NULL pointer deference in the wordcount test program.

FossilOrigin-Name: 6f91dca0de908dc2b15130a6593a61c3147a409f

11 years agoChange tclsqlite3.c so that it never invokes ctype macros with signed
drh [Tue, 26 Nov 2013 16:48:04 +0000 (16:48 +0000)] 
Change tclsqlite3.c so that it never invokes ctype macros with signed
character arguments.

FossilOrigin-Name: c07caabf2396c84b2ccb0e9f98ae6279ce41c59d

11 years agoDo not try to run the atof1.test test script on ARM hardware which lacks
drh [Tue, 26 Nov 2013 16:20:28 +0000 (16:20 +0000)] 
Do not try to run the atof1.test test script on ARM hardware which lacks
the "long double" type.

FossilOrigin-Name: fafca560f28f526abdf1474c33af94665a65aaf0

11 years agoChange the REAL-to-INTEGER casting behavior so that if the REAL value
drh [Tue, 26 Nov 2013 15:45:02 +0000 (15:45 +0000)] 
Change the REAL-to-INTEGER casting behavior so that if the REAL value
is greater than 9223372036854775807.0 then it is cast to the latest
possible integer, 9223372036854775807.  This is sensible and the way
most platforms work in hardware.  The former behavior was that oversize
REALs would be cast to the smallest possible integer, -9223372036854775808,
which is the way Intel hardware works.

FossilOrigin-Name: 6f53fc7106658d44edf63068f9a8522fa5a7688b

11 years agoBetter support for UTF-8 paths on Cygwin.
mistachkin [Tue, 26 Nov 2013 00:28:50 +0000 (00:28 +0000)] 
Better support for UTF-8 paths on Cygwin.

FossilOrigin-Name: 9954327c0febc0ece46f62e05976330a1b82b48f

11 years agoAdd SQLITE_CONFIG_WIN32_HEAPSIZE option to configure the maximum isolated heap size...
mistachkin [Mon, 25 Nov 2013 23:42:21 +0000 (23:42 +0000)] 
Add SQLITE_CONFIG_WIN32_HEAPSIZE option to configure the maximum isolated heap size on Windows.

FossilOrigin-Name: 914e6c9d88828b66e8385c4a264702471faa34cf

11 years agoChange a while-loop into a do-loop in sqlite3VdbeRecordCompare() and add
drh [Mon, 25 Nov 2013 22:24:36 +0000 (22:24 +0000)] 
Change a while-loop into a do-loop in sqlite3VdbeRecordCompare() and add
an assert() to verify that the do-loop really is appropriate.  This gives
about a 10% performance boost in that routine, or a 0.9% boost overall.

FossilOrigin-Name: 011a6be439eb884c944a3318bf631bed3135f8ec

11 years agoClarify docs for the SQLITE_CONFIG_WIN32_HEAPSIZE option. winHeapSize
mistachkin [Mon, 25 Nov 2013 21:49:04 +0000 (21:49 +0000)] 
Clarify docs for the SQLITE_CONFIG_WIN32_HEAPSIZE option.

FossilOrigin-Name: 51e876074af4e34ba01ed122e3bcc042243c9e88

11 years agoRemove a NEVER() from a branch that is now reachable during OOM faults.
drh [Mon, 25 Nov 2013 21:41:24 +0000 (21:41 +0000)] 
Remove a NEVER() from a branch that is now reachable during OOM faults.

FossilOrigin-Name: 18bdcb05c26860643f53a6b9e85f84109a3ebe5a

11 years agoOptimizations to the sqlite3BtreeMovetoUnpacked() routine in storage engine
drh [Mon, 25 Nov 2013 20:50:23 +0000 (20:50 +0000)] 
Optimizations to the sqlite3BtreeMovetoUnpacked() routine in storage engine
making it about 17.8% faster, which in turn makes SQLite over 1.2% faster
overall.

FossilOrigin-Name: 032e89934f36de10652d3454a0065a337827221a

11 years agoReturn an SQLITE_CORRUPT error if the content size field of a table record btree-optimization
drh [Mon, 25 Nov 2013 20:14:13 +0000 (20:14 +0000)] 
Return an SQLITE_CORRUPT error if the content size field of a table record
extends off the end of a page.

FossilOrigin-Name: b48c4e402125fb8d2208d358f6e9bbc351f3a49d

11 years agoUses shifts rather than division for arithmetic on the cell indices, since
drh [Mon, 25 Nov 2013 17:38:26 +0000 (17:38 +0000)] 
Uses shifts rather than division for arithmetic on the cell indices, since
those indices are always non-negative.

FossilOrigin-Name: 5bf2a3feeb2c83671bf3edeb20a549239e6873bf

11 years agoOptimize the skipping of the payload size field when doing a binary search
drh [Mon, 25 Nov 2013 16:52:59 +0000 (16:52 +0000)] 
Optimize the skipping of the payload size field when doing a binary search
for a rowid.

FossilOrigin-Name: 55e5bfa231dd52a7cf9ec982967da4963867b9e5

11 years agoArrange for sqlite3BtreeMovetoUnpacked() to always leave the cursor cell
drh [Mon, 25 Nov 2013 16:23:52 +0000 (16:23 +0000)] 
Arrange for sqlite3BtreeMovetoUnpacked() to always leave the cursor cell
parse cache invalidated.  This fixes issues with previous check-ins on this
branch and also runs faster.

FossilOrigin-Name: a74675607fe041e37a58a3ec287131de0e5090c3

11 years agoMore optimizations to sqlite3BtreeMovetoUnpacked(). But there are failures
drh [Mon, 25 Nov 2013 15:01:38 +0000 (15:01 +0000)] 
More optimizations to sqlite3BtreeMovetoUnpacked().  But there are failures
in TH3.  Committing this intermediate state to facilitate bisecting.

FossilOrigin-Name: f80497be446f84d2000e454e32d717887a7d0cee

11 years agoMore improvements to sqlite3BtreeMovetoUnpacked() performance.
drh [Mon, 25 Nov 2013 14:10:15 +0000 (14:10 +0000)] 
More improvements to sqlite3BtreeMovetoUnpacked() performance.

FossilOrigin-Name: 88680698231b7141401f7166e3aff8dbc6008030

11 years agoPerformance improvements in sqlite3BtreeMovetoUnpacked().
drh [Mon, 25 Nov 2013 02:38:55 +0000 (02:38 +0000)] 
Performance improvements in sqlite3BtreeMovetoUnpacked().

FossilOrigin-Name: d0fb7acea7cbfe6f2d84782a28bb51675a06576f

11 years agoBetter support for UTF-8 paths on Cygwin. cygUtf8
mistachkin [Sun, 24 Nov 2013 23:18:21 +0000 (23:18 +0000)] 
Better support for UTF-8 paths on Cygwin.

FossilOrigin-Name: 484162b6e5a8ad9385fe2eb2a5254d13d7b0bc36

11 years agoAdd the --scratch parameter to speedtest1. Improved error messages when
drh [Sun, 24 Nov 2013 01:14:14 +0000 (01:14 +0000)] 
Add the --scratch parameter to speedtest1.  Improved error messages when
misconfiguring memory parameters in speedtest1.

FossilOrigin-Name: 8f3c767a30c552548ead104ca125f182ce4849ad

11 years agoThe MEMSYS5 algorithm does not have to return the block with the lowest
drh [Sun, 24 Nov 2013 00:46:00 +0000 (00:46 +0000)] 
The MEMSYS5 algorithm does not have to return the block with the lowest
address.  Any block of the appropriate size will do.  Use the first block
found on the freelist for the appropriate size for a performance improvement.

FossilOrigin-Name: 12e612e8e7c4a6f83acf0daf5608151fb5ec1575

11 years agoA much simpler fix is to simply change MEMSYS5 so that it takes any free memsys5-performance
drh [Sat, 23 Nov 2013 22:45:12 +0000 (22:45 +0000)] 
A much simpler fix is to simply change MEMSYS5 so that it takes any free
block of the appropriate size (the first on the list of free blocks) rather
than searching for the one with the smallest address.  This is also faster
than using the min-heap algorithm.  Need to research to verify that the
allocator still satisfies the Robson proof, however.

FossilOrigin-Name: 8191b512122c13d7fa61d8e5487652f13ec172f7

11 years agoAdd newlines at the end of some error messages in speedtest1.
drh [Sat, 23 Nov 2013 21:29:07 +0000 (21:29 +0000)] 
Add newlines at the end of some error messages in speedtest1.

FossilOrigin-Name: 6b98f0af7a6522873245d30598d7c79b8aeb9fa0

11 years agoReport errors from sqlite3_exec() and sqlite3_config() in speedtest1. Fix
drh [Sat, 23 Nov 2013 11:45:58 +0000 (11:45 +0000)] 
Report errors from sqlite3_exec() and sqlite3_config() in speedtest1.  Fix
a bug in the main testing logic that was found by these error reports.

FossilOrigin-Name: 659f1a98ae698d062269f8fdac84f733a460f5de

11 years agoFix the order of parameters to SQLITE_CONFIG_PAGECACHE in the
drh [Sat, 23 Nov 2013 04:32:18 +0000 (04:32 +0000)] 
Fix the order of parameters to SQLITE_CONFIG_PAGECACHE in the
speedtest1.exe program.

FossilOrigin-Name: dbe85ef6d265ed31f4b56dfc0c72bad6adcfd7f0

11 years agoAdjust MSVC makefile to avoid using forward slashes in file names.
mistachkin [Sat, 23 Nov 2013 04:22:19 +0000 (04:22 +0000)] 
Adjust MSVC makefile to avoid using forward slashes in file names.

FossilOrigin-Name: facf6deaa61ed2e1744711d621d7f50fe2067803

11 years agoAdd the "speedtest1.exe" test program.
drh [Sat, 23 Nov 2013 04:16:58 +0000 (04:16 +0000)] 
Add the "speedtest1.exe" test program.

FossilOrigin-Name: fb6f0c6d77b2318e6e587951514aea91db128c3c

11 years agoAdd experimental sqlite3_config option to control the native Win32 heap size.
mistachkin [Sat, 23 Nov 2013 00:27:29 +0000 (00:27 +0000)] 
Add experimental sqlite3_config option to control the native Win32 heap size.

FossilOrigin-Name: f09f11e94b5a7c2e51d99c3700d2acd2f3903de9

11 years agoFix harmless compiler warning.
mistachkin [Fri, 22 Nov 2013 21:32:44 +0000 (21:32 +0000)] 
Fix harmless compiler warning.

FossilOrigin-Name: f336c18fb72ab90e93640b12ac540d41accc7658

11 years agoMinor correction to the batch build tool for MSVC.
mistachkin [Fri, 22 Nov 2013 00:49:43 +0000 (00:49 +0000)] 
Minor correction to the batch build tool for MSVC.

FossilOrigin-Name: 22144c9df260910c4b67960b0e6a6bd5a6758cd7

11 years agoFix a harmless clang warning in the command-line shell.
drh [Thu, 21 Nov 2013 23:37:02 +0000 (23:37 +0000)] 
Fix a harmless clang warning in the command-line shell.

FossilOrigin-Name: 3d47a556f0074e39b880186fb7661b1b8955f742

11 years agoSlight change to the --timer output on wordcount for better display on
drh [Thu, 21 Nov 2013 22:02:52 +0000 (22:02 +0000)] 
Slight change to the --timer output on wordcount for better display on
windows:  Avoid showing the full pathname of the executable.

FossilOrigin-Name: b9e047b9e3c2ee4df4a2d921db62f590fa5452d3

11 years agoChanges some offset and amount parameters from "int" to "u32" to avoid
drh [Thu, 21 Nov 2013 21:59:53 +0000 (21:59 +0000)] 
Changes some offset and amount parameters from "int" to "u32" to avoid
harmless signed/unsigned comparison warnings.

FossilOrigin-Name: 4e8c5d0795cb7c603182bfa70f3855d654f0997e

11 years agoModify wordcount so that timer information appears on standard error instead
drh [Thu, 21 Nov 2013 21:40:45 +0000 (21:40 +0000)] 
Modify wordcount so that timer information appears on standard error instead
of standard output.  Rename the run-wordcount.bash script to run-wordcount.sh
and simplify it so that it stands a better chance of running on non-GNU
systems.

FossilOrigin-Name: 586c11ed7cc6b8e2c7181231e37791c2fbc95272

11 years agoDo not reuse factored constants that might have had their encodings changed.
drh [Thu, 21 Nov 2013 21:23:31 +0000 (21:23 +0000)] 
Do not reuse factored constants that might have had their encodings changed.

FossilOrigin-Name: 487f20366ce77f0c90865d10d5aaedd95af98694

11 years agoFix the code generator to honor turning off constant expression factoring.
drh [Thu, 21 Nov 2013 20:48:42 +0000 (20:48 +0000)] 
Fix the code generator to honor turning off constant expression factoring.

FossilOrigin-Name: 882622662dfadf49c65c7d80b7fd87533d079ce9

11 years agoAdd the --timer option to the wordcount test program.
drh [Thu, 21 Nov 2013 19:27:45 +0000 (19:27 +0000)] 
Add the --timer option to the wordcount test program.

FossilOrigin-Name: a89fdf87553f01c150729c570796b5078a9b069d

11 years agoRemove a test from sqlite3VdbeMemFromBtree() which was unnecessary, and
drh [Thu, 21 Nov 2013 19:05:04 +0000 (19:05 +0000)] 
Remove a test from sqlite3VdbeMemFromBtree() which was unnecessary, and
after the recent OP_Column refactoring, unreachable.

FossilOrigin-Name: 23667f3ba09b7e839d76c42669dc9247a91262c8

11 years agoMake sure the OP_Next and OP_NextIfOpen opcodes are numbered close together
drh [Thu, 21 Nov 2013 17:24:18 +0000 (17:24 +0000)] 
Make sure the OP_Next and OP_NextIfOpen opcodes are numbered close together
for efficiency in switch() statements.  OP_Prev and OP_PrevIfOpen too.

FossilOrigin-Name: d4ccf0f5c656c8f0e1c32d5f7971b131f42c3cbd

11 years agoWhen one or more arguments to a function are constants, try to factor
drh [Thu, 21 Nov 2013 16:08:52 +0000 (16:08 +0000)] 
When one or more arguments to a function are constants, try to factor
out just those arguments into initialization code.

FossilOrigin-Name: 50d350abbc9176cd6fc606bc45b8fc3020719500

11 years agoRemove the obsolete TK_CONST_FUNC token type.
drh [Thu, 21 Nov 2013 14:44:38 +0000 (14:44 +0000)] 
Remove the obsolete TK_CONST_FUNC token type.

FossilOrigin-Name: 9b4217f055e9bced186b4c56a5753bd6da7115b5

11 years agoAdd the ability to factor constant functions out of inner loops. But do
drh [Thu, 21 Nov 2013 14:33:48 +0000 (14:33 +0000)] 
Add the ability to factor constant functions out of inner loops.  But do
not factor out non-constant functions, like random().

FossilOrigin-Name: 1b0f779e19a5c0d51eddd2d88db50034d77d132c

11 years agoAnother improvement to OP_Function and an improvement to OP_Move.
drh [Thu, 21 Nov 2013 04:18:31 +0000 (04:18 +0000)] 
Another improvement to OP_Function and an improvement to OP_Move.

FossilOrigin-Name: 70b056fb6f60cdfbe24e4b77a1770eef064a73c6

11 years agoA simple change to the OP_Function opcode improves overall performance by
drh [Thu, 21 Nov 2013 03:43:12 +0000 (03:43 +0000)] 
A simple change to the OP_Function opcode improves overall performance by
about 0.5%.

FossilOrigin-Name: b890eefd57fbd189f7df611e82eb1fb4b197e1c3

11 years agoPerformance optimization to the OP_Next and OP_Prev opcodes.
drh [Thu, 21 Nov 2013 03:12:25 +0000 (03:12 +0000)] 
Performance optimization to the OP_Next and OP_Prev opcodes.

FossilOrigin-Name: ecaac28a2e78aca148fc614fe54bf2706aed8be2

11 years agoRefactor the OP_Column opcode to make it clearer and easier to maintain.
drh [Thu, 21 Nov 2013 01:33:45 +0000 (01:33 +0000)] 
Refactor the OP_Column opcode to make it clearer and easier to maintain.
Overall, performance tests show about a 1% speed increase with this change.

FossilOrigin-Name: 972881c6d394c199961f01dcbeb4a6e8b5c919a1

11 years agoReduce the size of VdbeCursor again, this time without a performance hit. OP_Column-refactor
drh [Thu, 21 Nov 2013 01:04:02 +0000 (01:04 +0000)] 
Reduce the size of VdbeCursor again, this time without a performance hit.

FossilOrigin-Name: 933939932c44bccb0958f203a5bd24e683c1cf38

11 years agoUnpack some fields, adding some space back to the VdbeCursor object,
drh [Thu, 21 Nov 2013 00:10:35 +0000 (00:10 +0000)] 
Unpack some fields, adding some space back to the VdbeCursor object,
in order to help the code to run a little faster.

FossilOrigin-Name: f8d5efcd7b92492b833b6cd1cb6bec006c6a0809

11 years agoReduce the size of the VdbeCursor object from 144 to 120 bytes.
drh [Wed, 20 Nov 2013 21:51:33 +0000 (21:51 +0000)] 
Reduce the size of the VdbeCursor object from 144 to 120 bytes.

FossilOrigin-Name: 5f9d50688508affd0bc8e4d52e21dacfacdbb5ce

11 years agoImproved comments on the OP_Column changes. Optimize out loading of overflow
drh [Wed, 20 Nov 2013 20:58:00 +0000 (20:58 +0000)] 
Improved comments on the OP_Column changes.  Optimize out loading of overflow
pages for content with zero length.  Add test cases for the latter.

FossilOrigin-Name: 0e05679db7aa302a49e087a81f85203844b98cbe

11 years agoFurther performance tweaks to OP_Column.
drh [Wed, 20 Nov 2013 19:28:03 +0000 (19:28 +0000)] 
Further performance tweaks to OP_Column.

FossilOrigin-Name: 0e3f5df695216a27602a53eed5d25231b055adc8

11 years agoRefactoring the OP_Column opcode for improved performance and
drh [Wed, 20 Nov 2013 17:25:55 +0000 (17:25 +0000)] 
Refactoring the OP_Column opcode for improved performance and
maintainability.

FossilOrigin-Name: 7c914e3997d2b28164a2fa7eb4398262b6ddb4b2

11 years agoSimplifications to the VdbeCursor object.
drh [Wed, 20 Nov 2013 02:53:58 +0000 (02:53 +0000)] 
Simplifications to the VdbeCursor object.

FossilOrigin-Name: 5562cd343d8f69242e06a51a7f1aef7ee7d78eec

11 years agoPerformance improvement for the OP_MustBeInt opcode in the VDBE.
drh [Wed, 20 Nov 2013 00:59:02 +0000 (00:59 +0000)] 
Performance improvement for the OP_MustBeInt opcode in the VDBE.

FossilOrigin-Name: 96a65388e75fed96e2e73ef65726f6db88cc5ccd

11 years agoFix a harmless MSVC compiler warning.
drh [Tue, 19 Nov 2013 18:17:20 +0000 (18:17 +0000)] 
Fix a harmless MSVC compiler warning.

FossilOrigin-Name: 6cc023bb29be51847fbbfab95c24fc89993ccdba

11 years agoMinor performance improvement to sqlite3SerialTypeGet().
drh [Tue, 19 Nov 2013 13:55:34 +0000 (13:55 +0000)] 
Minor performance improvement to sqlite3SerialTypeGet().

FossilOrigin-Name: 17e8524fc05aa1e6074c19a8ccccc5ab5883103a

11 years agoChange Noop-comments in where.c into Module-comments, so that they are
drh [Tue, 19 Nov 2013 12:33:23 +0000 (12:33 +0000)] 
Change Noop-comments in where.c into Module-comments, so that they are
omitting without SQLITE_ENABLE_MODULE_COMMENTS.

FossilOrigin-Name: 3e577f40183c56e60866d8382b044688a1b77eaf

11 years agoAvoid seeking on the main data table during the first loop of an UPDATE
drh [Tue, 19 Nov 2013 02:34:11 +0000 (02:34 +0000)] 
Avoid seeking on the main data table during the first loop of an UPDATE
if an index is sufficient to check the WHERE clause.

FossilOrigin-Name: 57158d9daf4d777411fffb1c1d20d89b291d9214

11 years agoFix an requirement mark in a test script so that it matches the
drh [Tue, 19 Nov 2013 00:31:25 +0000 (00:31 +0000)] 
Fix an requirement mark in a test script so that it matches the
typo-corrected requirement.  No changes to code.

FossilOrigin-Name: 072412d5e3f92c9c6548f5c86d396d3f024df3f7

11 years agoAdd comments identifing where the skip-scan option is decided in the
drh [Mon, 18 Nov 2013 19:32:15 +0000 (19:32 +0000)] 
Add comments identifing where the skip-scan option is decided in the
query planner, to aid in tuning that decision.  No changes to code.

FossilOrigin-Name: e9df04cec48bb8b4ea26ec9024a22ea42b2338eb

11 years agoFix documentation typos. No changes to code.
drh [Mon, 18 Nov 2013 18:48:50 +0000 (18:48 +0000)] 
Fix documentation typos.  No changes to code.

FossilOrigin-Name: 7caeb09c52bde4649b02b339f611c8e30f6d1c68

11 years agoFix harmless compiler warnings from clang scan-build.
drh [Mon, 18 Nov 2013 11:20:50 +0000 (11:20 +0000)] 
Fix harmless compiler warnings from clang scan-build.

FossilOrigin-Name: 8d002740bffca2a76d2dfbc1a67293d34f9de9ba

11 years agoFix a problem with the shell tool EXPLAIN indentation code and VDBE sub-programs.
dan [Mon, 18 Nov 2013 08:41:06 +0000 (08:41 +0000)] 
Fix a problem with the shell tool EXPLAIN indentation code and VDBE sub-programs.

FossilOrigin-Name: 9c8d6856253f8da06b2cb5dc6bd89b6952fa03ed

11 years agoEnable the ONEPASS optimization for DELETE, for both rowid and WITHOUT
drh [Mon, 18 Nov 2013 03:11:54 +0000 (03:11 +0000)] 
Enable the ONEPASS optimization for DELETE, for both rowid and WITHOUT
ROWID tables.

FossilOrigin-Name: 44a07afdd9b3ae2460bc963383295deb0915f899

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