]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
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 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 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 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

12 years agoAdd a bit to the SQLITE_TESTCTRL_OPTIMIZATIONS option for sqlite3_file_control()
drh [Fri, 28 Jun 2013 17:29:25 +0000 (17:29 +0000)] 
Add a bit to the SQLITE_TESTCTRL_OPTIMIZATIONS option for sqlite3_file_control()
that will disable the use of SQLITE_STAT3 information in the query planner.

FossilOrigin-Name: 60c19b86797fb8a37f175545929883ebeff7f307

12 years agoFix an issue with the OmitNoopJoin optimization and add test cases that
drh [Fri, 28 Jun 2013 13:43:33 +0000 (13:43 +0000)] 
Fix an issue with the OmitNoopJoin optimization and add test cases that
are specifically for that optimization.

FossilOrigin-Name: 5480d124b74c9adaacc4fa9cb81560865b44f3e1

12 years agoRefactor the Vdbe.noIO field as Vdbe.bIsReader. The meaning is inverted.
drh [Fri, 28 Jun 2013 01:24:57 +0000 (01:24 +0000)] 
Refactor the Vdbe.noIO field as Vdbe.bIsReader. The meaning is inverted.

FossilOrigin-Name: 59f98c5c241e5a61cd5b6d0e69b55a6b44c5cafc

12 years agoRefactor names of fields in the sqlite3 object: "activeVdbeCnt" becomes
drh [Thu, 27 Jun 2013 23:54:02 +0000 (23:54 +0000)] 
Refactor names of fields in the sqlite3 object:  "activeVdbeCnt" becomes
"nVdbeActive".  Related fields becomes "nVdbeRead", "nVdbeWrite", and
"nVdbeExec".

FossilOrigin-Name: 14f796963474350e7aee8d3757acd3315fe78e4f

12 years agoFix an error in e_expr.test.
dan [Thu, 27 Jun 2013 19:12:53 +0000 (19:12 +0000)] 
Fix an error in e_expr.test.

FossilOrigin-Name: fd4ece18c9be7019e60da3cb0a200c5b1903fed4

12 years agoMake sure that sqlite3_stmt_readonly reports false for
drh [Thu, 27 Jun 2013 17:40:30 +0000 (17:40 +0000)] 
Make sure that sqlite3_stmt_readonly reports false for
PRAGMA journal_mode and PRAGMA wal_checkpoint.  Ticket [a589ec069e3].
Also keep track of whether a prepared statement does no reading or
writing.

FossilOrigin-Name: 1937fd8eec2c1da95a782d9dc63926d846b06bdc

12 years agoAdd a test to ensure that if BEGIN IMMEDIATE fails with SQLITE_BUSY, it does not...
dan [Thu, 27 Jun 2013 14:24:15 +0000 (14:24 +0000)] 
Add a test to ensure that if BEGIN IMMEDIATE fails with SQLITE_BUSY, it does not leave the user with an open read transaction (unless one was already open).

FossilOrigin-Name: 22bced36f0f121f29d94f1f9eab45c8731517a53

12 years agoIf the filename argument to the ".import" command in the command-line shell
drh [Thu, 27 Jun 2013 14:07:53 +0000 (14:07 +0000)] 
If the filename argument to the ".import" command in the command-line shell
begins with '|' then treat it as an input pipe rather than a file.

FossilOrigin-Name: 4c02b344f5c6f6fb1c61b79d51063a1e0e2d75c0

12 years agoImproved handling of backslash escapes on double-quoted arguments to
drh [Thu, 27 Jun 2013 13:26:55 +0000 (13:26 +0000)] 
Improved handling of backslash escapes on double-quoted arguments to
dot-commands in the command-line shell.

FossilOrigin-Name: 656a1fe5dd670e6ce7173ed3ce3392c0151641a0

12 years agoThe undocumented and unsupported ".selftest" command in the command-line
drh [Thu, 27 Jun 2013 13:01:21 +0000 (13:01 +0000)] 
The undocumented and unsupported ".selftest" command in the command-line
shell utility is now only available if compiled with SQLITE_DEBUG.  Also
fix a windows compiler warning in that command.

FossilOrigin-Name: e88fd5b22198edfc6f91390194bdde07ca06ba35

12 years agoAdd extended error code SQLITE_BUSY_SNAPSHOT - returned in WAL mode when a read-trans...
dan [Thu, 27 Jun 2013 11:46:27 +0000 (11:46 +0000)] 
Add extended error code SQLITE_BUSY_SNAPSHOT - returned in WAL mode when a read-transaction cannot be upgraded to a write-transaction because it is reading from a snapshot other than the most recently committed.

