]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
9 years agoAdd the json_quote() function to the JSON1 extension. json_quote
drh [Fri, 17 Jun 2016 13:01:51 +0000 (13:01 +0000)] 
Add the json_quote() function to the JSON1 extension.

FossilOrigin-Name: 2c3714aebf5e40e3728877a235b3c1f93defa33e

9 years agoAdd a missing OP_ColumnsUsed opcode to code for expressions like "? IN (SELECT ....
dan [Thu, 16 Jun 2016 17:14:02 +0000 (17:14 +0000)] 
Add a missing OP_ColumnsUsed opcode to code for expressions like "? IN (SELECT ...)" in cases where expression can use an index that may contain NULL values.

FossilOrigin-Name: 0b1579caf06a2c42433b8bc9dc28c9ad381aa07c

9 years agoFix a typo in a comment on the SrcList object.
drh [Thu, 16 Jun 2016 11:16:53 +0000 (11:16 +0000)] 
Fix a typo in a comment on the SrcList object.

FossilOrigin-Name: 48b555c42de1cbc031fb6c2c93ef170e491c7d76

9 years agoFix RBU so that it builds with -DSQLITE_ENABLE_8_3_NAMES.
drh [Mon, 13 Jun 2016 19:58:46 +0000 (19:58 +0000)] 
Fix RBU so that it builds with -DSQLITE_ENABLE_8_3_NAMES.
Fix "PRAGMA compile_options" for SQLITE_ENABLE_8_3_NAMES such that it reports
the numeric setting: "1" or "2".

FossilOrigin-Name: 0230ca17ba20ecd3d213788ad6891973d52a7b72

9 years agoFix the declaration of the table implemented by DBSTAT so that it uses
drh [Mon, 13 Jun 2016 15:59:37 +0000 (15:59 +0000)] 
Fix the declaration of the table implemented by DBSTAT so that it uses
correct datatypes.

FossilOrigin-Name: a1e1cdc51d1c68502f43ac72c28ba87cb1916a0d

9 years agoFix an incorrect assert() in the btree logic.
drh [Mon, 13 Jun 2016 12:51:20 +0000 (12:51 +0000)] 
Fix an incorrect assert() in the btree logic.

FossilOrigin-Name: fcf6114be94b260641e7c78a58db16a31ac5ab35

9 years agoFix the "onecolumn" and "exists" methods of the TCL interface so that they
drh [Mon, 13 Jun 2016 12:34:38 +0000 (12:34 +0000)] 
Fix the "onecolumn" and "exists" methods of the TCL interface so that they
work in combination with the "profile" callback.

FossilOrigin-Name: d362ba157f993fc74a590cf15a9a2fa589278dd7

9 years agoEnhance "PRAGMA table_info" to that it provides information about eponymous
drh [Fri, 10 Jun 2016 22:49:01 +0000 (22:49 +0000)] 
Enhance "PRAGMA table_info" to that it provides information about eponymous
virtual tables.

FossilOrigin-Name: 53a1e5d51304cb3de700c1807a2c945a40240576

9 years agoPrefer to use partial indexes for full table scans when that is possible.
drh [Wed, 8 Jun 2016 18:07:21 +0000 (18:07 +0000)] 
Prefer to use partial indexes for full table scans when that is possible.

FossilOrigin-Name: fe1874321ba31cec9ae65387920c33d8d0178ed8

9 years agoAdd the "dbhash.exe" utility program that computes a SHA1 hash over the
drh [Wed, 8 Jun 2016 14:04:50 +0000 (14:04 +0000)] 
Add the "dbhash.exe" utility program that computes a SHA1 hash over the
invariant content of an SQLite database file.  Free space in the file, the
page size, auto_vacuum status, text encoding, and so forth do not change the
hash.  Only the content matters.

FossilOrigin-Name: f48a4ad33ecd4a86f5529596ff11829ba38b0875

9 years agoFix an undersized buffer in the SHA1 implementation. dbhash
drh [Wed, 8 Jun 2016 13:59:35 +0000 (13:59 +0000)] 
Fix an undersized buffer in the SHA1 implementation.

FossilOrigin-Name: fb2768154c513881886e89801e906bea959197b3

9 years agoFix the dbhash utility so that it ignores the root page number when hashing
drh [Wed, 8 Jun 2016 13:49:28 +0000 (13:49 +0000)] 
Fix the dbhash utility so that it ignores the root page number when hashing
the sqlite_master table.  Add new command-line options.  Add the ability to
hash multiple databases with a single command.

FossilOrigin-Name: 44f157e0f0d5a76ef9002b2592164c4fdae89e34

9 years agoAn initial attempt at a "dbhash" command-line utility.
drh [Wed, 8 Jun 2016 01:03:05 +0000 (01:03 +0000)] 
An initial attempt at a "dbhash" command-line utility.

