]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
11 years agoMake it easy to attach a debugger the test fixture process prior to any tests being... dbgTestFixture
mistachkin [Thu, 15 Aug 2013 08:06:15 +0000 (08:06 +0000)] 
Make it easy to attach a debugger the test fixture process prior to any tests being run.

FossilOrigin-Name: c23acba11bfefc019b5945cfb345f9afcf4b6242

11 years agoFix a few more minor comment typos. No changes to code.
mistachkin [Wed, 14 Aug 2013 00:20:23 +0000 (00:20 +0000)] 
Fix a few more minor comment typos.  No changes to code.

FossilOrigin-Name: 9e999081a59b161a0a1f968fbc01a1db9ea43b93

11 years agoFix an outdated comment and a comment typo. No changes to code.
mistachkin [Tue, 13 Aug 2013 22:33:41 +0000 (22:33 +0000)] 
Fix an outdated comment and a comment typo.  No changes to code.

FossilOrigin-Name: ac336959490083ffeaaf25aaec97ecb59a2f4536

11 years agoIf the SQLITE_EXTRA_INIT function is defined, make sure it is called only
drh [Thu, 8 Aug 2013 14:38:45 +0000 (14:38 +0000)] 
If the SQLITE_EXTRA_INIT function is defined, make sure it is called only
once by the effective sqlite3_initialize() call.

FossilOrigin-Name: e2b597cafe7c8a8313b051d6a302fed54f235727

11 years agoIf the SQLITE_ALLOW_URI_AUTHORITY compile-time option is set, then allow
drh [Wed, 7 Aug 2013 23:15:52 +0000 (23:15 +0000)] 
If the SQLITE_ALLOW_URI_AUTHORITY compile-time option is set, then allow
non-localhost authorities on URI filenames and pass them through as a UNC
to the underlying VFS.

FossilOrigin-Name: 3adb6c1bfda897859dc9cf9ae7f1e6719855ee68

11 years agoAdd a guard #ifndef to test_intarray.h to prevent harm if it is #included
drh [Wed, 7 Aug 2013 14:18:45 +0000 (14:18 +0000)] 
Add a guard #ifndef to test_intarray.h to prevent harm if it is #included
more than once.  Add a comment on the closing #endif of the guards on
sqlite3.h and test_multiplex.h.

FossilOrigin-Name: 0ad83ceb79767738bd06a28840cf84da0464ab4f

11 years agoFix typos and add clarification to comments in where.c. No code changes.
drh [Wed, 7 Aug 2013 01:18:38 +0000 (01:18 +0000)] 
Fix typos and add clarification to comments in where.c.  No code changes.

FossilOrigin-Name: f8d8790ede0fcaf6c5b60ac22919c1d97c74e838

11 years agoFix a test case related to partial indices so that it works even if
drh [Tue, 6 Aug 2013 19:18:17 +0000 (19:18 +0000)] 
Fix a test case related to partial indices so that it works even if
STAT3 is disabled.

FossilOrigin-Name: 153c645025637bbff14dfce793e4b92210ded7e8

11 years agoAdjust #ifdefs in test_autoext.c so that it compiles with
drh [Tue, 6 Aug 2013 18:35:31 +0000 (18:35 +0000)] 
Adjust #ifdefs in test_autoext.c so that it compiles with
SQLITE_OMIT_LOAD_EXTENSION.  Fix compiler warnings in two other
test modules.  No changes to the core.

FossilOrigin-Name: 89930ea3c3b3bd078f641b2c5203d851083bbf1a

11 years agoUpdate the configure script to use the latest version number (3.8.0).
drh [Tue, 6 Aug 2013 18:21:21 +0000 (18:21 +0000)] 
Update the configure script to use the latest version number (3.8.0).

FossilOrigin-Name: 52e8ec5e24730efa6d89cbaf1e03bc1d5c59cc05

11 years agoAdd a testcase() macro to verify OOM coverage.
drh [Tue, 6 Aug 2013 17:24:23 +0000 (17:24 +0000)] 
Add a testcase() macro to verify OOM coverage.

FossilOrigin-Name: d43dcbc488120aeb7104ab9e6a27f62bb348bf6a

11 years agoRemove unreachable branches in expr.c, replacing them with assert() and
drh [Tue, 6 Aug 2013 16:56:44 +0000 (16:56 +0000)] 
Remove unreachable branches in expr.c, replacing them with assert() and
testcase() statements.

FossilOrigin-Name: 9103c27ceb3f4023ea3a41b679a10717d3f80210

11 years agoFor the ".import" command of the command-line shell, start a transaction
drh [Tue, 6 Aug 2013 14:36:36 +0000 (14:36 +0000)] 
For the ".import" command of the command-line shell, start a transaction
if there is not one active already.

