]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
8 years agoMinor tweak the the b-tree balancer. btree-tuning
drh [Thu, 14 Jul 2016 19:48:08 +0000 (19:48 +0000)] 
Minor tweak the the b-tree balancer.

FossilOrigin-Name: d2a0af7a37e390439c3001fedb5834f47fb24a1f

8 years agoFix ALTER TABLE so that it does not promote the schema version past 3, as
drh [Thu, 14 Jul 2016 19:13:11 +0000 (19:13 +0000)] 
Fix ALTER TABLE so that it does not promote the schema version past 3, as
that will cause DESC indexes to go corrupt.
Ticket [f68bf68513a1c].

FossilOrigin-Name: a7db6e45ad45be9b3003f61d4163f543498a7c9d

8 years agoFix harmless compiler warnings in shell.c for NetBSD.
drh [Wed, 13 Jul 2016 13:05:13 +0000 (13:05 +0000)] 
Fix harmless compiler warnings in shell.c for NetBSD.

FossilOrigin-Name: 824b39e54fb9ba562be4d92cc9a54aee1cdf84cb

8 years agoFix header comments and remove an unnecessary version restriction from the
drh [Wed, 13 Jul 2016 00:55:28 +0000 (00:55 +0000)] 
Fix header comments and remove an unnecessary version restriction from the
carray() table-valued function implementation.

FossilOrigin-Name: 021d0fb8d85e44839d2b4fdb90b15f0e1f2442e6

8 years agoFix the error counter reset in Lemon generated parsers. This has no effect
drh [Tue, 12 Jul 2016 19:54:49 +0000 (19:54 +0000)] 
Fix the error counter reset in Lemon generated parsers.  This has no effect
on SQLite.

FossilOrigin-Name: 3ef93950d30b34d852d6bbc101d433a04112868a

8 years agoFix typos in comments. No changes to code.
mistachkin [Sun, 10 Jul 2016 19:35:10 +0000 (19:35 +0000)] 
Fix typos in comments.  No changes to code.

FossilOrigin-Name: 77c692a6704cd877ba35d0afb774ab9b46364d59

8 years agoAdd the "#/value-list/" style of results for approximate value matching
drh [Sat, 9 Jul 2016 17:47:01 +0000 (17:47 +0000)] 
Add the "#/value-list/" style of results for approximate value matching
in the do_test command of the test infrastructure.  Use this new result style
to make the SQLITE_DBSTATUS_CACHE_SIZE_SHARED tests cross-platform.

FossilOrigin-Name: c869bf34a8ee42ac6542862e59c7a4b89b042f79

8 years agoFix a compiler warning in test code - in the int64array_addr TCL command.
drh [Sat, 9 Jul 2016 17:15:05 +0000 (17:15 +0000)] 
Fix a compiler warning in test code - in the int64array_addr TCL command.

FossilOrigin-Name: 29fb988f1afc3fe623097acee1a5d08bf8386626

8 years agoFix compiler warnings on windows.
drh [Sat, 9 Jul 2016 16:38:25 +0000 (16:38 +0000)] 
Fix compiler warnings on windows.

FossilOrigin-Name: 8b22f777a11438ab0baadc7d9e471f415b734d1f

8 years agoFix various internal #defines to conform to new C-language naming restrictions,
drh [Sat, 9 Jul 2016 16:14:45 +0000 (16:14 +0000)] 
Fix various internal #defines to conform to new C-language naming restrictions,
specifically that private-use macros names must not begin with "_".

FossilOrigin-Name: 5471aca0158851d3fb0a2517306917536deb38bb

8 years agoAdd support for the win32-none VFS.
drh [Sat, 9 Jul 2016 00:06:21 +0000 (00:06 +0000)] 
Add support for the win32-none VFS.

FossilOrigin-Name: b5f32a896d0e4010ec67fcf1d635bb9aa797d3c2

8 years agoInitial work on a Win32 VFS with NOP locking. win32nolock
mistachkin [Fri, 8 Jul 2016 21:14:37 +0000 (21:14 +0000)] 
Initial work on a Win32 VFS with NOP locking.

FossilOrigin-Name: 549abe3f89b55b05a05f267865a5dd84b8cd335d

8 years agoAnother attempt to fix error handling in Lemon. This change is a no-op for
drh [Fri, 8 Jul 2016 19:54:38 +0000 (19:54 +0000)] 
Another attempt to fix error handling in Lemon.  This change is a no-op for
SQLite's usage.

FossilOrigin-Name: e1d8ef311cabcb96495a88404991b1416655e4a8