FossilOrigin-Name: 2247649ca215c06205b33b2250eb809baf39263a

9 years agoFix the walcrash4.test test module so that it works on windows.
drh [Tue, 7 Jun 2016 20:25:19 +0000 (20:25 +0000)] 
Fix the walcrash4.test test module so that it works on windows.

FossilOrigin-Name: 2091a4c9231c7871f27661adc27dd7df26500f6c

9 years agoIn winFullPathname, translate '/X:' to 'X:' before doing anything else.
mistachkin [Mon, 6 Jun 2016 20:36:26 +0000 (20:36 +0000)] 
In winFullPathname, translate '/X:' to 'X:' before doing anything else.

FossilOrigin-Name: e404ad705d0e2d96025d05cc88348ffcd0703533

9 years agoTranslate filenames of the form "/c:/*" into just "c:/*" on WinRT and Cygwin.
drh [Mon, 6 Jun 2016 20:27:15 +0000 (20:27 +0000)] 
Translate filenames of the form "/c:/*" into just "c:/*" on WinRT and Cygwin.
(SQLite has long done this for Win32/WinNT.)

FossilOrigin-Name: f8470ffc49918099820cc0008b9089e5fe8a7dff

9 years agoFix lempar.c so that the shift-reduce optimization works for error processing.
drh [Mon, 6 Jun 2016 18:17:36 +0000 (18:17 +0000)] 
Fix lempar.c so that the shift-reduce optimization works for error processing.
This is a Lemon issue only and has no impact on SQLite.

FossilOrigin-Name: 3665a2f554e5b8d2717d952dbaf325a39c637c31

9 years agoInitialize the yyerrcnt variable in the lemon parser template. This has no
drh [Mon, 6 Jun 2016 13:24:57 +0000 (13:24 +0000)] 
Initialize the yyerrcnt variable in the lemon parser template.  This has no
effect on SQLite itself.

FossilOrigin-Name: 45531654f7f5be3a08e9ee8598f14efe028245d8

9 years agoSmall performance boost and size decrease in sqlite3BtreeMovetoUnpacked().
drh [Mon, 6 Jun 2016 01:54:20 +0000 (01:54 +0000)] 
Small performance boost and size decrease in sqlite3BtreeMovetoUnpacked().

FossilOrigin-Name: e106a77d85c20ae23ebe49a5acceeaffecb40fc2

9 years agoSmall performance improvement in the LIKE function.
drh [Mon, 6 Jun 2016 01:48:14 +0000 (01:48 +0000)] 
Small performance improvement in the LIKE function.

FossilOrigin-Name: 5fb0c35459cf7a8662bf8cd84ac345f6fafda6cc

9 years agoBtree interface refactoring:
drh [Mon, 6 Jun 2016 01:14:08 +0000 (01:14 +0000)] 
Btree interface refactoring:
(1) The sqlite3BtreeKeySize() interface is renamed to sqlite3BtreeIntegerKey()
and modified to work only for table btrees with a rowid.
(2) The sqlite3BtreeDataSize() interface is renamed to sqlite3BtreePayloadSize()
and modified to work with any btree.
(3) The sqlite3BtreeDataFetch() and sqlite3BtreeKeyFetch() routines are
combined into a single sqlite3BtreePayloadFetch() routine.
The result of these changes is a smaller binary and fewer CPU cycles needed
to run queries.

FossilOrigin-Name: 2d831074cf730dce47de5880d7b4570d04d15fee

9 years agoImproved comment on cursorOwnsBtShared(). No changes to code. btree-refactor
drh [Sat, 4 Jun 2016 21:05:54 +0000 (21:05 +0000)] 
Improved comment on cursorOwnsBtShared().  No changes to code.

FossilOrigin-Name: 5e269c2d2667df65592a32d6bc2fa388fd7eb181

9 years agoFix a C99-ism and a compiler warning for MSVC.
drh [Sat, 4 Jun 2016 20:58:35 +0000 (20:58 +0000)] 
Fix a C99-ism and a compiler warning for MSVC.

FossilOrigin-Name: aa53a36ea2eb90cc4939e37e6ad320b4211692fd

9 years agoChange the sqlite3BtreeKeySize() interface into sqlite3BtreeIntegerKey() and
drh [Sat, 4 Jun 2016 20:37:10 +0000 (20:37 +0000)] 
Change the sqlite3BtreeKeySize() interface into sqlite3BtreeIntegerKey() and
make it only work for table btrees.  Change sqlite3BtreeDataSize() into
sqlite3BtreePayloadSize() and make it work for all btrees.  Combine
sqlite3BtreeDataFetch() and sqlite3BtreeKeyFetch() into a single
sqlite3BtreePayloadFetch() routine.  These changes seem to make the
b-tree interface more rational and they reduce both binary size and
CPU usage.