FossilOrigin-Name: 5dcc2d91bd343cd0fac79d3c8f079a5ce534cdf7

11 years agoClean up the input reader in the command-line shell for improved legibility
drh [Tue, 6 Aug 2013 14:01:46 +0000 (14:01 +0000)] 
Clean up the input reader in the command-line shell for improved legibility
and performance.

FossilOrigin-Name: 2b1743d60171635c1e5a6ede6b4928f4671f948d

11 years agoMore than double the speed of the resolveP2Values() routine in vdbeaux.c by
drh [Tue, 6 Aug 2013 07:45:08 +0000 (07:45 +0000)] 
More than double the speed of the resolveP2Values() routine in vdbeaux.c by
moving from an extended if-else on every opcode to a switch.  Opcodes are
reordered in mkopcodesh.awk to put the switched opcodes close together,
for additional performance and to reduce code footprint.

FossilOrigin-Name: 924f7e4d7a8fa2fe9100836663f3733b6e1a9084

11 years agoPerformance optimization: Avoid calling convertCompoundSelecctToSubquery()
drh [Mon, 5 Aug 2013 22:05:02 +0000 (22:05 +0000)] 
Performance optimization: Avoid calling convertCompoundSelecctToSubquery()
on queries that do not use the UNION, EXCEPT, or INTERSECT operators.

FossilOrigin-Name: c589b2fed7beabc2337d701094c22635914d9c23

11 years agoFor the vtshim module, always zero out the xChildDestroy function pointer after calli...
mistachkin [Mon, 5 Aug 2013 21:54:17 +0000 (21:54 +0000)] 
For the vtshim module, always zero out the xChildDestroy function pointer after calling it.

FossilOrigin-Name: 240f7252c66ad3ff5ae0ef06455c1ff9bd78bbb4

11 years agoFactor all KeyInfo object allocations into a single function:
drh [Mon, 5 Aug 2013 19:11:29 +0000 (19:11 +0000)] 
Factor all KeyInfo object allocations into a single function:
sqlite3KeyInfoAlloc().  Always allocate enough space so that
sqlite3VdbeRecordCompare() can avoid checking boundaries and hence
run faster.

FossilOrigin-Name: 7301bedd94c8610568349953b18ff3575203e1b2

11 years agoImprove performance of sqlite3VdbeRecordCompare() by using an approximation
drh [Mon, 5 Aug 2013 15:32:09 +0000 (15:32 +0000)] 
Improve performance of sqlite3VdbeRecordCompare() by using an approximation
that might give false negatives and only running the more expensive exact
subexpression if the approximation fails.

FossilOrigin-Name: 28979dcd16f53e0ddca8eed74b668834e2856f03

11 years agoAdd a missing '#include "tcl.h"' to test_rtree.c.
drh [Mon, 5 Aug 2013 12:31:41 +0000 (12:31 +0000)] 
Add a missing '#include "tcl.h"' to test_rtree.c.

FossilOrigin-Name: 4b8b426f10f8ae13bf553f7adf5ae09383fa0bd4

11 years agoUpdates to requirements marks. No code changes.
drh [Fri, 2 Aug 2013 23:40:45 +0000 (23:40 +0000)] 
Updates to requirements marks.  No code changes.

FossilOrigin-Name: 213020769f310aec1591d97756b53891d0b64005

11 years agoAdd NEVER() and ALWAYS() macros on some unreachable yet prudent branches.
drh [Fri, 2 Aug 2013 20:11:19 +0000 (20:11 +0000)] 
Add NEVER() and ALWAYS() macros on some unreachable yet prudent branches.

FossilOrigin-Name: c5c0a8ab6c222185d5f9d4321e64d9f93cd36b7d

11 years agoAdd support for partial indices.
drh [Fri, 2 Aug 2013 16:41:02 +0000 (16:41 +0000)] 
Add support for partial indices.

FossilOrigin-Name: 478113f18b1d28606b107b5a0bed04cb90a82cf2

11 years agoSilently ignore database name qualifiers in CHECK constraints and in partial-indices
drh [Fri, 2 Aug 2013 14:18:18 +0000 (14:18 +0000)] 
Silently ignore database name qualifiers in CHECK constraints and in
partial index WHERE clauses.

FossilOrigin-Name: 2e8c845eb5011a2743dace333aa38383588f2080

11 years agoFix typos in documentation for SQLITE_DBSTATUS_DEFERRED_FKS .
drh [Fri, 2 Aug 2013 13:31:31 +0000 (13:31 +0000)] 
Fix typos in documentation for SQLITE_DBSTATUS_DEFERRED_FKS .
No changes to code.

FossilOrigin-Name: f3efbfcd515ad6ac833f4b26391dcc44603a96e8