FossilOrigin-Name: 361c22969aa75340ed696e00e3dc5d17d5493bee

12 years agoUpdate the ".import" command of the command-line shell so that it can
drh [Wed, 26 Jun 2013 22:46:00 +0000 (22:46 +0000)] 
Update the ".import" command of the command-line shell so that it can
accept field values that span multiple lines and so that it issues
error messages if the input text does not strictly conform to RFC4180.

FossilOrigin-Name: 93f632152e464a89322a0130adaf9f342411bf7d

12 years agoAdd the "vtshim" extension, implementing a wrapper around the virtual
drh [Wed, 26 Jun 2013 18:04:19 +0000 (18:04 +0000)] 
Add the "vtshim" extension, implementing a wrapper around the virtual
table interface to make it Disposable for the CLR.  No changes to the
core.

FossilOrigin-Name: 6c3839ef311a53076650c6479c932e545a26b96f

12 years agoUpdate the boundary3.tcl script so that it can be run with tcl 8.5 or 8.6 to regenera...
dan [Wed, 26 Jun 2013 16:30:26 +0000 (16:30 +0000)] 
Update the boundary3.tcl script so that it can be run with tcl 8.5 or 8.6 to regenerate boundary3.test.

FossilOrigin-Name: ebac5afa471526dffc8026e66753263476137a3b

12 years agoAdd the SQLITE_STMTSTATUS_VM_STEPS option for sqlite3_stmt_status().
drh [Wed, 26 Jun 2013 13:22:28 +0000 (13:22 +0000)] 
Add the SQLITE_STMTSTATUS_VM_STEPS option for sqlite3_stmt_status().

FossilOrigin-Name: bd4267f17bbf5d01fb3f12a5a06e94fcbcbd785c

12 years agoOmit tables from the FROM clause of a join if their presence makes no difference
drh [Wed, 26 Jun 2013 11:49:45 +0000 (11:49 +0000)] 
Omit tables from the FROM clause of a join if their presence makes no difference
in the final output.

FossilOrigin-Name: 6505e2ab0200736c525b5cfcf1cb62c0bd4d18ee

12 years agoCut over the next generation query planner. Increase the version number
drh [Wed, 26 Jun 2013 11:43:18 +0000 (11:43 +0000)] 
Cut over the next generation query planner.  Increase the version number
to 3.8.0.

FossilOrigin-Name: 0fe31f60cadc5fe5a9d87e110bfaed5fd026cba1

12 years agoFix an uninitialized variable detected by valgrind. Unclear whether or not nextgen-query-plan-exp
drh [Wed, 26 Jun 2013 00:34:13 +0000 (00:34 +0000)] 
Fix an uninitialized variable detected by valgrind.  Unclear whether or not
this should apply to trunk.

FossilOrigin-Name: 19ab4811d542ba781aeb6a4eb3c74642677225e1

12 years agoAdd a new (experimental) sqlite3_stmt_status() verb that returns the number status-vm-step
drh [Tue, 25 Jun 2013 22:01:22 +0000 (22:01 +0000)] 
Add a new (experimental) sqlite3_stmt_status() verb that returns the number
of VM steps.

FossilOrigin-Name: f1366bab737a3ac2ea20a0ec014cc306d7ded8a5

12 years agoAdd the ability to disable the omit-join-table optimization for testing omit-join-table-opt
drh [Sat, 22 Jun 2013 15:44:26 +0000 (15:44 +0000)] 
Add the ability to disable the omit-join-table optimization for testing
purposes.

FossilOrigin-Name: d929df9b1ba214c27d8c437099a53ee9b07aa169

12 years agoEnhance error message handling for the vtshim module. disposable-vtable
mistachkin [Fri, 21 Jun 2013 19:39:51 +0000 (19:39 +0000)] 
Enhance error message handling for the vtshim module.

FossilOrigin-Name: b4a0d5327addd90bef758e6a1403ac69f61b3886

12 years agoRemove an unused function declaration from the FTS3 source code.
drh [Fri, 21 Jun 2013 18:36:44 +0000 (18:36 +0000)] 
Remove an unused function declaration from the FTS3 source code.

FossilOrigin-Name: 096ae1d8f9a08f92daedece6b0615f4d22b05023

12 years agoMerge the fts4-notindexed branch with the trunk.
dan [Fri, 21 Jun 2013 18:29:49 +0000 (18:29 +0000)] 
Merge the fts4-notindexed branch with the trunk.