FossilOrigin-Name: bef35e18dd19732f7859287b097feeb593e5900f

9 years agoAllocate KeyInfo objects from lookaside if possible.
drh [Sat, 4 Jun 2016 17:12:26 +0000 (17:12 +0000)] 
Allocate KeyInfo objects from lookaside if possible.

FossilOrigin-Name: b411107a3609d53af4e147f01e311b858b78420b

9 years agoFix up speedtest1.c so that it will compile and run on SQLite versions prior
drh [Sat, 4 Jun 2016 16:33:48 +0000 (16:33 +0000)] 
Fix up speedtest1.c so that it will compile and run on SQLite versions prior
to 3.6.18 (circa 2009-09-11).

FossilOrigin-Name: 9583c0fb39f357a76e0c99ea03b034aea3e03c75

9 years agoRemove an unreachable branch in the UNIQUE constraint parsing.
drh [Sat, 4 Jun 2016 13:57:41 +0000 (13:57 +0000)] 
Remove an unreachable branch in the UNIQUE constraint parsing.

FossilOrigin-Name: 313e990c741d7db082f1d9b9f3f4c65fdd91b812

9 years agoThe OR optimization is usable on virtual tables with LIKE, REGEXP and/or GLOB
drh [Fri, 3 Jun 2016 18:59:37 +0000 (18:59 +0000)] 
The OR optimization is usable on virtual tables with LIKE, REGEXP and/or GLOB
terms in the WHERE clause.

FossilOrigin-Name: fa3a89fc0b88d5ad7f5c232198847b3483eef611

9 years agoAdd support for virtual tables using a WITHOUT ROWID schema. This merge also
drh [Fri, 3 Jun 2016 18:44:43 +0000 (18:44 +0000)] 
Add support for virtual tables using a WITHOUT ROWID schema.  This merge also
includes enhancements to the CSV extension, which is used for testing of
the new WITHOUT ROWID virtual table mechanism.

FossilOrigin-Name: aa7e9d0cc15c050205b09d5a50f985e4ade571d0

9 years agoFix a memory leak when a WITHOUT ROWID eponymous virtual table is used. without-rowid-vtab
drh [Fri, 3 Jun 2016 18:21:04 +0000 (18:21 +0000)] 
Fix a memory leak when a WITHOUT ROWID eponymous virtual table is used.

FossilOrigin-Name: 31b83a7d7e553163eb186fc966a885f237554ec2

9 years agoDisallow access to the rowid column on WITHOUT ROWID virtual tables.
drh [Fri, 3 Jun 2016 17:27:14 +0000 (17:27 +0000)] 
Disallow access to the rowid column on WITHOUT ROWID virtual tables.

FossilOrigin-Name: d31c25972bfb6d04caad05534505698776e7e6d5

9 years agoEnhance the sqlite3_load_extension() interface to permit extensions to
drh [Fri, 3 Jun 2016 13:35:55 +0000 (13:35 +0000)] 
Enhance the sqlite3_load_extension() interface to permit extensions to
return SQLITE_OK_LOAD_PERMANENTLY which will prevents unloading when
the database connection closes.

FossilOrigin-Name: 5908aa4dc59925c414b236b6fd3d3ecd7f3da435

9 years agoPerformance optimizations on the CSV virtual table. Disallow WITHOUT ROWID
drh [Fri, 3 Jun 2016 01:01:57 +0000 (01:01 +0000)] 
Performance optimizations on the CSV virtual table.  Disallow WITHOUT ROWID
virtual tables that have an xUpdate method, for now.

FossilOrigin-Name: 3134b3266c36c9d018e8d365ef46ef638c0792f4

9 years agoAdd the CSV extension to the test fixture. Fix a memory leak in the CSV
drh [Thu, 2 Jun 2016 23:13:21 +0000 (23:13 +0000)] 
Add the CSV extension to the test fixture.  Fix a memory leak in the CSV
extension.  Add test cases for the CSV extension, including one that uses
a WITHOUT ROWID virtual table participating in the OR optimization.

FossilOrigin-Name: 95f483e86e30ae68108904400e18ed41d389446b

9 years agoAdd the data= parameter to the CSV virtual table extension.
drh [Thu, 2 Jun 2016 17:44:24 +0000 (17:44 +0000)] 
Add the data= parameter to the CSV virtual table extension.

FossilOrigin-Name: 769191042aa14e6eccdfe2391fc1011171d5c9ad

9 years agoFix corner cases in the WITHOUT ROWID virtual table logic.
drh [Thu, 2 Jun 2016 16:22:53 +0000 (16:22 +0000)] 
Fix corner cases in the WITHOUT ROWID virtual table logic.