11 years agoFix the CREATE INDEX statement so that trying to create a TEMP index on
drh [Thu, 1 Aug 2013 22:27:26 +0000 (22:27 +0000)] 
Fix the CREATE INDEX statement so that trying to create a TEMP index on
a non-TEMP table throws an error rather than segfaulting.

FossilOrigin-Name: e3c8935f8736d00dc83644fa21d86ca7fec6d2fc

11 years agoFix an incorrect expected result in a test case in corruptG.test.
drh [Thu, 1 Aug 2013 22:26:56 +0000 (22:26 +0000)] 
Fix an incorrect expected result in a test case in corruptG.test.

FossilOrigin-Name: 6913831ad2892fdc8331ee53426d935386eacb9e

11 years agoFix a potential buffer overread in sqlite3VdbeRecordCompare() when a
drh [Thu, 1 Aug 2013 20:26:04 +0000 (20:26 +0000)] 
Fix a potential buffer overread in sqlite3VdbeRecordCompare() when a
serial_type specifies a field that starts in bounds but is much too large
for the allocated buffer.  Mostly harmless.  The overread is unlikely to
go more than one or two bytes past the end of the buffer.

FossilOrigin-Name: e436b2f4e5c5e6b2f70e65332c0c7d618e2ef20a

11 years agoMake sure signed integer overflow does not cause a segfault while attempting
drh [Thu, 1 Aug 2013 19:17:39 +0000 (19:17 +0000)] 
Make sure signed integer overflow does not cause a segfault while attempting
to read a corrupt database where the header size varint on a record is larger
than the maximum 32-bit signed integer.

FossilOrigin-Name: c3baca99f4580652afb2c3f73036ab83796a1557

11 years agoAdd test case for the problem fixed by [127a5b776d].
dan [Thu, 1 Aug 2013 17:43:35 +0000 (17:43 +0000)] 
Add test case for the problem fixed by [127a5b776d].

FossilOrigin-Name: 65816718b59b286c11d939235a23c7325f25594b

11 years agoAn improved method for avoiding the use of the STAT3 samples to compute
drh [Thu, 1 Aug 2013 17:21:26 +0000 (17:21 +0000)] 
An improved method for avoiding the use of the STAT3 samples to compute
the estimated number of outputs when the left-most index is equality
constrained.  This check-in undoes the previous fix and applies a new one.

FossilOrigin-Name: 127a5b776d16e1e23c5b3d454f6aaea67f1ded3a

11 years agoAvoid using left-most column STAT3 samples if the left-most column has an
drh [Thu, 1 Aug 2013 16:52:50 +0000 (16:52 +0000)] 
Avoid using left-most column STAT3 samples if the left-most column has an
equality constrain and there are inequality constraints on the second column.

FossilOrigin-Name: 31b4e63b3c30fcad22340d84d6076a306f26b49e

11 years agoFix bug in the logic that determines the end of a CREATE INDEX statement.
drh [Thu, 1 Aug 2013 16:02:40 +0000 (16:02 +0000)] 
Fix bug in the logic that determines the end of a CREATE INDEX statement.
Added a VACUUM test case that exposed the bug.

FossilOrigin-Name: 2e3df0bc900c01286d3ce32c2bbf9e5293973f9b

11 years agoMore test cases and corresponding bug fixes.
drh [Thu, 1 Aug 2013 15:09:57 +0000 (15:09 +0000)] 
More test cases and corresponding bug fixes.

FossilOrigin-Name: 0c8cfdfae215c95cf167f404a1d346690b28e972

11 years agoFill out an initial implementation of the sqlite3ExprImpliesExpr() function.
drh [Thu, 1 Aug 2013 13:04:46 +0000 (13:04 +0000)] 
Fill out an initial implementation of the sqlite3ExprImpliesExpr() function.

FossilOrigin-Name: 8e07aa2ad5579aeb82174ce5bd432ddb9c058bc1

11 years agoRefactor internal function name sqlite3VdbeGetValue() to
drh [Thu, 1 Aug 2013 12:21:58 +0000 (12:21 +0000)] 
Refactor internal function name sqlite3VdbeGetValue() to
sqlite3VdbeGetBoundValue().

FossilOrigin-Name: 81834c3023876487a1188390aae850cf71683701

11 years agoFix the ANALYZE command to work with partial indices.
drh [Thu, 1 Aug 2013 04:39:17 +0000 (04:39 +0000)] 
Fix the ANALYZE command to work with partial indices.

FossilOrigin-Name: 60353124f4e965393ecd864019bdbca1999fb69e

11 years agoTest cases and bug fixes for the partial index logic.
drh [Thu, 1 Aug 2013 03:36:59 +0000 (03:36 +0000)] 
Test cases and bug fixes for the partial index logic.

FossilOrigin-Name: 6b73ae7c123801787c8994113cbeb87ee96ba653