FossilOrigin-Name: 361084e1eb281e985568d19fe217263be92be31d

12 years agoAdd a few more tests for the fts4 notindexed option. fts4-notindexed
dan [Fri, 21 Jun 2013 18:18:23 +0000 (18:18 +0000)] 
Add a few more tests for the fts4 notindexed option.

FossilOrigin-Name: b53c0c41f97c7ddaeea61f0e6035d1c4747db3f7

12 years agoAdd the "notindexed" option to fts4.
dan [Fri, 21 Jun 2013 17:30:47 +0000 (17:30 +0000)] 
Add the "notindexed" option to fts4.

FossilOrigin-Name: 8ff2b8f5948ccddce70102e6d68d464c66e4f7ca

12 years agoOnly eliminate inner loops of a JOIN if they are the RHS of a LEFT JOIN
drh [Fri, 21 Jun 2013 02:15:48 +0000 (02:15 +0000)] 
Only eliminate inner loops of a JOIN if they are the RHS of a LEFT JOIN
and if they give no more than a single result.  This appears to give correct
answers in all cases.

FossilOrigin-Name: d7a25cc79794817504ca1a4262008a68b2a4dece

12 years agoAttempt to disable inner loops of a join that do not generate output.
drh [Fri, 21 Jun 2013 02:05:06 +0000 (02:05 +0000)] 
Attempt to disable inner loops of a join that do not generate output.
This does not work, since the inner loops might run zero times and thus
inhibit all output.  Needs to be enhanced to work only for LEFT JOINs
or when we know that the inner loop will always run at least once.

FossilOrigin-Name: ca839723a21bb13d3e0666a672c15c6f3a267c2f

12 years agoModify the query planner interface so that it always passes in the result set.
drh [Fri, 21 Jun 2013 00:35:37 +0000 (00:35 +0000)] 
Modify the query planner interface so that it always passes in the result set.
This is the first step toward adding an optimization that will omit tables
from a join that do not contribute to the result.

FossilOrigin-Name: 2c2577e69ccb47f1af674a755e71221e2ca0b322

12 years agoAdd a NEVER() macro and an explanation comment around an unreachable branch
drh [Thu, 20 Jun 2013 17:32:28 +0000 (17:32 +0000)] 
Add a NEVER() macro and an explanation comment around an unreachable branch
in the STAT3 logic.

FossilOrigin-Name: 604c3c5de6fd8f8a569aa9ed981055a5b0123ba1

12 years agoPull in the posix_fallocate() change from trunk.
drh [Thu, 20 Jun 2013 14:17:39 +0000 (14:17 +0000)] 
Pull in the posix_fallocate() change from trunk.

FossilOrigin-Name: d94db3fd921890ab1d6414ab629410ae50779686

12 years agoDisable posix_fallocate() for all systems, all the time, unless the
drh [Thu, 20 Jun 2013 14:07:37 +0000 (14:07 +0000)] 
Disable posix_fallocate() for all systems, all the time, unless the
HAVE_POSIX_FALLOCATE compile-time macro is supplied.

FossilOrigin-Name: b674462243138fcee192ef05d434665e30c681c4

12 years agoThe vtshim xCreate and xConnect functions need to store the pAux pointer into the...
mistachkin [Thu, 20 Jun 2013 01:27:51 +0000 (01:27 +0000)] 
The vtshim xCreate and xConnect functions need to store the pAux pointer into the newly created vtable object.  Style fixes.

FossilOrigin-Name: 43913c7bd5409791916dfa268258d22f34731273

12 years agoIntegration adjustments for the vtshim module.
mistachkin [Thu, 20 Jun 2013 00:20:39 +0000 (00:20 +0000)] 
Integration adjustments for the vtshim module.

FossilOrigin-Name: bf2e28ddb292ef0b9a1262ec249aed3243dcfb20

12 years agoMerge in trunk changes to os_unix.c that allow the code to build on
drh [Wed, 19 Jun 2013 23:48:35 +0000 (23:48 +0000)] 
Merge in trunk changes to os_unix.c that allow the code to build on
unix platforms that lack posix_fallocate().

FossilOrigin-Name: bf5764067ab848e19e5971cbdf892c633495e325

12 years agoAdd in the cost of doing a table lookup on OR searches. Make test case
drh [Wed, 19 Jun 2013 18:01:44 +0000 (18:01 +0000)] 
Add in the cost of doing a table lookup on OR searches.  Make test case
changes to deal with difference in STAT3 behavior.

FossilOrigin-Name: d97898e8e3990ae8c1882c9102b57692d8810730