FossilOrigin-Name: a393bbb972660c1ffcdda923d0f3564ecfcd2f0a

9 years agoFix an issue preventing RBU vacuum from working with virtual tables.
dan [Wed, 1 Jun 2016 10:37:50 +0000 (10:37 +0000)] 
Fix an issue preventing RBU vacuum from working with virtual tables.

FossilOrigin-Name: 3bd85fa5a9a489fd505c973e37c33a76c1b0e957

10 years agoFix compilation issues with the VFS stat extension.
mistachkin [Wed, 1 Jun 2016 05:02:05 +0000 (05:02 +0000)] 
Fix compilation issues with the VFS stat extension.

FossilOrigin-Name: f6e956525b03fa07190e5521edac4758c386cc80

10 years agoAn experimental branch with code that allows virtual tables to be declared
drh [Tue, 31 May 2016 21:18:15 +0000 (21:18 +0000)] 
An experimental branch with code that allows virtual tables to be declared
as WITHOUT ROWID tables. This might be useful for virtual tables that model
external data sources that do not have a convenient way of computing a unique
rowid.  The current check-in almost works, but there are still serious issues.

FossilOrigin-Name: 49638f180e26477974cacc69b79e0be0a5e18b29

10 years agoAdd the columns=N parameter to the CSV extension.
drh [Tue, 31 May 2016 18:44:33 +0000 (18:44 +0000)] 
Add the columns=N parameter to the CSV extension.

FossilOrigin-Name: 28ebeadd6a4c9ff2ce9fc86a0f0fe2f6cf94d3ac

10 years agoAdd the testflags parameter to the csv extension.
drh [Tue, 31 May 2016 18:08:35 +0000 (18:08 +0000)] 
Add the testflags parameter to the csv extension.

FossilOrigin-Name: b93fb2fe0df1b3bea2bc2a4e1528da74ab290593

10 years agoAdd the "csv" virtual table for reading CSV files, as an extension in
drh [Tue, 31 May 2016 16:22:48 +0000 (16:22 +0000)] 
Add the "csv" virtual table for reading CSV files, as an extension in
the ext/misc/ subfolder.

FossilOrigin-Name: 00d3570c8bb96469c984903e20de589e998d4636

10 years agoFix an FTS5 problem (segfault or incorrect query results) with "... MATCH 'x OR y...
dan [Mon, 30 May 2016 08:28:21 +0000 (08:28 +0000)] 
Fix an FTS5 problem (segfault or incorrect query results) with "... MATCH 'x OR y' ORDER BY rank" queries when either token 'x' or 'y' is completely absent from the dataset.

FossilOrigin-Name: 64ca1a835a89fd211078d2cd8f9b649e89be528d

10 years agoExperimental change to allow virtual tables to take advantage of LIKE, REGEXP and... vtab-experimental
dan [Sat, 28 May 2016 18:53:55 +0000 (18:53 +0000)] 
Experimental change to allow virtual tables to take advantage of LIKE, REGEXP and GLOB terms that are part of OR expressions within WHERE clauses.

FossilOrigin-Name: 242507b4ff96bc4c7c7844dbe1c2b8508dbf1d01

10 years agoRemove an unnecessary malloc from the vfsstat extension.
drh [Sat, 28 May 2016 17:45:15 +0000 (17:45 +0000)] 
Remove an unnecessary malloc from the vfsstat extension.

FossilOrigin-Name: 24f258c2392290168cf34622b89a4a406a3dd853

10 years agoEnhance the sqlite3_load_extension() interface to permit extensions to load-permanently
drh [Sat, 28 May 2016 17:23:08 +0000 (17:23 +0000)] 
Enhance the sqlite3_load_extension() interface to permit extensions to
return SQLITE_OK_LOAD_PERMANENTLY which will prevent the extensions from
unloading when the database connection closes.

FossilOrigin-Name: d3f99a5e8d0486d0917dfe96987c179a6f63b850

10 years agoEnhance "PRAGMA compile_options" so that it shows the version of the compiler
drh [Sat, 28 May 2016 15:22:33 +0000 (15:22 +0000)] 
Enhance "PRAGMA compile_options" so that it shows the version of the compiler
used to generate the executable, for common compilers.

FossilOrigin-Name: 6a0f200957ea294a2ae06c0b039a10ac838925f2

10 years agoUpdate the amalgamation-tarball configure script so that it can use header file ...
dan [Sat, 28 May 2016 15:09:35 +0000 (15:09 +0000)] 
Update the amalgamation-tarball configure script so that it can use header file "readline/readline.h" with library file "libedit".

FossilOrigin-Name: cbf72b04bb0650b62336d86b22ef59315ccdc183