11 years agoAdd the logic to keep partial indices up to date through DML statements and
drh [Thu, 1 Aug 2013 01:14:43 +0000 (01:14 +0000)] 
Add the logic to keep partial indices up to date through DML statements and
when new partial indices are created.  This new logic is untested except to
verify that it does not interfere with full indices.

FossilOrigin-Name: fb9044d15ad4fd6ae4a38858c0c0e6fe9d4faa25

11 years agoLimit the number of memset() calls used when determining a temporary file name on...
mistachkin [Wed, 31 Jul 2013 23:28:36 +0000 (23:28 +0000)] 
Limit the number of memset() calls used when determining a temporary file name on Windows.  Also, fix a harmless compiler warning.

FossilOrigin-Name: 136fc2931b156f91cdd76a7a009298cdf09d826a

11 years agoAdd logic to the query planner to only use partial indices if the WHERE clause
drh [Wed, 31 Jul 2013 23:22:39 +0000 (23:22 +0000)] 
Add logic to the query planner to only use partial indices if the WHERE clause
constrains the search to rows covered by the partial index.  This is just
infrastructure.  The key routine, sqlite3ExprImpliesExpr(), is currently a
no-op so that partial indices will never be used.

FossilOrigin-Name: 8ca3eac111e06a1854f878a74bffe8f20eb47f1b

11 years agoSlight modifications to path name translation handling for Cygwin.
mistachkin [Wed, 31 Jul 2013 22:39:26 +0000 (22:39 +0000)] 
Slight modifications to path name translation handling for Cygwin.

FossilOrigin-Name: 33ba1f4c5dc2ef8292adf17a32ade0cde0887d88

11 years agoUse a new error code to represent a failure to get the configured temporary directory...
mistachkin [Wed, 31 Jul 2013 22:27:16 +0000 (22:27 +0000)] 
Use a new error code to represent a failure to get the configured temporary directory on Windows.

FossilOrigin-Name: c93d891b03c626b9ed01ed5ef2f246b2d4a40a64

11 years agoThe MAX_PATH constant in windows is measured in characters, so multiple by 3
drh [Wed, 31 Jul 2013 19:55:25 +0000 (19:55 +0000)] 
The MAX_PATH constant in windows is measured in characters, so multiple by 3
to get the number of bytes assuming worst-case UTF8 pathnames.

FossilOrigin-Name: bb06e1579022c24546ac5117a99846b3c37ef59b

11 years agoResolve names in CREATE INDEX WHERE clauses and detect errors. Disallow
drh [Wed, 31 Jul 2013 19:05:22 +0000 (19:05 +0000)] 
Resolve names in CREATE INDEX WHERE clauses and detect errors.  Disallow
expressions that contain variables, subqueries, or functions.
The expression is still not used for anything, however.
still unused.

FossilOrigin-Name: f2aa7842c8b9df24294f09e2bde27b3f08c455c7

11 years agoHere begins an experimental branch for exploring the idea of a partial index.
drh [Wed, 31 Jul 2013 18:12:26 +0000 (18:12 +0000)] 
Here begins an experimental branch for exploring the idea of a partial index.
This check-in is able to parse a WHERE clause on a CREATE INDEX statement, but
does not actually do anythingn with that WHERE clause yet.

FossilOrigin-Name: 6794b2dcb48b3507caccfc7867fc185818cf8291

11 years agoReduce the size of the stack required by the codeOneLoopStart() function in
drh [Tue, 30 Jul 2013 15:10:32 +0000 (15:10 +0000)] 
Reduce the size of the stack required by the codeOneLoopStart() function in
where.c.

FossilOrigin-Name: eb6d4278b8516e0571269049d1eaa55066f51b1a

11 years agoFor the MSVC makefile, recompile vdbe.lo and parse.lo first.
mistachkin [Mon, 29 Jul 2013 19:03:20 +0000 (19:03 +0000)] 
For the MSVC makefile, recompile vdbe.lo and parse.lo first.

FossilOrigin-Name: 9e819f0f12b6f2a8e0e7a90251b3115ff1595f25

11 years agoComment and preprocessor macro cleanup.
drh [Mon, 29 Jul 2013 15:54:06 +0000 (15:54 +0000)] 
Comment and preprocessor macro cleanup.

FossilOrigin-Name: c0809b5e32c2ca0600098447a573e718eaeb319f

11 years agoIn main.mk, always recompile vdbe.o and parse.o first, since changes to either
drh [Mon, 29 Jul 2013 13:51:54 +0000 (13:51 +0000)] 
In main.mk, always recompile vdbe.o and parse.o first, since changes to either
parse.y or vdbe.c will cause all files to be recompiled and if there are
syntax errors in vdbe.c or parse.y we want to hit them early in the compile
process.

FossilOrigin-Name: a94a66d10f160ee79fffa8527655c2cc4a0c7103