9 years agoIn the sqldiff program, make sure the first argument to the db_prepare()
drh [Fri, 8 Jul 2016 02:14:24 +0000 (02:14 +0000)] 
In the sqldiff program, make sure the first argument to the db_prepare()
utility function is always a valid format string.

FossilOrigin-Name: 8bb8d886ffa948cd7bc66c8c62da76bce233be2e

9 years agoAdd the SQLITE_DBSTATUS_CACHE_USED_SHARED sqlite3_db_status() parameter. This option...
dan [Wed, 6 Jul 2016 18:42:34 +0000 (18:42 +0000)] 
Add the SQLITE_DBSTATUS_CACHE_USED_SHARED sqlite3_db_status() parameter. This option is similar to DBSTATUS_CACHE_USED, except that it divides memory used by shared caches evenly between all connections.

FossilOrigin-Name: 06cf2680588c8dc4f0cbde275a09cfdcb5943268

9 years agoChange the name of the SQLITE_DBSTATUS_PROPORTIONAL_CACHE_USED to SQLITE_DBSTATUS_CAC... dbstatus-prop-cache-used
dan [Wed, 6 Jul 2016 18:12:54 +0000 (18:12 +0000)] 
Change the name of the SQLITE_DBSTATUS_PROPORTIONAL_CACHE_USED to SQLITE_DBSTATUS_CACHE_USED_SHARED.

FossilOrigin-Name: d58401ab26c7c5417eb7d540f47d11c4e49edcb2

9 years agoFix a test script problem causing a test to fail if the ICU extension is enabled.
dan [Wed, 6 Jul 2016 10:17:43 +0000 (10:17 +0000)] 
Fix a test script problem causing a test to fail if the ICU extension is enabled.

FossilOrigin-Name: 0c228f5d3db1be598ebf5d9170428c19d18e01ad

9 years agoAdd the SQLITE_DBSTATUS_PROPORTIONAL_CACHE_USED sqlite3_db_status() parameter.
dan [Wed, 6 Jul 2016 10:12:02 +0000 (10:12 +0000)] 
Add the SQLITE_DBSTATUS_PROPORTIONAL_CACHE_USED sqlite3_db_status() parameter.

FossilOrigin-Name: 118321c8b9d88b8f439c952436f42838c3fc80cb

9 years agoFix a memory leak in recently added test code.
dan [Wed, 6 Jul 2016 09:19:14 +0000 (09:19 +0000)] 
Fix a memory leak in recently added test code.

FossilOrigin-Name: 724e4cdc25fc80b8face57b3398cd338994fb23c

9 years agoMore fixes to Fossil so that it automatically resets its error counter at the
drh [Tue, 5 Jul 2016 16:11:26 +0000 (16:11 +0000)] 
More fixes to Fossil so that it automatically resets its error counter at the
end of a parse.

FossilOrigin-Name: 2683b375ad1291172fdb47d94e16fcf869c78c8a

9 years agoAttempt to reset the error count in the Lemon-generated parser after
drh [Tue, 5 Jul 2016 12:47:28 +0000 (12:47 +0000)] 
Attempt to reset the error count in the Lemon-generated parser after
a parse failure.

FossilOrigin-Name: 91889fa30e84760e0d4b3d429c4abdef5a3f7931