10 years agoAdd the vfsstat.c loadable extension - a VFS shim that measures the amount
drh [Sat, 28 May 2016 14:53:48 +0000 (14:53 +0000)] 
Add the vfsstat.c loadable extension - a VFS shim that measures the amount
of I/O, and an eponymous virtual table that is used to extract and view
the measurements.

FossilOrigin-Name: 0987487dd4ebfcf66ddeec8ceca47775216a0887

10 years agoClang can define _MSC_VER in some circumstances; therefore, check for Clang first. ctimeCompiler
mistachkin [Sat, 28 May 2016 00:13:21 +0000 (00:13 +0000)] 
Clang can define _MSC_VER in some circumstances; therefore, check for Clang first.

FossilOrigin-Name: 3f710bc3617691fa7432a24f1410d4651ca181b6

10 years agoCheck for Clang before GCC.
mistachkin [Fri, 27 May 2016 21:13:43 +0000 (21:13 +0000)] 
Check for Clang before GCC.

FossilOrigin-Name: 7c2cd4b05f88a759bdf72d3a249db5984fd7105d

10 years agoRemove surplus quotation marks from the COMPILER= compile_options setting for Clang.
mistachkin [Fri, 27 May 2016 20:30:02 +0000 (20:30 +0000)] 
Remove surplus quotation marks from the COMPILER= compile_options setting for Clang.

FossilOrigin-Name: 5c966f200018043f5258eb03e043bb25c7766131

10 years agoRemove surplus quotation marks from the COMPILER= compile_options setting
drh [Fri, 27 May 2016 19:34:29 +0000 (19:34 +0000)] 
Remove surplus quotation marks from the COMPILER= compile_options setting
for GCC.

FossilOrigin-Name: 664c132dabe4a871d5c39c11b339f871ca3a5d31

10 years agoAdd basic compiler information to the results of 'PRAGMA compile_options'.
mistachkin [Fri, 27 May 2016 18:09:45 +0000 (18:09 +0000)] 
Add basic compiler information to the results of 'PRAGMA compile_options'.

FossilOrigin-Name: d734e2df40d95da74ce0c8dd2da1c14033cad8bb

10 years agoImprovements to WHERE-clause debug tracing. Show TK_MATCH expressions and
drh [Fri, 27 May 2016 12:30:20 +0000 (12:30 +0000)] 
Improvements to WHERE-clause debug tracing.  Show TK_MATCH expressions and
show more details on WhereTerm traces.

FossilOrigin-Name: 71087c12bc75a82f5d1051600a442ef6efc5e899

10 years agoFix Lemon so that it actually works with -DYYSTACKDEPTH=0.
drh [Fri, 27 May 2016 04:10:47 +0000 (04:10 +0000)] 
Fix Lemon so that it actually works with -DYYSTACKDEPTH=0.

FossilOrigin-Name: a9be4c2d56d08fea2cd1aab20b19092a45ef7620

10 years agoFix the Lemon-generated parser so that it compiles with -DYYSTACKDEPTH=0.
drh [Fri, 27 May 2016 01:07:18 +0000 (01:07 +0000)] 
Fix the Lemon-generated parser so that it compiles with -DYYSTACKDEPTH=0.
It does compile now, but there are subtle issues still.

FossilOrigin-Name: 28d439f816d2fa5263e1c4ddecf3bf1ac2dd6549

10 years agoAdd a new OP_SeekRowid opcode, that combines the functions of OP_MustBeInt
drh [Thu, 26 May 2016 20:56:38 +0000 (20:56 +0000)] 
Add a new OP_SeekRowid opcode, that combines the functions of OP_MustBeInt
and OP_NotExists.  This makes the code slightly smaller and faster.

FossilOrigin-Name: ffe80a1bfa014943a614fc6993c1749b9bfec4c1

10 years agoAdd the libvers.c tool in the tool/ subdirectory.
drh [Wed, 25 May 2016 18:53:39 +0000 (18:53 +0000)] 
Add the libvers.c tool in the tool/ subdirectory.

FossilOrigin-Name: 2a41f098b2f0523b3d7e6eba6ae91cc0d30752df

10 years agoEnhance Lemon and the parser template so that it can once again build parsers
drh [Tue, 24 May 2016 18:55:08 +0000 (18:55 +0000)] 
Enhance Lemon and the parser template so that it can once again build parsers
that have no unreachable branches.

FossilOrigin-Name: 41fd46e2962ba9a1e1f6867567499d1f6f5b8372

10 years agoMinor change to the walcrash4.test module so that it works when
drh [Tue, 24 May 2016 18:50:41 +0000 (18:50 +0000)] 
Minor change to the walcrash4.test module so that it works when
SQLITE_DEFAULT_WAL_SYNCHRONOUS is set to something other than 2.