11 years agoIn the command-line shell, work around the fact that popen() and pclose()
drh [Thu, 25 Jul 2013 17:07:03 +0000 (17:07 +0000)] 
In the command-line shell, work around the fact that popen() and pclose()
are not defined in stdio.h. in C89 and later.

FossilOrigin-Name: 8bcbb33fd0a970e16a920e1d35571836dbb9ba50

11 years agoFix a typo in main.c: SQLITE_DEAULT_AUTOMATIC_INDEX -> SQLITE_DEFAULT_AUTOMATIC_INDEX
dan [Thu, 25 Jul 2013 16:41:39 +0000 (16:41 +0000)] 
Fix a typo in main.c: SQLITE_DEAULT_AUTOMATIC_INDEX -> SQLITE_DEFAULT_AUTOMATIC_INDEX

FossilOrigin-Name: cc78e21c7794948a187e694773735058fc7460d7

11 years agoEnhance the progress handler so that it keeps track of the number of VDBE
drh [Thu, 25 Jul 2013 16:27:51 +0000 (16:27 +0000)] 
Enhance the progress handler so that it keeps track of the number of VDBE
cycles across sqlite3_step() calls and issues callbacks when the cumulative
instruction count reaches threshold.

FossilOrigin-Name: 4698a82ef855a8e56163622283fb25317d7efdc4

11 years agoAdd 'queryplantest' target to the MSVC makefile.
mistachkin [Sat, 20 Jul 2013 00:34:31 +0000 (00:34 +0000)] 
Add 'queryplantest' target to the MSVC makefile.

FossilOrigin-Name: ad0551e039ccaa9e7a28682b756b56ac2b8fef0d

11 years agoFixes to test numbering.
mistachkin [Fri, 19 Jul 2013 23:58:41 +0000 (23:58 +0000)] 
Fixes to test numbering.

FossilOrigin-Name: f755b4b21c885f3e897c2a79fc7ac1220210e653

11 years agoRemove unused "codec" code from the command-line shell.
drh [Thu, 18 Jul 2013 20:28:29 +0000 (20:28 +0000)] 
Remove unused "codec" code from the command-line shell.

FossilOrigin-Name: 37abfe0c1e5da63342389c527a9f7cbe0f8392d9

11 years agoImproved documentation for sqlite3_set_auxdata().
drh [Thu, 18 Jul 2013 18:45:53 +0000 (18:45 +0000)] 
Improved documentation for sqlite3_set_auxdata().
Ticket [406d3b2ef91c].

FossilOrigin-Name: 62465ecba7431e1d71e17a61f1af7dc65fe4fe97

11 years agoEnsure that all auxiliary data registered by calls to sqlite3_set_auxdata() is destro...
dan [Thu, 18 Jul 2013 18:29:24 +0000 (18:29 +0000)] 
Ensure that all auxiliary data registered by calls to sqlite3_set_auxdata() is destroyed when the VM is halted.

FossilOrigin-Name: 153deac8faca3bcc95f6f37e500b659b39b3e872

11 years agoFix a typo in the previous commit. typo
dan [Thu, 18 Jul 2013 18:28:04 +0000 (18:28 +0000)] 
Fix a typo in the previous commit.

FossilOrigin-Name: cd9096e64b86c8d45f6744e6eb6ced2aa1a18279

11 years agoEnsure that all auxiliary data registered by calls to sqlite3_set_auxdata() is destro...
dan [Thu, 18 Jul 2013 17:12:08 +0000 (17:12 +0000)] 
Ensure that all auxiliary data registered by calls to sqlite3_set_auxdata() is destroyed when the VM is halted. Partial fix for [406d3b2ef9].

FossilOrigin-Name: 71effa59c98d167e6e4b269e59ad5f468e664ac1

11 years agoFix a 8-byte alignment problem in the query planner that might cause
drh [Thu, 18 Jul 2013 14:50:56 +0000 (14:50 +0000)] 
Fix a 8-byte alignment problem in the query planner that might cause
problems on sparc when compiled with -m32.

FossilOrigin-Name: 5dcffa671f592ae9355628afa439ae9a2d26f0cd

11 years agoDocumentation changes to warn that sqlite3_set_auxdata() might call the
drh [Thu, 18 Jul 2013 14:16:48 +0000 (14:16 +0000)] 
Documentation changes to warn that sqlite3_set_auxdata() might call the
destructor even before it returns.  Also fix the regexp extension to deal
with that case.  Ticket [406d3b2ef91c].

FossilOrigin-Name: 7acc8cd32d593a473c9e9adaf323220a7a46480a

11 years agoFix copy/paste errors in comments in the transitive_closure virtual table.
drh [Wed, 17 Jul 2013 21:08:49 +0000 (21:08 +0000)] 
Fix copy/paste errors in comments in the transitive_closure virtual table.
No changes to code.