9 years agoAdd the sqlite3rbu_state() API. Used to determine the current state (creating OAL...
dan [Mon, 4 Jul 2016 11:47:48 +0000 (11:47 +0000)] 
Add the sqlite3rbu_state() API. Used to determine the current state (creating OAL, ready to move OAL, incremental-checkpoint, finished or error) of an RBU operation.

FossilOrigin-Name: 0357875fbb1bb462feef5121287b2f84da88e497

9 years agoAdd the carray() virtual table as a loadable extension.
drh [Mon, 4 Jul 2016 11:34:56 +0000 (11:34 +0000)] 
Add the carray() virtual table as a loadable extension.

FossilOrigin-Name: d8bc6feb99938a2aa06142b217045e4b54c66bf1

9 years agoChange the name of the intarray() extension to carray() and give it an prototype-int-array
drh [Sun, 3 Jul 2016 02:35:47 +0000 (02:35 +0000)] 
Change the name of the intarray() extension to carray() and give it an
optional third parameter that specifies the datatype as one of 'int32',
'int64', 'double', or 'char*'.  'int32' is the default.

FossilOrigin-Name: a204ba99db34b356acb259189158a32d2df25da0

9 years agoFix an off-by-one comparison in the intarray() virtual table. Get the
drh [Sat, 2 Jul 2016 20:57:06 +0000 (20:57 +0000)] 
Fix an off-by-one comparison in the intarray() virtual table.  Get the
intarray() virtual table tests working using the legacy makefile.

FossilOrigin-Name: 7c3d441f2a9f642f3d91dcee854a4d16d298bc34

9 years agoMerge the alternative table-valued function RHS of IN operator implementation
drh [Sat, 2 Jul 2016 20:51:31 +0000 (20:51 +0000)] 
Merge the alternative table-valued function RHS of IN operator implementation
from trunk.

FossilOrigin-Name: 507fdbfb54ce377f0d870260b07d71b797843fcf

9 years agoFix a problem in table-valued functions on the RHS of an IN operator that
drh [Sat, 2 Jul 2016 12:33:21 +0000 (12:33 +0000)] 
Fix a problem in table-valued functions on the RHS of an IN operator that
occurs following an OOM error.

FossilOrigin-Name: bead151e72215e6ca2a90eb049cfca414dccea04

9 years agoAdd support for table-valued functions on the RHS of an IN operator.
drh [Sat, 2 Jul 2016 12:08:14 +0000 (12:08 +0000)] 
Add support for table-valued functions on the RHS of an IN operator.

FossilOrigin-Name: ac6000f050ff4efcf8a87f0825077dbf4144f073

9 years agoFix the transitive constraint logic error that can result in a null pointer
drh [Fri, 1 Jul 2016 20:12:39 +0000 (20:12 +0000)] 
Fix the transitive constraint logic error that can result in a null pointer
dereference.  Fix for ticket [e8d439c77685eca6].

FossilOrigin-Name: 228a7879870f8689e2f9b74fbef2ff93fab7b3c2

9 years agoAdd test cases to the transitive constraint fix. planner-fix
drh [Fri, 1 Jul 2016 19:48:43 +0000 (19:48 +0000)] 
Add test cases to the transitive constraint fix.

FossilOrigin-Name: c952af89c22ddc31491f142b9511608a4c8f9737

9 years agoAdd the sqlite3rbu_state() API. Used to determine the current state (creating OAL... rbu-state-api
dan [Fri, 1 Jul 2016 12:39:58 +0000 (12:39 +0000)] 
Add the sqlite3rbu_state() API. Used to determine the current state (creating OAL, ready to move OAL, incremental-checkpoint, finished or error) of an RBU operation.

FossilOrigin-Name: 92e7df0ff5c4c118c63d92a767dc82700438a310

9 years agoAdd the ability to have a table-valued function on the RHS of an IN operator.
drh [Wed, 29 Jun 2016 06:19:19 +0000 (06:19 +0000)] 
Add the ability to have a table-valued function on the RHS of an IN operator.

FossilOrigin-Name: ba1b441b6003808810667d749635fe6b2e8c6165

9 years agoAnother test case for the intarray($PTR,$N) virtual table.
drh [Wed, 29 Jun 2016 05:08:01 +0000 (05:08 +0000)] 
Another test case for the intarray($PTR,$N) virtual table.

FossilOrigin-Name: 06e1fab7527c6b4330a58f8d8873afaf2d67ae86

9 years agoAdd a prototype intarray($PTR,$N) table valued function.
drh [Wed, 29 Jun 2016 05:00:30 +0000 (05:00 +0000)] 
Add a prototype intarray($PTR,$N) table valued function.

FossilOrigin-Name: 233b33382dc70de45f90b6dfdb5785f20b21489e

9 years agoProposed fix for a problem in the query planner.
drh [Tue, 28 Jun 2016 22:27:56 +0000 (22:27 +0000)] 
Proposed fix for a problem in the query planner.

FossilOrigin-Name: a33d23560959a127e37d8213dc00210cd4b05352

9 years agoPrevent the WhereLoop.rSetup cost estimate from going negative on complex
drh [Sun, 26 Jun 2016 04:06:28 +0000 (04:06 +0000)] 
Prevent the WhereLoop.rSetup cost estimate from going negative on complex
queries.

FossilOrigin-Name: f81050859170c8708a1b296da8dd3ef0dd314a11

9 years agoFix the handling of OP_Eq opcodes that compare a register against itself
drh [Sat, 25 Jun 2016 11:43:47 +0000 (11:43 +0000)] 
Fix the handling of OP_Eq opcodes that compare a register against itself
and that require an affinity change.

FossilOrigin-Name: 507014e4c7a70cd09410c89c8ed466c8edab39d2

9 years agoFix the ctime.test script so that it works with clang.
drh [Fri, 24 Jun 2016 06:23:13 +0000 (06:23 +0000)] 
Fix the ctime.test script so that it works with clang.

FossilOrigin-Name: 77e4f7a36e6e0ebe842bcb36b2557a5bfba90d3f

9 years agoFix the Makefile.in to avoid unnecessary recompiles of sqlite3.c.
drh [Fri, 24 Jun 2016 02:50:44 +0000 (02:50 +0000)] 
Fix the Makefile.in to avoid unnecessary recompiles of sqlite3.c.

FossilOrigin-Name: 67c39e16442d9359b24d60d5f97bd66c19eff16a

9 years agoUpdate the sqldiff utility so that if the --vtab switch is specified "rtree", "fts3...
dan [Thu, 23 Jun 2016 16:48:35 +0000 (16:48 +0000)] 
Update the sqldiff utility so that if the --vtab switch is specified "rtree", "fts3", "fts4" and "fts5" tables are diff'd directly and the underlying real database tables ignored. Without this switch, all virtual tables are ignored and the diff is performed on the underlying real tables.

FossilOrigin-Name: b8671e9434180878cfe15d70b793fdee69aabccf

9 years agoFix the build for -DSQLITE_OMIT_VIRTUALTABLE
drh [Thu, 23 Jun 2016 12:35:04 +0000 (12:35 +0000)] 
Fix the build for -DSQLITE_OMIT_VIRTUALTABLE

FossilOrigin-Name: 911131424857430d46784b167399ecf192584ca2

9 years agoUpdate the sqldiff utility so that if the --vtab switch is specified "rtree", "fts3... sqldiff-vtab-support
dan [Tue, 21 Jun 2016 10:34:41 +0000 (10:34 +0000)] 
Update the sqldiff utility so that if the --vtab switch is specified "rtree", "fts3", "fts4" and "fts5" tables are diff'd directly and the underlying real database tables ignored. Without this switch, all virtual tables are ignored and the diff is performed on the underlying real tables.

FossilOrigin-Name: 5d0a9d4c45730e47576bc77373fa7075a74051a5

9 years agoFor a table on the rhs of a LEFT JOIN operator, do not include terms like "IS NULL...
dan [Mon, 20 Jun 2016 17:25:50 +0000 (17:25 +0000)] 
For a table on the rhs of a LEFT JOIN operator, do not include terms like "IS NULL" from the WHERE clause in the cursor-hint. These may be false for rows that the cursor would otherwise visit, but true for a row of all NULL values generated by the LEFT JOIN.

FossilOrigin-Name: 913e595615e2ef40fb431f6e7678f6fc8439782e

9 years agoAllow LIKE operators that appear in a WHERE clause to be included in the cursor-hint... cursor-hints
dan [Mon, 20 Jun 2016 17:22:06 +0000 (17:22 +0000)] 
Allow LIKE operators that appear in a WHERE clause to be included in the cursor-hint for a cursor on the rhs of a LEFT JOIN.

FossilOrigin-Name: 7455d932f5079ffe40462a8c119fc22b8a9bcbcc

9 years agoInclude WHERE terms in the cursor-hint passed to a cursor opened for the rhs of a...
dan [Fri, 17 Jun 2016 19:27:13 +0000 (19:27 +0000)] 
Include WHERE terms in the cursor-hint passed to a cursor opened for the rhs of a LEFT JOIN iff we can be sure that those terms will not evaluate to true if the LEFT JOIN generates a row of NULLs.

FossilOrigin-Name: 998095aba01b75f685ed981b377e1dfe650d9bbf

9 years agoFix a duplicate test name in cursorhint2.test.
dan [Fri, 17 Jun 2016 14:59:40 +0000 (14:59 +0000)] 
Fix a duplicate test name in cursorhint2.test.

FossilOrigin-Name: fcd12b69cee1335224a65aa6d22c4e302b889398

9 years agoFix a typo in the cursorhint2.test script.
dan [Fri, 17 Jun 2016 14:47:37 +0000 (14:47 +0000)] 
Fix a typo in the cursorhint2.test script.

FossilOrigin-Name: c1a5a57cf10dca91082963dcbd3e3ffebc3707ef

9 years agoIf a table is on the rhs of a LEFT JOIN, include only terms from the joins ON(.....
dan [Fri, 17 Jun 2016 14:33:32 +0000 (14:33 +0000)] 
If a table is on the rhs of a LEFT JOIN, include only terms from the joins ON(...) clause in the cursor-hint passed via OP_CursorHint.

FossilOrigin-Name: 2a2346b04235c6d0b7a8e64c92ee31018285c29f

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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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