FossilOrigin-Name: 61e239bc4310eff172e1e50d51522ecc75dd997e

10 years agoFix an obscure problem with transactions written in "PRAGMA synchronous=full" mode...
dan [Tue, 24 May 2016 16:20:51 +0000 (16:20 +0000)] 
Fix an obscure problem with transactions written in "PRAGMA synchronous=full" mode on systems that do not support POWERSAFE_OVERWRITE causing an xSync() call to be omitted if the last frame written by a transaction is aligned to a sector boundary. This means that if a power failure or OS crash occurs very soon after such a transaction is committed, it may be lost following system recovery.

FossilOrigin-Name: 37de3eab67f12ae1ce5bc8d5e541c64fc6b1fd80

10 years agoImprovements to the initialization of the push-down automoton for the
drh [Tue, 24 May 2016 00:40:54 +0000 (00:40 +0000)] 
Improvements to the initialization of the push-down automoton for the
Lemon-generated parser.  Smaller and faster.

FossilOrigin-Name: 3b28b68e232060f8b2fe2fe6fa478280da2006ff

10 years agoUse a pointer to the top of the stack rather than an index into the stack
drh [Mon, 23 May 2016 21:56:24 +0000 (21:56 +0000)] 
Use a pointer to the top of the stack rather than an index into the stack
in the Lemon-generated parser template, for about 6.6% parser performance gain.

FossilOrigin-Name: 3c2a770549d5bb65fcd6cc684e0a0ae6d641ac68

10 years agoAvoid a minor error message when running RTREE without an sqlite_stat1 table.
drh [Mon, 23 May 2016 19:02:58 +0000 (19:02 +0000)] 
Avoid a minor error message when running RTREE without an sqlite_stat1 table.

FossilOrigin-Name: 276e92f5b4c1ee49eabb738b24d73d7af90fb13c

10 years agoFix the rtreeG.test test case. tree-stat1-fix
drh [Mon, 23 May 2016 18:27:07 +0000 (18:27 +0000)] 
Fix the rtreeG.test test case.

FossilOrigin-Name: 9589e9377118efc356c73ea1aab2d7e6c2f7fc36

10 years agoFix RTREE so that it does not run queries against the sqlite_stat1 if that
drh [Mon, 23 May 2016 18:12:04 +0000 (18:12 +0000)] 
Fix RTREE so that it does not run queries against the sqlite_stat1 if that
table does not exist.

FossilOrigin-Name: 48526a2fe5373e3d19e8b813cc8a342d6b7c9c3d

10 years agoRemove an extra "finish_test" from the end of rtreeC.test.
drh [Mon, 23 May 2016 18:06:51 +0000 (18:06 +0000)] 
Remove an extra "finish_test" from the end of rtreeC.test.

FossilOrigin-Name: bfbb6dd84b5e1335e1eae857a03fa33a71fd67a5

10 years agoImprove the error messages generated by the rtree module when a constraint fails.
dan [Mon, 23 May 2016 16:16:13 +0000 (16:16 +0000)] 
Improve the error messages generated by the rtree module when a constraint fails.

FossilOrigin-Name: 3ad2531efb64b7c53b777ddf3681203217052b32

10 years agoLemon enhancement: avoid unnecessary reduce actions that convert one
drh [Mon, 23 May 2016 16:15:02 +0000 (16:15 +0000)] 
Lemon enhancement: avoid unnecessary reduce actions that convert one
non-terminal into another but have no side effects.

FossilOrigin-Name: a86e782ad1aa6f5a8b2c54f9dcf0fa61960843f3

10 years agoFix comment typos and improve clarity of presention in Lemon. The output
drh [Mon, 23 May 2016 14:24:31 +0000 (14:24 +0000)] 
Fix comment typos and improve clarity of presention in Lemon.  The output
should be identical.

FossilOrigin-Name: b91a5b8297756289d45c8fce0d3399c253517eb0

10 years agoUpdate the configure script with additional hints on the location of
drh [Mon, 23 May 2016 00:10:58 +0000 (00:10 +0000)] 
Update the configure script with additional hints on the location of
tclConfig.sh, hints needed by the latest versions of Xcode.

FossilOrigin-Name: 90411a28168f6dacf08242a25bed7d6269041417

10 years agoMore tweaks to improve the performance of the insert logic, slightly.
drh [Sat, 21 May 2016 23:25:29 +0000 (23:25 +0000)] 
More tweaks to improve the performance of the insert logic, slightly.

FossilOrigin-Name: dec1307581216e01ad508ffe4455b957e3356654