FossilOrigin-Name: b1b0de29fdf7de83722bb85b748f058b9901e77a

11 years agoEnhance the sqlite3_analyzer tool to give reports on the sizes of individual
drh [Wed, 17 Jul 2013 18:12:15 +0000 (18:12 +0000)] 
Enhance the sqlite3_analyzer tool to give reports on the sizes of individual
indices.

FossilOrigin-Name: 3b4096cc8a3b4517cdf49dcfe1f33279a5eb8efb

11 years agoClear the error string pointer in sqlite3_vtab object after the error string
drh [Wed, 17 Jul 2013 11:54:47 +0000 (11:54 +0000)] 
Clear the error string pointer in sqlite3_vtab object after the error string
is transferred to SQLite.  Ticket [78588b938a11].

FossilOrigin-Name: 64bf8148b84e0ebb45c12b629f49bc9b316aceba

11 years agoMake sure the sqlite3_prepare16 and sqlite3_prepare16_v2 interfaces do not
drh [Tue, 16 Jul 2013 23:26:43 +0000 (23:26 +0000)] 
Make sure the sqlite3_prepare16 and sqlite3_prepare16_v2 interfaces do not
read past a zero-terminator if the nBytes parameter is too large.

FossilOrigin-Name: 20dba3a7fb3e7078b95af3beca948467a3af6a89

11 years agoEnhance the query planner so that it looks at multiple solutions to OR
drh [Tue, 16 Jul 2013 21:31:23 +0000 (21:31 +0000)] 
Enhance the query planner so that it looks at multiple solutions to OR
expressions in the WHERE clause.

FossilOrigin-Name: 5e19d054105fb16ff52d265d48cc87a418603f6f

11 years agoAdd the sqlite3_cancel_auto_extension(X) interface which will undo a prior
drh [Mon, 15 Jul 2013 17:02:28 +0000 (17:02 +0000)] 
Add the sqlite3_cancel_auto_extension(X) interface which will undo a prior
call to sqlite3_auto_extension(X).

FossilOrigin-Name: cdce87eb889a43dafcc560d5f97ab517d0266860

11 years agoMake sure the shell does not try to put a zero terminator on the end of an
drh [Fri, 12 Jul 2013 21:09:24 +0000 (21:09 +0000)] 
Make sure the shell does not try to put a zero terminator on the end of an
unallocated zero-length string when running ".import" on an empty file.

FossilOrigin-Name: 92adaee5bd31c152dbc1592f4aeb5d8da957a1ea

11 years agoChange the description of how sqlite3_progress_handler() works so that
drh [Thu, 11 Jul 2013 19:04:23 +0000 (19:04 +0000)] 
Change the description of how sqlite3_progress_handler() works so that
the N parameter is "approximate".  This aligns with the current implementation.
This is a documentation change only.  No changes to code.

FossilOrigin-Name: 7d829bdea3adcda50fbe930acb4e1ce73fd874e6

11 years agoAdd the experimental "query_only" pragma.
drh [Thu, 11 Jul 2013 15:22:31 +0000 (15:22 +0000)] 
Add the experimental "query_only" pragma.

FossilOrigin-Name: 6557c407983b067449deb76bc4c5248de64e07dc

11 years agoAdd the "defer_foreign_keys" pragma and the SQLITE_DBSTATUS_DEFERRED_FKS
drh [Thu, 11 Jul 2013 15:03:32 +0000 (15:03 +0000)] 
Add the "defer_foreign_keys" pragma and the SQLITE_DBSTATUS_DEFERRED_FKS
value for sqlite3_db_status().  This is a cherry-pick of a sequence of five
checkins in the sessions branch between [1d44e5d3c2] and [d39e65fe70].

FossilOrigin-Name: 527121ac3cdc96ac33ad975c227a6685a2f7e999

11 years agoFix harmless compiler warnings in the progress callback logic.
drh [Wed, 10 Jul 2013 18:14:29 +0000 (18:14 +0000)] 
Fix harmless compiler warnings in the progress callback logic.

FossilOrigin-Name: 908141d5bf7a9ad8f40c2332476847733eca7fdc

11 years agoExperimental "PRAGMA query_only=BOOLEAN" statement that is able to turn query_only
drh [Wed, 10 Jul 2013 13:33:49 +0000 (13:33 +0000)] 
Experimental "PRAGMA query_only=BOOLEAN" statement that is able to turn
write capabilities on and off.

FossilOrigin-Name: ece960c496717a3a6c25526ef77dd76b08d607bc

11 years agoRun progress callback checks less frequently in the main VDBE evaluation
drh [Wed, 10 Jul 2013 03:05:14 +0000 (03:05 +0000)] 
Run progress callback checks less frequently in the main VDBE evaluation
loop.  This makes up for the extra CPU cycles used to increment the cycle
counter for SQLITE_STMTSTATUS_VM_STEP.