10 years agoSimplify the sqlite3BtreeInsert() interface by gathering the five arguments
drh [Sat, 21 May 2016 20:03:42 +0000 (20:03 +0000)] 
Simplify the sqlite3BtreeInsert() interface by gathering the five arguments
describing the content to be inserted into the new BtreePayload structure, and
thus reducing the number of parameters from eight to four.

FossilOrigin-Name: 55f348cdd24c7812ea4b63345514764b69f64dc8

10 years agoRemove some unused legacy code from the btree insert logic.
drh [Sat, 21 May 2016 19:10:21 +0000 (19:10 +0000)] 
Remove some unused legacy code from the btree insert logic.

FossilOrigin-Name: 2ce1166717ac3c0cec37b2f6d70d8359fbaefc71

10 years agoYet another minor size reduction and performance increase in the b-tree
drh [Sat, 21 May 2016 12:29:04 +0000 (12:29 +0000)] 
Yet another minor size reduction and performance increase in the b-tree
insert logic.

FossilOrigin-Name: 1dbaf7a119edc5150a5d4be1b72f652a574e5bc5

10 years agoSmall size reduction and performance increase in the sqlite3BtreeInsert()
drh [Sat, 21 May 2016 11:23:26 +0000 (11:23 +0000)] 
Small size reduction and performance increase in the sqlite3BtreeInsert()
logic.

FossilOrigin-Name: 656aa1ecf5129ae43c56a990e95038b5d8cbdcee

10 years agoAdd the shell-script used for routine performance testing.
drh [Sat, 21 May 2016 00:45:54 +0000 (00:45 +0000)] 
Add the shell-script used for routine performance testing.

FossilOrigin-Name: 8e366f18f5bbd594390e7b091083e99639de324e

10 years agoAdd a simple TCL script for summing cachegrind information for each VDBE
drh [Fri, 20 May 2016 23:51:14 +0000 (23:51 +0000)] 
Add a simple TCL script for summing cachegrind information for each VDBE
opcdoe.

FossilOrigin-Name: 96cf821b6a69e2e8df33271b7bb674bd12a1ef7b

10 years agoAnother optimization on the OP_Column opcode.
drh [Fri, 20 May 2016 21:40:11 +0000 (21:40 +0000)] 
Another optimization on the OP_Column opcode.

FossilOrigin-Name: 1765672c2599eb03d39c52cd2dc32ea1e5ee069e

10 years agoFix typo in comment.
mistachkin [Fri, 20 May 2016 20:58:30 +0000 (20:58 +0000)] 
Fix typo in comment.

FossilOrigin-Name: 9db8f2147339ba519c4ec32e34068e9f4a25e099

10 years agoSlight performance improvement in the OP_Column opcode.
drh [Fri, 20 May 2016 19:51:28 +0000 (19:51 +0000)] 
Slight performance improvement in the OP_Column opcode.

FossilOrigin-Name: 5c157474391f90f24e8867c77fbc6564c7955ecc

10 years agoRemove the sqlite3PagerClearCache() routine, which does not accomplish anything
drh [Fri, 20 May 2016 18:09:01 +0000 (18:09 +0000)] 
Remove the sqlite3PagerClearCache() routine, which does not accomplish anything
useful.

FossilOrigin-Name: f250166bb3c1b0c58e703b334825cf6210758fda

10 years agoPerformance optimization and size reduction on the freeP4() routine.
drh [Fri, 20 May 2016 15:53:47 +0000 (15:53 +0000)] 
Performance optimization and size reduction on the freeP4() routine.

FossilOrigin-Name: 4dc56e8684e0c74fb311c7f0ef1c367da8c7bf70

10 years agoIncrease the version number to 3.14.0 since we are already making significant
drh [Fri, 20 May 2016 15:24:14 +0000 (15:24 +0000)] 
Increase the version number to 3.14.0 since we are already making significant
code changes.

FossilOrigin-Name: 1a0d05765fa2e69ccd4c98782cf9f5c5b2897719

10 years agoUse sqlite3VdbeAddOp0() to code OP_Expire, to save a few bytes.
drh [Fri, 20 May 2016 15:15:07 +0000 (15:15 +0000)] 
Use sqlite3VdbeAddOp0() to code OP_Expire, to save a few bytes.

FossilOrigin-Name: 3d55d24dcb27f07d1e645738ee4707e4df923036

10 years agoOptimizations to link list merge sort code in vdbesort.c, pcache.c, and
drh [Fri, 20 May 2016 14:54:54 +0000 (14:54 +0000)] 
Optimizations to link list merge sort code in vdbesort.c, pcache.c, and
rowset.c.  Resulting binaries are 10 bytes smaller and use 0.03% fewer CPU
cycles.

FossilOrigin-Name: 9033afbb31b28a8ad6856ac1f773d8e83bc9ec1c

10 years agoFor queries with both ORDER BY and LIMIT, if the rows of the inner loop are
drh [Fri, 20 May 2016 14:11:37 +0000 (14:11 +0000)] 
For queries with both ORDER BY and LIMIT, if the rows of the inner loop are
emitted in ORDER BY order and the LIMIT has been reached, then optimize by
exiting the inner loop and continuing with the next cycle of the first outer
loop.

FossilOrigin-Name: 559733b09e9630fac9d9318a7ecbaba9134e9160

10 years agoSet the NULLEQ flag on the sequence counter comparison in the ORDER BY LIMIT orderby-limit
drh [Fri, 20 May 2016 13:44:58 +0000 (13:44 +0000)] 
Set the NULLEQ flag on the sequence counter comparison in the ORDER BY LIMIT
optimization, to avoid coverage complaints about not testing the NULL case.

FossilOrigin-Name: ed1b30dc932a7c03e173b130c5f55f9989c7e0b4

10 years agoAutoconf configure.ac adjustment to try to get it to look for both editline
drh [Fri, 20 May 2016 12:22:16 +0000 (12:22 +0000)] 
Autoconf configure.ac adjustment to try to get it to look for both editline
and readline automatically.

FossilOrigin-Name: 645bd696dfd86d8c93080f6ebfddbc9639ec088b

10 years agoA few simple test cases for the ORDER BY LIMIT optimization.
drh [Fri, 20 May 2016 00:21:42 +0000 (00:21 +0000)] 
A few simple test cases for the ORDER BY LIMIT optimization.

FossilOrigin-Name: 08849eab0f6ef29eaf6d2ce9c692de9b953dbd27

10 years agoAppears to work now. Needs test cases, more comments, and code optimization.
drh [Thu, 19 May 2016 22:40:04 +0000 (22:40 +0000)] 
Appears to work now.  Needs test cases, more comments, and code optimization.

FossilOrigin-Name: 990fe50c9182f74c9b54a12602c4c30d891273e6

10 years agoIn a query with both ORDER BY and LIMIT, if the inner loop satisfies the
drh [Thu, 19 May 2016 22:13:37 +0000 (22:13 +0000)] 
In a query with both ORDER BY and LIMIT, if the inner loop satisfies the
ORDER BY then try to cut short each invocation of the inner loop once the
LIMIT has been satisfied.  This check-in is a partial implementation only.

FossilOrigin-Name: 852d1eda6ecca1171f6ed800b06f5b4854672002

10 years agoFixup comments on wctrlFlags value definitions.
drh [Thu, 19 May 2016 19:31:30 +0000 (19:31 +0000)] 
Fixup comments on wctrlFlags value definitions.

FossilOrigin-Name: 58b516e8c0b00a41bc0364eab267bc2ecb9efeff

10 years agoClean up the WHERE_* macros used for the wctrlFlags parameter on the
drh [Thu, 19 May 2016 18:56:33 +0000 (18:56 +0000)] 
Clean up the WHERE_* macros used for the wctrlFlags parameter on the
sqlite3WhereBegin() interface, freeing up some bits to be used for other things.

FossilOrigin-Name: d01305841da94b2d47e32744802f69525bf590df

10 years agoOptimization marks in vdbe.c. No logic changes.
drh [Thu, 19 May 2016 17:51:19 +0000 (17:51 +0000)] 
Optimization marks in vdbe.c.  No logic changes.

FossilOrigin-Name: cf2737415aff7de7e133da174b645324c99d5758

10 years agoPerformance improvement in the OP_Column opcode.
drh [Thu, 19 May 2016 16:58:42 +0000 (16:58 +0000)] 
Performance improvement in the OP_Column opcode.

FossilOrigin-Name: 4737cadc414c5f6d256fcceacb19d80d66a8c8e7

10 years agoAdd test cases to test some fts3/4 edge case behaviour surrounding the '*' character.
dan [Thu, 19 May 2016 16:21:30 +0000 (16:21 +0000)] 
Add test cases to test some fts3/4 edge case behaviour surrounding the '*' character.

FossilOrigin-Name: 1f577e1f08159aeaaf19a7020d9004dd6103d57b

10 years agoSmall size reduction and performance improvement in the OP_Column opcode.
drh [Thu, 19 May 2016 11:12:43 +0000 (11:12 +0000)] 
Small size reduction and performance improvement in the OP_Column opcode.

FossilOrigin-Name: 0d7730611be974162d9a064a041957d04d55b6d3

10 years agoAdd the "scrub" utility program that simultaneously backs-up a live database
drh [Wed, 18 May 2016 21:03:27 +0000 (21:03 +0000)] 
Add the "scrub" utility program that simultaneously backs-up a live database
and erases all deleted content.

FossilOrigin-Name: c981ab2a4771f8c5e95e2e85e37a02a4bd0e36ee