FossilOrigin-Name: 3e8b02011db2f393d4850115a471709b0a88594f

11 years agoAdjust the costs in the xBestIndex function of the spellfix1 virtual table
drh [Tue, 9 Jul 2013 15:56:44 +0000 (15:56 +0000)] 
Adjust the costs in the xBestIndex function of the spellfix1 virtual table
to force the use of the MATCH term if it is available.

FossilOrigin-Name: f003bea9fe1b79e2b4d18fbef86c1d8f0f60e4b6

11 years agoModify several extensions to use the new exported function naming.
drh [Tue, 9 Jul 2013 12:36:30 +0000 (12:36 +0000)] 
Modify several extensions to use the new exported function naming.
Fix some shared library compilation issues.

FossilOrigin-Name: 1e39f85077f1f2b96c3a656c5b6334bafb005908

12 years agoMake sure the schema is verified prior to processing a "WHERE 0" on the
drh [Tue, 9 Jul 2013 03:04:32 +0000 (03:04 +0000)] 
Make sure the schema is verified prior to processing a "WHERE 0" on the
first term of a compound SELECT statement.
Fix for ticket [490a4b723562429]

FossilOrigin-Name: 52a49cbc1621094b2fe2b021209b768d29e0426b

12 years agoMake sure an adequate number of digits are shown for binary-to-text rendering
drh [Mon, 8 Jul 2013 22:33:20 +0000 (22:33 +0000)] 
Make sure an adequate number of digits are shown for binary-to-text rendering
of very small floating point values.

FossilOrigin-Name: 776e65f98ce80a8ed56cb73ef56c751702698612

12 years agoFix an adverse interaction between the IS NOT NULL optimization (available
drh [Mon, 8 Jul 2013 21:12:57 +0000 (21:12 +0000)] 
Fix an adverse interaction between the IS NOT NULL optimization (available
only with SQLITE_ENABLE_STAT3) and the transitive constraint processing.
Fix for ticket [d805526eae253]

FossilOrigin-Name: 3b30b75b342bb6b424ad2bf7cd841b2c88bdad44

12 years agoAdd an optional 5th parameter to the next_char() function that is the
drh [Mon, 8 Jul 2013 01:27:43 +0000 (01:27 +0000)] 
Add an optional 5th parameter to the next_char() function that is the
collating sequence to use for comparison.

FossilOrigin-Name: 9415db6ef255d27ca8473c17e65749a197c30455

12 years agoFixes for test cases running in the "mmap" permutation.
dan [Sat, 6 Jul 2013 18:07:57 +0000 (18:07 +0000)] 
Fixes for test cases running in the "mmap" permutation.

FossilOrigin-Name: cdb97d41abf4a3b8e22fa8ca9f3aab4a3f968d27

12 years agoDrop any existing mapping of the database file when exiting the pager "error state...
dan [Sat, 6 Jul 2013 17:57:39 +0000 (17:57 +0000)] 
Drop any existing mapping of the database file when exiting the pager "error state", as it may at this point be too large for the database file. Do not invoke file-control MMAP_LIMIT if the database file handle does not support xFetch and xUnfetch (on the grounds that xUnfetch(0) calls to invalidate the mapping cannot be made).

FossilOrigin-Name: 0ae7e75b215b0d75920769da9146c54ce2ad3ce0

12 years agoFix two test script problems revealed by permutations.test.
dan [Fri, 5 Jul 2013 19:16:58 +0000 (19:16 +0000)] 
Fix two test script problems revealed by permutations.test.

FossilOrigin-Name: 60cf7e44871ca8d2136ddad02188f0b9f9c380c1

12 years agoReplace an erroneous SQLITE_OMIT_VIRTUAL_TABLE in vdbeaux.c with SQLITE_OMIT_WAL...
dan [Fri, 5 Jul 2013 16:54:30 +0000 (16:54 +0000)] 
Replace an erroneous SQLITE_OMIT_VIRTUAL_TABLE in vdbeaux.c with SQLITE_OMIT_WAL. Also fix some test script problems.

FossilOrigin-Name: ff8c3f7840a0a8d87453b94b9884ee26d5d92da5

12 years agoAdd missing "static" qualifier to functions in where.c.
dan [Fri, 5 Jul 2013 11:10:54 +0000 (11:10 +0000)] 
Add missing "static" qualifier to functions in where.c.

FossilOrigin-Name: 5c906e914b63eb00e62c6c2a535e234a75d95030

12 years agoMake a couple of implicit casts explicit to fix compiler warnings.
dan [Fri, 5 Jul 2013 10:46:08 +0000 (10:46 +0000)] 
Make a couple of implicit casts explicit to fix compiler warnings.

FossilOrigin-Name: 9676280a9387b8bfba82cfc0087318863d05d4f3

12 years agoModify several extensions to use the new exported function naming. Fix some shared... extRefactor
mistachkin [Thu, 4 Jul 2013 23:53:56 +0000 (23:53 +0000)] 
Modify several extensions to use the new exported function naming.  Fix some shared library compilation issues.

FossilOrigin-Name: f2ab8747825ab5131ffab174aa0ffe5e474f6811

12 years agoRemove a surplus local variable
drh [Tue, 2 Jul 2013 15:25:22 +0000 (15:25 +0000)] 
Remove a surplus local variable

FossilOrigin-Name: 91bc840eea2099273bd2c5d41a8410d628986643

12 years agoFix a minor typo in a comment in where.c.
dan [Tue, 2 Jul 2013 10:06:15 +0000 (10:06 +0000)] 
Fix a minor typo in a comment in where.c.

FossilOrigin-Name: 4a9d51e792d7c4297bd18af7b7c757c93a3a1cd1

12 years agoFix harmless typos in comments of two extensions.
drh [Tue, 2 Jul 2013 00:06:31 +0000 (00:06 +0000)] 
Fix harmless typos in comments of two extensions.

FossilOrigin-Name: 1c3ed47b71844d062c4e9a315f2f368b382684cc

12 years agoAdd a query planner test case submitted by Elan Feingold and
drh [Mon, 1 Jul 2013 20:02:31 +0000 (20:02 +0000)] 
Add a query planner test case submitted by Elan Feingold and
based on the Plex project.

FossilOrigin-Name: 3d49c593dc12d72323ca525372a15e58c591940b

12 years agoAdd a missing test that prevented double LEFT JOINs with transitive
drh [Mon, 1 Jul 2013 17:27:19 +0000 (17:27 +0000)] 
Add a missing test that prevented double LEFT JOINs with transitive
constraints from working correctly.  Fix for ticket [868145d012].

FossilOrigin-Name: 72919ec34f0d663d551c1070285ad93b932bcb74

12 years agoFurther minor comment corrections and enhancements in where.c.
drh [Mon, 1 Jul 2013 11:05:50 +0000 (11:05 +0000)] 
Further minor comment corrections and enhancements in where.c.

FossilOrigin-Name: 0d68d4d018e73dcbbc08786071aac6228fca1a8c

12 years agoMake a trivial comment fix in where.c.
drh [Mon, 1 Jul 2013 10:38:35 +0000 (10:38 +0000)] 
Make a trivial comment fix in where.c.

FossilOrigin-Name: 0ffaab3b9c97f4dba0f0ca6e146c8dc2775f7b1c

12 years agoFix an issue in the command-line shell with CSV import of rows with
drh [Sun, 30 Jun 2013 20:24:26 +0000 (20:24 +0000)] 
Fix an issue in the command-line shell with CSV import of rows with
empty columns.

FossilOrigin-Name: 60b65e5ee3828c2a814bf035b57b3e8681af9397

12 years agoFix the build of the command-line shell on windows. Windows uses "_pclose"
drh [Sat, 29 Jun 2013 15:40:22 +0000 (15:40 +0000)] 
Fix the build of the command-line shell on windows.  Windows uses "_pclose"
rather than "pclose" as the pointer to the function that closes a popen pipe.

FossilOrigin-Name: b003b2b2b6ddbfc6ec508b47904e6d095c5f6940

12 years agoIssue the new SQLITE_WARNING_AUTOINDEX warning on the SQLite log whenever
drh [Fri, 28 Jun 2013 23:55:45 +0000 (23:55 +0000)] 
Issue the new SQLITE_WARNING_AUTOINDEX warning on the SQLite log whenever
an automatic index is created.

FossilOrigin-Name: 338826ef3f8a209b14f8d42370855cab9ac9ed45

12 years agoAdd the SQLITE_DEFAULT_AUTOMATIC_INDEX compile-time option, which if set to
drh [Fri, 28 Jun 2013 21:12:20 +0000 (21:12 +0000)] 
Add the SQLITE_DEFAULT_AUTOMATIC_INDEX compile-time option, which if set to
zero turns automatic indices off by default.  Increase the estimated cost
of an automatic index.  Additional minor refactoring of the automatic
index code.

FossilOrigin-Name: 459b3179023c2c45994ea4acbf34ed5f87cf3c18

12 years agoAllow read transactions to be freely opened and closed by SQL statements run from...
dan [Fri, 28 Jun 2013 19:41:43 +0000 (19:41 +0000)] 
Allow read transactions to be freely opened and closed by SQL statements run from within the implementation of user-functions if the user-function is called by a SELECT statement that does not access any database tables (e.g. "SELECT user_function();").

FossilOrigin-Name: f308c4851726b4b75636f714466f2314f56e3ec0